test/syscalls: run tests in the single thread mode

It allows us to avoid side effects on forking new processes.

PiperOrigin-RevId: 568391853
This commit is contained in:
Andrei Vagin
2023-09-25 19:53:38 -07:00
committed by gVisor bot
parent e81e0c72a7
commit 485de2f6a7
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -33,6 +33,9 @@ var (
// filterBenchmarkFlag is the flag that will run specified benchmarks.
filterBenchmarkFlag = "--benchmark_filter"
// TestFlags is the flags that are set for all tests.
TestFlags = []string{}
)
// TestCase is a single gtest test case.
+2
View File
@@ -159,6 +159,7 @@ func runTestCaseNative(testBin string, tc *gtest.TestCase, args []string, t *tes
args = tc.Args()
}
args = append(args, gtest.TestFlags...)
cmd := exec.Command(testBin, args...)
cmd.Env = env
cmd.Stdout = os.Stdout
@@ -532,6 +533,7 @@ func runTestCaseRunsc(testBin string, tc *gtest.TestCase, args []string, t *test
if args == nil {
args = tc.Args()
}
args = append(args, gtest.TestFlags...)
var spec *specs.Spec
if *fusefs {
fuseServer, err := testutil.FindFile("test/runner/fuse/fuse")