[PATCH 05/12] generic/454: stop the test if we run out of space

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

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 <darrick.wong@xxxxxxxxxx>
---
 tests/generic/454 |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)


diff --git a/tests/generic/454 b/tests/generic/454
index 4a0936c5..01986d6b 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
 }
 




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux