Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for GO_WANT_HELPER_PROCESS (0.32 sec)

  1. src/testing/testing_test.go

    func TestRaceName(t *testing.T) {
    	if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
    		doRace()
    		return
    	}
    
    	out := runTest(t, "TestRaceName")
    
    	if regexp.MustCompile(`=== NAME\s*$`).Match(out) {
    		t.Errorf("incorrectly reported test with no name")
    	}
    }
    
    func TestRaceSubReports(t *testing.T) {
    	if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
    		t.Parallel()
    		c1 := make(chan bool, 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  2. src/testing/helper_test.go

    func TestTBHelperParallel(t *testing.T) {
    	if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
    		parallelTestHelper(t)
    		return
    	}
    
    	testenv.MustHaveExec(t)
    	t.Parallel()
    
    	exe, err := os.Executable()
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	cmd := testenv.Command(t, exe, "-test.run=^TestTBHelperParallel$")
    	cmd = testenv.CleanCmdEnv(cmd)
    	cmd.Env = append(cmd.Env, "GO_WANT_HELPER_PROCESS=1")
    	out, _ := cmd.CombinedOutput()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 17:24:47 UTC 2023
    - 2.6K bytes
    - Viewed (0)
  3. src/syscall/exec_windows_test.go

    		}
    	}
    }
    
    func TestChangingProcessParent(t *testing.T) {
    	if os.Getenv("GO_WANT_HELPER_PROCESS") == "parent" {
    		// in parent process
    
    		// Parent does nothing. It is just used as a parent of a child process.
    		time.Sleep(time.Minute)
    		os.Exit(0)
    	}
    
    	if os.Getenv("GO_WANT_HELPER_PROCESS") == "child" {
    		// in child process
    		dumpPath := os.Getenv("GO_WANT_HELPER_PROCESS_FILE")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  4. src/testing/panic_test.go

    		cmd.Env = append(os.Environ(), "GO_WANT_HELPER_PROCESS=1")
    		b, _ := cmd.CombinedOutput()
    		got := string(b)
    		want := tc.want
    		re := makeRegexp(want)
    		if ok, err := regexp.MatchString(re, got); !ok || err != nil {
    			t.Errorf("output:\ngot:\n%s\nwant:\n%s", got, want)
    		}
    	}
    }
    
    func TestCallRunInCleanupHelper(t *testing.T) {
    	if os.Getenv("GO_WANT_HELPER_PROCESS") != "1" {
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 27 16:49:24 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  5. src/syscall/exec_unix_test.go

    func TestExecHelper(t *testing.T) {
    	if os.Getenv("GO_WANT_HELPER_PROCESS") != "2" {
    		return
    	}
    
    	// We don't have to worry about restoring these values.
    	// We are in a child process that only runs this test,
    	// and we are going to call syscall.Exec anyhow.
    	os.Setenv("GO_WANT_HELPER_PROCESS", "3")
    
    	stop := time.Now().Add(time.Second)
    	for i := 0; i < 100; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 04:41:27 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  6. src/runtime/vdso_test.go

    	if err != nil {
    		t.Skipf("skipping because Executable failed: %v", err)
    	}
    
    	t.Logf("GO_WANT_HELPER_PROCESS=1 %s -f -e clock_gettime %s -test.run=^TestUsingVDSO$", strace, exe)
    	cmd := testenv.Command(t, strace, "-f", "-e", "clock_gettime", exe, "-test.run=^TestUsingVDSO$")
    	cmd = testenv.CleanCmdEnv(cmd)
    	cmd.Env = append(cmd.Env, "GO_WANT_HELPER_PROCESS=1")
    	out, err := cmd.CombinedOutput()
    	if len(out) > 0 {
    		t.Logf("%s", out)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 17 19:47:47 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  7. src/internal/syscall/windows/exec_windows_test.go

    	if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
    		wil, err := getProcessIntegrityLevel()
    		if err != nil {
    			fmt.Fprintf(os.Stderr, "error: %s\n", err.Error())
    			os.Exit(9)
    			return
    		}
    		fmt.Printf("%s", wil)
    		os.Exit(0)
    		return
    	}
    
    	cmd := exec.Command(os.Args[0], "-test.run=^TestRunAtLowIntegrity$", "--")
    	cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 2.8K bytes
    - Viewed (0)
  8. src/syscall/exec_linux_test.go

    	testenv.MustHaveExec(t)
    
    	if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
    		// Child: wait for a signal.
    		time.Sleep(time.Hour)
    	}
    
    	exe, err := os.Executable()
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	var pidfd int
    	cmd := testenv.Command(t, exe, "-test.run=^TestPidFD$")
    	cmd.Env = append(cmd.Environ(), "GO_WANT_HELPER_PROCESS=1")
    	cmd.SysProcAttr = &syscall.SysProcAttr{
    		PidFD: &pidfd,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 07:45:37 UTC 2024
    - 20.6K bytes
    - Viewed (0)
  9. src/syscall/syscall_unix_test.go

    	if runtime.GOOS == "ios" {
    		t.Skip("skipping; no child processes allowed on iOS")
    	}
    	flock := syscall.Flock_t{
    		Type:  syscall.F_WRLCK,
    		Start: 31415, Len: 271828, Whence: 1,
    	}
    	if os.Getenv("GO_WANT_HELPER_PROCESS") == "" {
    		// parent
    		tempDir := t.TempDir()
    		name := filepath.Join(tempDir, "TestFcntlFlock")
    		fd, err := syscall.Open(name, syscall.O_CREAT|syscall.O_RDWR|syscall.O_CLOEXEC, 0)
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 29 16:24:51 UTC 2022
    - 9.4K bytes
    - Viewed (0)
  10. src/syscall/exec_freebsd_test.go

    		if err1 != 0 {
    			t.Errorf("failed to cleanup jail: %v", err)
    		}
    	})
    
    	return int(id), root
    }
    
    func TestJailAttach(t *testing.T) {
    	if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
    		jailed, err := syscall.SysctlUint32("security.jail.jailed")
    		if err != nil {
    			fmt.Fprintln(os.Stderr, err)
    			os.Exit(2)
    		}
    		if jailed != 1 {
    			t.Fatalf("jailed = %d, want 1", jailed)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 22 20:38:48 UTC 2023
    - 2.4K bytes
    - Viewed (0)
Back to top