summaryrefslogtreecommitdiff
path: root/units/stress
diff options
authorBetty Lin <betty.lin@canonical.com>2021-09-15 11:15:26 +0800
committerBetty Lin <betty.lin@canonical.com>2021-09-23 10:37:56 +0800
commit879b7898cacdc30331ef7fe77b4ebb906a92d314 (patch)
tree73c1e1c905ab35c942408582dc59bbe7c746f231 /units/stress
parent7e6a412cf72fab51b113c712bc37b98d1481f0f8 (diff)
add paramters for stress-ng
Add "--skip": silence messages that report that a stressor has been skipped because it requires features not supported by the system Add "-v": the request from SWE for debugging Add error code 3(no resource) and 4(not implemented) to a success run
Diffstat (limited to 'units/stress')
-rw-r--r--units/stress/stress-ng.pxu9
1 files changed, 8 insertions, 1 deletions
diff --git a/units/stress/stress-ng.pxu b/units/stress/stress-ng.pxu
index 8dd6853..adca084 100644
--- a/units/stress/stress-ng.pxu
+++ b/units/stress/stress-ng.pxu
@@ -30,4 +30,11 @@ estimated_duration: 1200.0
environ: STRESS_NG_CLASSES_TIMEOUT
command:
cd /var/tmp || exit $?
- stress-ng --sequential 0 --class {stress-ng-class} --timeout "${{STRESS_NG_CLASSES_TIMEOUT:-30}}"
+ stress-ng --sequential 0 --class {stress-ng-class} --timeout "${{STRESS_NG_CLASSES_TIMEOUT:-30}}" --skip-silent --verbose
+ # Error code definition - 3(no resource), 4(not implemented)
+ EXIT_CODE=$?
+ echo "EXIT_CODE="$EXIT_CODE
+ case $EXIT_CODE in
+ 0|3|4) exit 0;;
+ *) exit 1;;
+ esac