summaryrefslogtreecommitdiffhomepage
path: root/pkg/test/testutil/testutil.go
diff options
context:
space:
mode:
authorPeter Johnston <peterjohnston@google.com>2020-12-07 08:42:09 -0800
committergVisor bot <gvisor-bot@google.com>2020-12-07 08:44:44 -0800
commiteeb23531ebef4fc44af317b4e4a8834c8b069dd9 (patch)
tree59e719d4f35672554d943608ed8ac318f18bdcd8 /pkg/test/testutil/testutil.go
parenta97ceec01bc464c9efa5d8140906c46f637e9002 (diff)
Support icmpv6 transport protocol
PiperOrigin-RevId: 346101076
Diffstat (limited to 'pkg/test/testutil/testutil.go')
-rw-r--r--pkg/test/testutil/testutil.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/pkg/test/testutil/testutil.go b/pkg/test/testutil/testutil.go
index 4e115718d..fdd416b5e 100644
--- a/pkg/test/testutil/testutil.go
+++ b/pkg/test/testutil/testutil.go
@@ -48,9 +48,10 @@ import (
)
var (
- checkpoint = flag.Bool("checkpoint", true, "control checkpoint/restore support")
- partition = flag.Int("partition", 1, "partition number, this is 1-indexed")
- totalPartitions = flag.Int("total_partitions", 1, "total number of partitions")
+ checkpoint = flag.Bool("checkpoint", true, "control checkpoint/restore support")
+ partition = flag.Int("partition", 1, "partition number, this is 1-indexed")
+ totalPartitions = flag.Int("total_partitions", 1, "total number of partitions")
+ isRunningWithHostNet = flag.Bool("hostnet", false, "whether test is running with hostnet")
)
// IsCheckpointSupported returns the relevant command line flag.
@@ -58,6 +59,11 @@ func IsCheckpointSupported() bool {
return *checkpoint
}
+// IsRunningWithHostNet returns the relevant command line flag.
+func IsRunningWithHostNet() bool {
+ return *isRunningWithHostNet
+}
+
// ImageByName mangles the image name used locally. This depends on the image
// build infrastructure in images/ and tools/vm.
func ImageByName(name string) string {