Skip to contentSkip to conversation

xfs/229: call on the test directory

PATCH In review Christoph Hellwig 3 participants 3 messages Nov 19, 2024 – Nov 21, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs/229: call on the test directory

xfs/229 operates on a directory that is forced to the data volume, but it calls _require_fs_space on $TEST_DIR which might point to the RT device when -d rtinherit is set.

Call _require_fs_space on $TDIR after it is create to check for the space actually used by the test.

---
 tests/xfs/229 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/xfs/229 +3 -1
index 9dae0f6496e9..3ac1f9401a1a 100755
@@ -24,7 +24,6 @@ _cleanup()
 # Import common functions.
 
 _require_test
-_require_fs_space $TEST_DIR 3200000
 
 TDIR="${TEST_DIR}/t_holes"
 NFILES="10"
@@ -39,6 +38,9 @@ mkdir ${TDIR}
 # that will affect other tests.
 _xfs_force_bdev data $TDIR
 
+# check for free space on the data volume even if rthinherit is set
+_require_fs_space $TDIR 3200000
+
 # Set the test directory extsize
 $XFS_IO_PROG -c "extsize ${EXTSIZE}" ${TDIR}
 
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Christoph Hellwig

xfs/229 operates on a directory that is forced to the data volume, but it calls _require_fs_space on $TEST_DIR which might point to the RT device when -d rtinherit is set.

Call _require_fs_space on $TDIR after it is create to check for the space actually used by the test.

Whoops, I missed that when I put in _xfs_force_bdev :(

--D

Quoted 30 lines
---
 tests/xfs/229 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/xfs/229 +3 -1
index 9dae0f6496e9..3ac1f9401a1a 100755
@@ -24,7 +24,6 @@ _cleanup()
 # Import common functions.
 
 _require_test
-_require_fs_space $TEST_DIR 3200000
 
 TDIR="${TEST_DIR}/t_holes"
 NFILES="10"
@@ -39,6 +38,9 @@ mkdir ${TDIR}
 # that will affect other tests.
 _xfs_force_bdev data $TDIR
 
+# check for free space on the data volume even if rthinherit is set
+_require_fs_space $TDIR 3200000
+
 # Set the test directory extsize
 $XFS_IO_PROG -c "extsize ${EXTSIZE}" ${TDIR}
 
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#2 lore raw
In reply to Christoph Hellwig
Quoted 5 lines · Christoph Hellwig

xfs/229 operates on a directory that is forced to the data volume, but it calls _require_fs_space on $TEST_DIR which might point to the RT device when -d rtinherit is set.

Call _require_fs_space on $TDIR after it is create to check for the

Commit message nit: create -> created
Otherwise it looks good.