fix: close workspace preprocessing contract gaps
This commit is contained in:
@@ -8,11 +8,14 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestOwnedProcessConfigurationStartsSuspended(t *testing.T) {
|
||||
func TestOwnedProcessUsesCreationTimeJobAttribute(t *testing.T) {
|
||||
if procThreadAttributeJobList == 0 {
|
||||
t.Fatal("owned Windows process must carry a creation-time job-list attribute")
|
||||
}
|
||||
cmd := exec.Command("cmd.exe")
|
||||
configureOwnedProcess(cmd)
|
||||
if cmd.SysProcAttr == nil || cmd.SysProcAttr.CreationFlags&windows.CREATE_SUSPENDED == 0 {
|
||||
t.Fatal("owned Windows process must start suspended until job assignment")
|
||||
if cmd.SysProcAttr != nil && cmd.SysProcAttr.CreationFlags&windows.CREATE_SUSPENDED != 0 {
|
||||
t.Fatal("owned Windows process must not rely on a post-start assignment race")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user