summaryrefslogtreecommitdiffstats
path: root/tests/ts/swapon/devname
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ts/swapon/devname')
-rwxr-xr-xtests/ts/swapon/devname4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ts/swapon/devname b/tests/ts/swapon/devname
index d62b9d9..f4f9c16 100755
--- a/tests/ts/swapon/devname
+++ b/tests/ts/swapon/devname
@@ -36,11 +36,11 @@ $TS_CMD_MKSWAP $DEVICE > /dev/null 2>> $TS_OUTPUT \
ts_device_has "TYPE" "swap" $DEVICE || ts_die "Cannot find swap on $DEVICE"
-$TS_CMD_SWAPON $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SWAPON $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG || ts_die "Swapon failed"
grep -q "^$DEVICE\b" /proc/swaps || ts_die "Cannot find $DEVICE in /proc/swaps"
-$TS_CMD_SWAPOFF $DEVICE
+$TS_CMD_SWAPOFF $DEVICE || ts_die "Swapoff failed"
# swapon/mkswap warns if system sets different permissions for loop devices
sed --in-place '/insecure permissions .*, 0660 suggested/d' $TS_OUTPUT