mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
@@ -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.
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user