summaryrefslogtreecommitdiff
path: root/bin
diff options
authorJeff Lane <jeffrey.lane@canonical.com>2019-01-17 16:32:22 -0500
committerJeff Lane <jeffrey.lane@canonical.com>2019-01-17 16:32:22 -0500
commitdc61f21df99d38fe2dc2db249ec2d1552e8be82f (patch)
treeb9861408d62ed4d6208391229d54730ff9fe6daf /bin
parente66477fc6731cd21192b965360484b1ddb490bbd (diff)
improved output on stress-ng tests to better catch and explain timeout return codes. LP: #1812262
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cpu_stress9
-rwxr-xr-xbin/disk_stress_ng8
-rwxr-xr-xbin/memory_stress_ng8
3 files changed, 19 insertions, 6 deletions
diff --git a/bin/cpu_stress b/bin/cpu_stress
index abcb983..56fccee 100755
--- a/bin/cpu_stress
+++ b/bin/cpu_stress
@@ -62,9 +62,14 @@ if [ $result = "0" ] ; then
echo "* stress-ng CPU test passed!"
else
if [ $result = "137" ] ; then
- echo "* stress-ng CPU test timed out and was forcefully terminated!"
+ echo "** stress-ng CPU test timed out and SIGKILL was used to " \
+ "terminate the test (Error $result)!"
+ elif [ $return_code = "124" ] ; then
+ echo "* stress-ng CPU test timed out and was forcefully terminated " \
+ "(Error $result)!"
+ else
+ echo "* stress-ng CPU test failed with result $result"
fi
- echo "* stress-ng CPU test failed with result $result"
fi
echo "**********************************************************"
exit $result
diff --git a/bin/disk_stress_ng b/bin/disk_stress_ng
index 27db58f..9d8668e 100755
--- a/bin/disk_stress_ng
+++ b/bin/disk_stress_ng
@@ -245,8 +245,12 @@ run_stressor() {
fi
had_error=1
echo "*****************************************************************"
- if [ $return_code = "137" ] ; then
- echo "** stress-ng disk test timed out and was forcefully terminated!"
+ if [ $return_code = "124" ] ; then
+ echo "** stress-ng $stressor test timed out and was forcefully " \
+ "terminated! (Error $return_code)"
+ elif [ $return_code = "137" ] ; then
+ echo "** stress-ng $stressor test timed out and SIGKILL was used to " \
+ "terminate the test case! (Error $return_code)"
else
echo "** Error $return_code reported on stressor $stressor!)"
fi
diff --git a/bin/memory_stress_ng b/bin/memory_stress_ng
index 181404a..532349a 100755
--- a/bin/memory_stress_ng
+++ b/bin/memory_stress_ng
@@ -99,8 +99,12 @@ run_stressor() {
fi
had_error=1
echo "*****************************************************************"
- if [ $return_code = "137" ] ; then
- echo "** stress-ng memory test timed out and was forcefully terminated!"
+ if [ $return_code = "124" ] ; then
+ echo "** stress-ng $stressor timed out and was forcefully "
+ "terminated! (Error $return_code)"
+ elif [ $return_code = "137" ] ; then
+ echo "** stress-ng memory test timed out and SIGKILL was used to " \
+ "terminate the test case! (Error $return_code)"
else
echo "** Error $return_code reported on stressor $stressor!)"
fi