summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Williams <neil.williams@linaro.org>2016-08-04 16:30:10 +0100
committerNeil Williams <neil.williams@linaro.org>2016-08-04 16:30:10 +0100
commitb3d91666b456ad285b14e2d8888bafe6eca2b952 (patch)
tree68f57b703de3570dd741e62a2598dc8459baef8a
parent34a03309ee0acff7d8b65ac00434a738d914ad40 (diff)
Remove assumptions about specific image output
Not all images use eth0 anymore and the output of ifconfig changes between images as well. Custom scripts for specific distributions are needed here. Change-Id: I74d8b2de23686a2d96da5499a849e4fd3e531404
-rwxr-xr-xlava-test-shell/multi-node/check_ip.pl70
-rwxr-xr-xlava-test-shell/multi-node/check_ip.sh12
-rwxr-xr-xlava-test-shell/multi-node/get_ip.sh6
-rw-r--r--lava-test-shell/multi-node/multinode01.yaml19
-rw-r--r--lava-test-shell/multi-node/multinode02.yaml27
-rw-r--r--lava-test-shell/multi-node/multinode03.yaml26
6 files changed, 14 insertions, 146 deletions
diff --git a/lava-test-shell/multi-node/check_ip.pl b/lava-test-shell/multi-node/check_ip.pl
deleted file mode 100755
index 613946b..0000000
--- a/lava-test-shell/multi-node/check_ip.pl
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-#
-
-=pod
-
-=head1 Name
-
-check_ip.pl - perl script to check IP addresses in the group per role
-
-=head1 Description
-
-Unlike the shell version F<check_ip.sh>, the perl version can accept an
-optional argument for the role and filter the group by that role. Only
-devices with the matching role will be checked.
-
-Without the optional argument, F<check_ip.pl> works in the same way as
-F<check_ip.sh>.
-
-F<check_ip.pl> requires only a minimal perl setup.
-
-=cut
-
-use strict;
-use warnings;
-use vars qw/ $role $group $line /;
-
-# accept the optional role argument
-$role = shift;
-
-# lava-group is tab separated
-for $line (`lava-group`) {
- chomp($line);
- if ($line eq "") {
- next;
- }
- $line =~ /(.*)\t.*/;
- if (defined $role and $line !~ /(.*)\t$role/) {
- next;
- }
- my $device = $1;
- $device =~ s/\s+//g;
- print "Testing $device from '$line'\n";
- # get the ipv4 for this device
- my $addr = `lava-network query $device ipv4`;
- if (not defined $addr) {
- next;
- }
- # cover debug usage.
- chomp($addr);
- $addr =~ s/<LAVA.*>//g;
- $addr =~ s/\s//g;
- $addr =~ s/\n//g;
- # strip off the prefix for ipv4
- $addr =~ s/^addr://;
- system("ping -c1 -W1 $addr");
-}
diff --git a/lava-test-shell/multi-node/check_ip.sh b/lava-test-shell/multi-node/check_ip.sh
deleted file mode 100755
index 1a9a1aa..0000000
--- a/lava-test-shell/multi-node/check_ip.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-set -e
-set -x
-echo "Testing all members in the group"
-for line in `lava-group | sed -e 's/\(.*\)\s.*/\1/'` ; do
- # get the ipv4 for this device
- STR=`lava-network query $line ipv4`
- # strip off the prefix for ipv4
- DUT=`echo $STR | sed -e 's/<LAVA.*>//g' | tr -d '\n' | sed -e 's/\s//g' | sed -e 's/^addr://'`
- ping -c1 -W1 ${DUT}
-done
diff --git a/lava-test-shell/multi-node/get_ip.sh b/lava-test-shell/multi-node/get_ip.sh
deleted file mode 100755
index ed30c5c..0000000
--- a/lava-test-shell/multi-node/get_ip.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-set -e
-set -x
-ifconfig|grep "inet addr"|grep -v "127.0.0.1"|cut -d: -f2|cut -d' ' -f1
-
diff --git a/lava-test-shell/multi-node/multinode01.yaml b/lava-test-shell/multi-node/multinode01.yaml
index fe5d052..5202f2a 100644
--- a/lava-test-shell/multi-node/multinode01.yaml
+++ b/lava-test-shell/multi-node/multinode01.yaml
@@ -1,7 +1,7 @@
metadata:
format: Lava-Test Test Definition 1.0
name: multinode-basic-level
- description: "Basic (level 1) MultiNode test commands for Linux Linaro ubuntu Images"
+ description: "Basic (level 1) MultiNode test commands for Linux Images"
maintainer:
- neil.williams@linaro.org
os:
@@ -15,11 +15,9 @@ metadata:
- beaglebone-black
- beagle-xm
-params:
- # the helper gets in the way here
- # lava-network needs to be replaced by a custom script
- # which understands the image, not rely on a generic helper.
- iface: eth0
+# Dropped 'get_ip' and 'check_ip' as these are not able to keep up with
+# changes in the output of the relevant commands. Custom scripts are
+# needed which understand the tools within the target image.
run:
steps:
@@ -31,12 +29,3 @@ run:
- lava-test-case linux-linaro-ubuntu-netstat --shell netstat -an
- lava-test-case linux-linaro-ubuntu-ifconfig-dump --shell ifconfig -a
- lava-test-case linux-linaro-ubuntu-route-dump-a --shell route
- - lava-test-case linux-linaro-ubuntu-route-ifconfig-up-lo --shell ifconfig lo up
- - lava-test-case linux-linaro-ubuntu-route-dump-b --shell route
- - lava-test-case linux-linaro-ubuntu-route-ifconfig-up --shell ifconfig $iface up
- - lava-test-case multinode-send-network --shell lava-send network hostname=$(hostname) fqdn=$(hostname -f) ip=$(./lava-test-shell/multi-node/get_ip.sh)
- - lava-test-case linux-linaro-ubuntu-route-ifconfig-down --shell ifconfig $iface down
- - lava-test-case linux-linaro-ubuntu-route-dhclient --shell dhclient -v $iface
- - lava-test-case linux-linaro-ubuntu-route-dump-c --shell route
- - lava-test-case multinode-get-network --shell lava-wait network
- - lava-test-case multinode-lava-network --shell ./lava-test-shell/multi-node/check_ip.sh
diff --git a/lava-test-shell/multi-node/multinode02.yaml b/lava-test-shell/multi-node/multinode02.yaml
index 89a0f3f..a66cfd8 100644
--- a/lava-test-shell/multi-node/multinode02.yaml
+++ b/lava-test-shell/multi-node/multinode02.yaml
@@ -1,7 +1,7 @@
metadata:
format: Lava-Test Test Definition 1.0
name: multinode-intermediate-level
- description: "Intermediate (level 2) MultiNode test commands for Linux Linaro ubuntu Images"
+ description: "Intermediate (level 2) MultiNode test commands for Linux Images"
maintainer:
- neil.williams@linaro.org
os:
@@ -15,6 +15,10 @@ metadata:
- beaglebone-black
- beagle-xm
+# Dropped 'get_ip' and 'check_ip' as these are not able to keep up with
+# changes in the output of the relevant commands. Custom scripts are
+# needed which understand the tools within the target image.
+
run:
steps:
- lava-test-case multinode-role-output --shell lava-role
@@ -24,28 +28,7 @@ run:
- lava-test-case linux-linaro-ubuntu-netstat --shell netstat -an
- lava-test-case linux-linaro-ubuntu-ifconfig-dump --shell ifconfig -a
- lava-test-case linux-linaro-ubuntu-route-dump-a --shell route
- - lava-test-case linux-linaro-ubuntu-route-ifconfig-up-lo --shell ifconfig lo up
- - lava-test-case linux-linaro-ubuntu-route-dump-b --shell route
- - lava-test-case linux-linaro-ubuntu-route-ifconfig-up --shell ifconfig eth0 up
- - lava-test-case multinode-network --shell lava-network broadcast eth0
- lava-test-case multinode-wait-all --shell lava-wait-all sending
- - lava-test-case multinode-get-network --shell lava-network collect eth0
- - lava-test-case multinode-lava-network-ipv4 --shell ./lava-test-shell/multi-node/check_ip.sh
- - lava-test-case multinode-lava-network2-ipv4 --shell ./lava-test-shell/multi-node/check_ip.pl
- - lava-test-case multinode-broadcast-ipv4 --shell lava-network query $(lava-self) ipv4
- - lava-test-case multinode-broadcast-ipv6 --shell lava-network query $(lava-self) ipv6
- - lava-test-case multinode-broadcast-netmask --shell lava-network query $(lava-self) netmask
- - lava-test-case multinode-broadcast-gateway --shell lava-network query $(lava-self) default-gateway
- - lava-test-case multinode-broadcast-hostname --shell lava-network query $(lava-self) hostname
- - lava-test-case multinode-broadcast-fqdn --shell lava-network query $(lava-self) hostname-full
- - lava-test-case multinode-broadcast-dns1 --shell lava-network query $(lava-self) dns_1
- - lava-test-case multinode-broadcast-dns2 --shell lava-network query $(lava-self) dns_2
- - lava-test-case multinode-broadcast-dns3 --shell lava-network query $(lava-self) dns_3
- - cat /tmp/lava_multi_node_network_cache.txt
- - lava-test-case network-cache --shell lava-network hosts /tmp/testfile
- - cat /tmp/testfile
- - lava-test-case network-alias-cache --shell lava-network alias-hosts /tmp/testfile-alias
- - cat /tmp/testfile-alias
- lava-test-case ntpdate-check --shell ntpdate-debian
- lava-test-case direct-update --shell apt-get update
- lava-test-case direct-install --shell apt-get -y install curl
diff --git a/lava-test-shell/multi-node/multinode03.yaml b/lava-test-shell/multi-node/multinode03.yaml
index ee5cfe5..cb54a70 100644
--- a/lava-test-shell/multi-node/multinode03.yaml
+++ b/lava-test-shell/multi-node/multinode03.yaml
@@ -1,7 +1,7 @@
metadata:
format: Lava-Test Test Definition 1.0
name: multinode-advanced-level
- description: "Advanced (level 3) MultiNode test commands for Linux Linaro ubuntu Images"
+ description: "Advanced (level 3) MultiNode test commands for Linux Images"
maintainer:
- neil.williams@linaro.org
os:
@@ -24,6 +24,10 @@ install:
- wget
- ntpdate
+# Dropped 'get_ip' and 'check_ip' as these are not able to keep up with
+# changes in the output of the relevant commands. Custom scripts are
+# needed which understand the tools within the target image.
+
run:
steps:
- lava-test-case multinode-role-output --shell lava-role
@@ -35,27 +39,7 @@ run:
- lava-test-case linux-linaro-ubuntu-route-dump-a --shell route
- lava-test-case linux-linaro-ubuntu-route-ifconfig-up-lo --shell ifconfig lo up
- lava-test-case linux-linaro-ubuntu-route-dump-b --shell route
- - lava-test-case linux-linaro-ubuntu-route-ifconfig-up --shell ifconfig eth0 up
- lava-test-case multinode-wait --shell lava-wait-all sending
- - lava-test-case multinode-network --shell lava-network broadcast eth0
- - lava-test-case multinode-get-network --shell lava-network collect eth0
- - lava-test-case realpath-check --shell realpath ./lava-test-shell/multi-node/check_ip.sh
- - lava-test-case multinode-lava-network-ipv4 --shell ./lava-test-shell/multi-node/check_ip.sh
- - lava-test-case multinode-lava-network2-ipv4 --shell ./lava-test-shell/multi-node/check_ip.pl
- - lava-test-case multinode-broadcast-ipv4 --shell lava-network query $(lava-self) ipv4
- - lava-test-case multinode-broadcast-ipv6 --shell lava-network query $(lava-self) ipv6
- - lava-test-case multinode-broadcast-netmask --shell lava-network query $(lava-self) netmask
- - lava-test-case multinode-broadcast-gateway --shell lava-network query $(lava-self) default-gateway
- - lava-test-case multinode-broadcast-hostname --shell lava-network query $(lava-self) hostname
- - lava-test-case multinode-broadcast-fqdn --shell lava-network query $(lava-self) hostname-full
- - lava-test-case multinode-broadcast-dns1 --shell lava-network query $(lava-self) dns_1
- - lava-test-case multinode-broadcast-dns2 --shell lava-network query $(lava-self) dns_2
- - lava-test-case multinode-broadcast-dns3 --shell lava-network query $(lava-self) dns_3
- - cat /tmp/lava_multi_node_network_cache.txt
- - lava-test-case network-cache --shell lava-network hosts /tmp/testfile
- - cat /tmp/testfile
- - lava-test-case network-alias-cache --shell lava-network alias-hosts /tmp/testfile-alias
- - cat /tmp/testfile-alias
- lava-test-case ntpdate-check --shell ntpdate-debian
- lava-test-case curl-http --shell curl -o img.tar.gz http://images.validation.linaro.org/lava-masters/dynamic/cubietruck/cbtruck_img.tar.gz
- lava-test-case tar-tgz --shell tar -tzf img.tar.gz