diff --git a/tests/tests/test_host_kdump.sh b/tests/tests/test_host_kdump.sh index 6615560..10bd0ae 100755 --- a/tests/tests/test_host_kdump.sh +++ b/tests/tests/test_host_kdump.sh @@ -17,7 +17,7 @@ if [ ! -v DEVICE_IP ]; then echo "Must define DEVICE_IP" - exit -13 + exit -1 fi echo "Installing linux-crashdump and rebooting" @@ -30,7 +30,7 @@ fi ssh ubuntu@$DEVICE_IP sudo systemctl reboot if [ $? != 0 ]; then echo "Can't reboot" - exit -2 + exit -1 fi sleep 15 @@ -40,11 +40,11 @@ cnt=0 until ssh ubuntu@$DEVICE_IP ls &> /dev/null; do sleep 1; cnt=$(expr $cnt + 1); if [ $cnt -gt 120 ]; then break; fi; done if [ $cnt -gt 120 ]; then echo "Timed out waiting for $DEVICE_IP to come back up ($cnt)" - exit -3 + exit -1 fi if [ $cnt == 0 ]; then echo "$DEVICE_IP came back too quickly" - exit -4 + exit -1 fi echo "System came back up, printing out useful debug info" @@ -52,20 +52,20 @@ echo "System came back up, printing out useful debug info" ssh ubuntu@$DEVICE_IP sudo kdump-config show if [ $? != 0 ]; then echo "Failed getting kdump config" - exit -5 + exit -1 fi ssh ubuntu@$DEVICE_IP cat /proc/cmdline if [ $? != 0 ]; then echo "Failed getting cmd line" - exit -6 + exit -1 fi # Get crash directory before to compare later CRASH_DIR_BEFORE="$(ssh ubuntu@$DEVICE_IP ls /var/crash)" if [ $? != 0 ]; then echo "Failed getting crash directory" - exit -7 + exit -1 fi echo "Crashing system" @@ -78,18 +78,18 @@ cnt=0 until ssh ubuntu@$DEVICE_IP ls &> /dev/null; do sleep 1; cnt=$(expr $cnt + 1); if [ $cnt -gt 120 ]; then break; fi; done if [ $cnt -gt 120 ]; then echo "Timed out waiting for $DEVICE_IP to come back up ($cnt)" - exit -9 + exit -1 fi if [ $cnt == 0 ]; then echo "$DEVICE_IP came back too quickly" - exit -10 + exit -1 fi echo "System came back up" CRASH_DIR_AFTER="$(ssh ubuntu@$DEVICE_IP ls /var/crash)" if [ $? != 0 ]; then echo "Failed getting crash directory" - exit -11 + exit -1 fi echo Before crash directory listing: $CRASH_DIR_BEFORE @@ -98,7 +98,7 @@ echo After crash directory listing: $CRASH_DIR_AFTER # Verifyng crash directory are not the same (extra entry should be in place) if [ "$CRASH_DIR_BEFORE" == "$CRASH_DIR_AFTER" ]; then echo "Crash directories are the same" - exit -12 + exit -1 fi echo "Kdump Successfully Performed" diff --git a/tests/tests/test_host_kexec.sh b/tests/tests/test_host_kexec.sh index 5f95d6a..deebe2d 100755 --- a/tests/tests/test_host_kexec.sh +++ b/tests/tests/test_host_kexec.sh @@ -17,7 +17,7 @@ if [ ! -v DEVICE_IP ]; then echo "Must define DEVICE_IP" - exit -13 + exit -1 fi echo "Getting information for kexec call" @@ -35,20 +35,20 @@ fi ssh ubuntu@$DEVICE_IP ls $INITRD > /dev/null if [ $? != 0 ]; then echo "Can't find $INITRD" - exit -2 + exit -1 fi CMDLINE="$(ssh ubuntu@$DEVICE_IP cat /proc/cmdline)" if [ $? != 0 ]; then echo "Failed getting command line" - exit -3 + exit -1 fi echo "Calling kexec: ssh ubuntu@$DEVICE_IP sudo kexec -l $KERNEL --initrd=$INITRD --command-line=\"$CMDLINE\"" ssh ubuntu@$DEVICE_IP sudo kexec -l $KERNEL --initrd=$INITRD --command-line=\"$CMDLINE\" if [ $? != 0 ]; then echo "Failed kexec load: ssh ubuntu@$DEVICE_IP sudo kexec -l $KERNEL --initrd=$INITRD --command-line=\"$CMDLINE\"" - exit -4 + exit -1 fi echo "Running kexec -e in background" @@ -60,11 +60,11 @@ cnt=0 until ssh ubuntu@$DEVICE_IP ls &> /dev/null; do sleep 1; cnt=$(expr $cnt + 1); if [ $cnt -gt 120 ]; then break; fi; done if [ $cnt -gt 120 ]; then echo "Timed out waiting for $DEVICE_IP to come back up ($cnt)" - exit -5 + exit -1 fi if [ $cnt == 0 ]; then echo "$DEVICE_IP came back too quickly" - exit -6 + exit -1 fi echo "Kexec Successfully Performed"