From eeb23531ebef4fc44af317b4e4a8834c8b069dd9 Mon Sep 17 00:00:00 2001 From: Peter Johnston Date: Mon, 7 Dec 2020 08:42:09 -0800 Subject: Support icmpv6 transport protocol PiperOrigin-RevId: 346101076 --- pkg/test/testutil/testutil.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'pkg') 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 { -- cgit v1.2.3