From 3be5c3b8327a07b7b9b62757b6e535ae20651fe8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Mon, 2 Oct 2023 18:17:01 +0200 Subject: [PATCH] swapon: (tests) abort test on failing commands MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Weißschuh --- tests/ts/swapon/devname | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ts/swapon/devname b/tests/ts/swapon/devname index d62b9d9d80..f4f9c16ca5 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 -- 2.47.2