From 67b4a9ea173b78fa5ce6be471891a433e629e097 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Thu, 15 Aug 2013 10:25:19 +0200 Subject: [PATCH] testsuite: fixed network interface names --- test/TEST-10-RAID/test.sh | 2 +- test/TEST-20-NFS/server-init.sh | 9 +++++---- test/TEST-20-NFS/test.sh | 5 ++--- test/TEST-30-ISCSI/server-init.sh | 5 +++-- test/TEST-40-NBD/server-init.sh | 5 +++-- test/TEST-50-MULTINIC/server-init.sh | 7 ++++--- 6 files changed, 18 insertions(+), 15 deletions(-) diff --git a/test/TEST-10-RAID/test.sh b/test/TEST-10-RAID/test.sh index a2226cd..b17e912 100755 --- a/test/TEST-10-RAID/test.sh +++ b/test/TEST-10-RAID/test.sh @@ -82,7 +82,7 @@ test_setup() { inst_hook emergency 000 ./hard-off.sh inst ./cryptroot-ask.sh /sbin/cryptroot-ask mkdir -p $initdir/etc - echo "luks-$ID_FS_UUID /dev/md0 /etc/key" > $initdir/etc/crypttab + echo "testluks UUID=$ID_FS_UUID /etc/key" > $initdir/etc/crypttab #echo "luks-$ID_FS_UUID /dev/md0 none" > $initdir/etc/crypttab echo -n "test" > $initdir/etc/key inst_simple ./99-idesymlinks.rules /etc/udev/rules.d/99-idesymlinks.rules diff --git a/test/TEST-20-NFS/server-init.sh b/test/TEST-20-NFS/server-init.sh index ac07fc2..b569bba 100755 --- a/test/TEST-20-NFS/server-init.sh +++ b/test/TEST-20-NFS/server-init.sh @@ -10,10 +10,11 @@ echo "made it to the rootfs!" echo server > /proc/sys/kernel/hostname ip addr add 127.0.0.1/8 dev lo ip link set lo up -ip addr add 192.168.50.1/24 dev eth0 -ip addr add 192.168.50.2/24 dev eth0 -ip addr add 192.168.50.3/24 dev eth0 -ip link set eth0 up +ip link set dev eth0 name ens3 +ip addr add 192.168.50.1/24 dev ens3 +ip addr add 192.168.50.2/24 dev ens3 +ip addr add 192.168.50.3/24 dev ens3 +ip link set ens3 up echo > /dev/watchdog modprobe af_packet echo > /dev/watchdog diff --git a/test/TEST-20-NFS/test.sh b/test/TEST-20-NFS/test.sh index bd3cd3f..4f21d45 100755 --- a/test/TEST-20-NFS/test.sh +++ b/test/TEST-20-NFS/test.sh @@ -8,7 +8,6 @@ KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures #DEBUGFAIL="rd.shell" #SERIAL="tcp:127.0.0.1:9999" -SERIAL="null" run_server() { # Start server first @@ -21,7 +20,7 @@ run_server() { -display none \ -net nic,macaddr=52:54:00:12:34:56,model=e1000 \ -net socket,listen=127.0.0.1:12320 \ - -serial $SERIAL \ + -serial ${SERIAL:-null} \ -watchdog i6300esb -watchdog-action poweroff \ -kernel /boot/vmlinuz-$KVERSION \ -append "rd.debug loglevel=77 root=/dev/sda rootfstype=ext3 rw console=ttyS0,115200n81 selinux=0" \ @@ -152,7 +151,7 @@ test_nfsv3() { 52:54:00:12:34:05 "root=dhcp" 192.168.50.1 wsize=4096 || return 1 client_test "NFSv3 Bridge Customized root=dhcp DHCP path,options" \ - 52:54:00:12:34:05 "root=dhcp bridge=foobr0:eth0" 192.168.50.1 wsize=4096 || return 1 + 52:54:00:12:34:05 "root=dhcp bridge=foobr0:ens3" 192.168.50.1 wsize=4096 || return 1 client_test "NFSv3 root=dhcp DHCP IP:path,options" \ 52:54:00:12:34:06 "root=dhcp" 192.168.50.2 wsize=4096 || return 1 diff --git a/test/TEST-30-ISCSI/server-init.sh b/test/TEST-30-ISCSI/server-init.sh index 091f4ee..4bdd5e3 100755 --- a/test/TEST-30-ISCSI/server-init.sh +++ b/test/TEST-30-ISCSI/server-init.sh @@ -9,8 +9,9 @@ echo "made it to the rootfs!" echo server > /proc/sys/kernel/hostname ip addr add 127.0.0.1/8 dev lo ip link set lo up -ip addr add 192.168.50.1/24 dev eth0 -ip link set eth0 up +ip link set dev eth0 name ens3 +ip addr add 192.168.50.1/24 dev ens3 +ip link set ens3 up >/var/lib/dhcpd/dhcpd.leases chmod 777 /var/lib/dhcpd/dhcpd.leases dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases diff --git a/test/TEST-40-NBD/server-init.sh b/test/TEST-40-NBD/server-init.sh index 5e8d56e..56012d2 100755 --- a/test/TEST-40-NBD/server-init.sh +++ b/test/TEST-40-NBD/server-init.sh @@ -9,8 +9,9 @@ echo "made it to the rootfs!" echo server > /proc/sys/kernel/hostname ip addr add 127.0.0.1/8 dev lo ip link set lo up -ip addr add 192.168.50.1/24 dev eth0 -ip link set eth0 up +ip link set dev eth0 name ens3 +ip addr add 192.168.50.1/24 dev ens3 +ip link set ens3 up modprobe af_packet nbd-server 2000 /dev/sdb -C /dev/null nbd-server 2001 /dev/sdc -C /dev/null diff --git a/test/TEST-50-MULTINIC/server-init.sh b/test/TEST-50-MULTINIC/server-init.sh index 5a8359b..88ef212 100755 --- a/test/TEST-50-MULTINIC/server-init.sh +++ b/test/TEST-50-MULTINIC/server-init.sh @@ -52,8 +52,9 @@ linkup() { >/dev/watchdog ip addr add 127.0.0.1/8 dev lo linkup lo -ip addr add 192.168.50.1/24 dev eth0 -linkup eth0 +ip link set dev eth0 name ens3 +ip addr add 192.168.50.1/24 dev ens3 +linkup ens3 >/dev/watchdog modprobe af_packet > /dev/watchdog @@ -86,7 +87,7 @@ chmod 777 /var/lib/dhcpd/dhcpd.leases dhcpd -cf /etc/dhcpd.conf -lf /var/lib/dhcpd/dhcpd.leases #echo -n 'V' > /dev/watchdog #sh -i -#tcpdump -i eth0 +#tcpdump -i ens3 # Wait forever for the VM to die echo "Serving NFS mounts" while :; do -- 2.7.4