summaryrefslogtreecommitdiff
path: root/usr/src/test/net-tests
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2020-05-19 12:07:49 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2020-05-19 12:07:49 +0000
commit3817aef5460600089dfc2425a47c170ab4cce9e4 (patch)
tree73c5ac47d6ca43c532100c0f5e2d8e58f7f19728 /usr/src/test/net-tests
parentb0c683a03f7c07cd7ab962acc1dcfef6ba4f78a3 (diff)
parentd5b4c61b9474779079c9ef8650d04dd7c8207a06 (diff)
downloadillumos-joyent-release-20200521.tar.gz
[illumos-gate merge]release-20200521
commit d5b4c61b9474779079c9ef8650d04dd7c8207a06 12732 Update Intel microcode to 20200508 commit c61a1653a4d73dbc950dac7d96350fd6cb517486 12676 want better offloads for vnics 12677 simnet has bogus mi_tx_cksum_flags 12678 mac_tx() is too eager to emulate hardware offloads commit f13f199891d2a0440db0361743dd73527f565e89 12729 bootadm set-menu timeout crashes without timeout value commit c039d8138bcc82c8082abc5560e0293afb7994cf 12741 Fix "more then" typo in dlopen(3c) commit 109b65249647da8f2f4306cd9b3d2800b05fd59b 12744 gfx_private: bitmap_cons_clear 8-bit mode is using wrong color commit 3382f241dd77fdfc4a9c4b03092e328924cd0c65 12707 Port OpenZFS Coverity Fixes commit 0c268761780011e1de45099cf76b2ee464ea8f50 12733 loader: autoboot_timeout greater than 10 is not shown Conflicts: usr/src/boot/sys/boot/forth/menu.4th usr/src/pkg/manifests/system-test-nettest.mf usr/src/test/net-tests/config/Makefile usr/src/test/net-tests/runfiles/default.run usr/src/test/net-tests/tests/forwarding/README usr/src/test/net-tests/tests/forwarding/ip_forwarding.ksh usr/src/test/net-tests/tests/net_common.ksh usr/src/uts/common/io/mac/mac.c usr/src/uts/common/io/mac/mac_client.c usr/src/uts/common/io/mac/mac_sched.c usr/src/uts/common/io/mac/mac_util.c usr/src/uts/common/io/simnet/simnet.c
Diffstat (limited to 'usr/src/test/net-tests')
-rw-r--r--usr/src/test/net-tests/config/Makefile2
-rw-r--r--usr/src/test/net-tests/runfiles/default.run2
-rw-r--r--usr/src/test/net-tests/tests/forwarding/README3
-rw-r--r--usr/src/test/net-tests/tests/forwarding/ip_forwarding.ksh19
-rw-r--r--usr/src/test/net-tests/tests/net_common.ksh45
5 files changed, 51 insertions, 20 deletions
diff --git a/usr/src/test/net-tests/config/Makefile b/usr/src/test/net-tests/config/Makefile
index c1d3f8c285..7151577083 100644
--- a/usr/src/test/net-tests/config/Makefile
+++ b/usr/src/test/net-tests/config/Makefile
@@ -20,7 +20,7 @@ ROOTOPTPKG = $(ROOT)/opt/net-tests
ROOTOPTPKGCFG = $(ROOT)/opt/net-tests/config
ROOTOPTPKGDIRS = $(ROOTOPTPKG) $(ROOTOPTPKGCFG)
FILES = $(CFGS:%=$(ROOTOPTPKGCFG)/%)
-$(FILES) := FILEMODE = 0555
+$(FILES) := FILEMODE = 0644
include $(SRC)/test/Makefile.com
diff --git a/usr/src/test/net-tests/runfiles/default.run b/usr/src/test/net-tests/runfiles/default.run
index c5c6c7dc91..cfc1a3df8d 100644
--- a/usr/src/test/net-tests/runfiles/default.run
+++ b/usr/src/test/net-tests/runfiles/default.run
@@ -16,7 +16,7 @@
[DEFAULT]
outputdir = /var/tmp/test_results
quiet = False
-timeout = 60
+timeout = 300
[/opt/net-tests/tests/forwarding]
tests = [
diff --git a/usr/src/test/net-tests/tests/forwarding/README b/usr/src/test/net-tests/tests/forwarding/README
index b291d5d45b..dbe8774a22 100644
--- a/usr/src/test/net-tests/tests/forwarding/README
+++ b/usr/src/test/net-tests/tests/forwarding/README
@@ -101,9 +101,6 @@ to router via mac-loopback.
Requirements
------------
-* These tests are currently SmartOS specific as they rely on simnet
- extensions only found in illumos-joyent.
-
* The client and server zones must provide `/usr/bin/socat`. It would
be nice to use netcat but our native version is missing features
like connection timeout.
diff --git a/usr/src/test/net-tests/tests/forwarding/ip_forwarding.ksh b/usr/src/test/net-tests/tests/forwarding/ip_forwarding.ksh
index d93260f86d..bf7a2255af 100644
--- a/usr/src/test/net-tests/tests/forwarding/ip_forwarding.ksh
+++ b/usr/src/test/net-tests/tests/forwarding/ip_forwarding.ksh
@@ -18,7 +18,7 @@
#
# ip_forwarding.ksh -bcflnpuv <client> <router> <server>
#
-# Where client, router, and server are the UUIDs of three native
+# Where client, router, and server are the names of three native
# zones. The user must create and start these zones; but other
# than that there is no special configuration required for them.
#
@@ -113,7 +113,7 @@ nt_rx_ip_cksum=0
nt_cleanup=1
nt_cleanup_only=0
-nt_tdirprefix=/tmp/${nt_tname}
+nt_tdirprefix=/var/tmp/${nt_tname}
nt_tdir=${nt_tdirprefix}.$$
nt_dfile=${nt_tdir}/${nt_tname}.data
nt_efile=${nt_tdir}/${nt_tname}-expected-sha1
@@ -230,9 +230,18 @@ if ((nt_cleanup_only == 1)); then
exit 0
fi
-mkdir $nt_tdir
-zlogin $nt_client mkdir $nt_tdir
-zlogin $nt_server mkdir $nt_tdir
+if ! mkdir $nt_tdir; then
+ fail "failed to mkdir $nt_tdir in GZ"
+fi
+dbg "created dir $nt_tdir in GZ"
+if ! zlogin $nt_client mkdir $nt_tdir; then
+ fail "failed to mkdir $nt_tdir in $nt_client"
+fi
+dbg "created dir $nt_tdir in $nt_client"
+if ! zlogin $nt_server mkdir $nt_tdir; then
+ fail "failed to mkdir $nt_tdir in $nt_server"
+fi
+dbg "created dir $nt_tdir in $nt_server"
trap cleanup ERR
diff --git a/usr/src/test/net-tests/tests/net_common.ksh b/usr/src/test/net-tests/tests/net_common.ksh
index 0742775193..b83cda8c97 100644
--- a/usr/src/test/net-tests/tests/net_common.ksh
+++ b/usr/src/test/net-tests/tests/net_common.ksh
@@ -178,10 +178,13 @@ function vnic_exists
fail "$0: incorrect number of args provided"
fi
- if dladm show-vnic -z $zone $name > /dev/null 2>&1; then
- typeset avid=$(dladm show-vnic -z $zone -p -o vid $name)
- typeset aover=$(dladm show-vnic -z $zone -p -o over $name)
- if (($avid == $vid)) && [ $aover == $over ]; then
+ if dladm show-vnic $name > /dev/null 2>&1; then
+ typeset avid=$(dladm show-vnic -p -o vid $name)
+ typeset aover=$(dladm show-vnic -p -o over $name)
+ typeset azone=$(dladm show-linkprop -cp zone -o value $name)
+ if (($avid == $vid)) && [ $aover == $over ] && \
+ [ $azone == $zone ]
+ then
return 0
else
return 1
@@ -211,14 +214,31 @@ function create_vnic
fi
dbg "creating VNIC: $vnic_info"
- if dladm create-vnic -t -p zone=$zone -l $over \
- $vid_opt $name > /dev/null 2>&1
+ if ! dladm create-vnic -t -l $over $vid_opt $name > /dev/null 2>&1
then
- dbg "created VNIC: $vnic_info"
+ maybe_fail "$err"
+ return 1
+ fi
+
+ dbg "created VNIC: $vnic_info"
+ if ! zonecfg -z $zone "add net; set physical=$name; end"; then
+ maybe_fail "failed to assign $name to $zone"
+ return 1
+ fi
+
+ dbg "assigned VNIC $name to $zone"
+ if zoneadm -z $zone reboot; then
+ dbg "rebooted $zone"
+ #
+ # Make sure the vnic is visible before returning. Without this
+ # a create_addr command following immediately afterwards could
+ # fail because the zone is up but the vnic isn't visible yet.
+ #
+ sleep 1
return 0
fi
- maybe_fail "$err"
+ maybe_fail "failed to reboot $zone"
}
function delete_vnic
@@ -235,8 +255,13 @@ function delete_vnic
fi
dbg "assigning VNIC $name from $zone to GZ"
- if ! dladm set-linkprop -t -z $zone -p zone=global $name; then
- maybe_fail "$err1"
+
+ if ! zonecfg -z $zone "remove net physical=$name"; then
+ maybe_fail "failed to remove $name from $zone"
+ return 1
+ fi
+ if ! zoneadm -z $zone reboot; then
+ maybe_fail "failed to reboot $zone"
return 1
fi