mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Merge pull request #2054 from avagin:gvisor-test
PiperOrigin-RevId: 298951909
This commit is contained in:
@@ -66,13 +66,12 @@ func (tc TestCase) Args() []string {
|
||||
}
|
||||
if tc.benchmark {
|
||||
return []string{
|
||||
fmt.Sprintf("%s=^$", filterTestFlag),
|
||||
fmt.Sprintf("%s=^%s$", filterBenchmarkFlag, tc.Name),
|
||||
fmt.Sprintf("%s=", filterTestFlag),
|
||||
}
|
||||
}
|
||||
return []string{
|
||||
fmt.Sprintf("%s=^%s$", filterTestFlag, tc.FullName()),
|
||||
fmt.Sprintf("%s=^$", filterBenchmarkFlag),
|
||||
fmt.Sprintf("%s=%s", filterTestFlag, tc.FullName()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -147,6 +146,8 @@ func ParseTestCases(testBin string, benchmarks bool, extraArgs ...string) ([]Tes
|
||||
return nil, fmt.Errorf("could not enumerate gtest benchmarks: %v\nstderr\n%s", err, exitErr.Stderr)
|
||||
}
|
||||
|
||||
out = []byte(strings.Trim(string(out), "\n"))
|
||||
|
||||
// Parse benchmark output.
|
||||
for _, line := range strings.Split(string(out), "\n") {
|
||||
// Strip comments.
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace {
|
||||
|
||||
TEST(TuntapHostInetTest, NoNetTun) {
|
||||
SKIP_IF(!IsRunningOnGvisor());
|
||||
SKIP_IF(!IsRunningWithHostinet());
|
||||
|
||||
struct stat statbuf;
|
||||
ASSERT_THAT(stat("/dev/net/tun", &statbuf), SyscallFailsWithErrno(ENOENT));
|
||||
|
||||
Reference in New Issue
Block a user