From: Darrick J. Wong Date: Wed, 20 Mar 2019 00:45:07 +0000 (-0700) Subject: generic/454: stop the test if we run out of space X-Git-Tag: v2022.05.01~1220 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=1321879c826e346e0dd24c060ad5c4d5b95b27cb;p=users%2Fhch%2Fxfstests-dev.git generic/454: stop the test if we run out of space Certain filesystems (ext4 w/ 1k block size) can run out of space while running this test because they have very limited xattr storage capabilities. If we run out of space while setting an attr, don't bother continuing the test. Signed-off-by: Darrick J. Wong Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/tests/generic/454 b/tests/generic/454 index 4a0936c5d..01986d6be 100755 --- a/tests/generic/454 +++ b/tests/generic/454 @@ -48,7 +48,12 @@ setf() { key="$(echo -e "$1")" value="$2" - $SETFATTR_PROG -n "user.${key}" -v "${value}" "${testfile}" + $SETFATTR_PROG -n "user.${key}" -v "${value}" "${testfile}" > $tmp.output 2>&1 + if [ $? -ne 0 ]; then + grep -q 'No space left on device' $tmp.output && \ + _notrun "ran out of space" + cat $tmp.output + fi echo "Storing ${key} ($(hexbytes "${key}")) -> ${value}" >> $seqres.full }