Skip to contentSkip to conversation

Add many missing _requires

PATCH In review Eric Sandeen 2 participants 14 messages Aug 25 – Aug 27

lore
Share & tools
lore
#0 lore raw

cover Add many missing _requires

Many tests take actions (chmod, chown, hardlink, mknod) which may not be supported by simpler filesystems. Often this is fine because other _require tests already cause the _notrun to occur, but this makes it all explicit.

Patch 1 simply removes some spurious "chmod" calls that do not act on the filesystem under test and AFAICT are not necessary.

#1 lore raw

PATCH 1/5 generic: remove chmod of $seqres.full file

This appears to be an historical artifact.

---
 tests/generic/379 | 3 ---
 tests/generic/384 | 3 ---
 2 files changed, 6 deletions(-)
tests/generic/379 +0 -3
index 4c7fc939..9e5889b9 100755
@@ -22,9 +22,6 @@ _cleanup()
 }
 
 
-cp /dev/null $seqres.full
-chmod ugo+rwx $seqres.full
-
 _require_scratch
 _require_quota
 _require_xfs_quota_foreign
tests/generic/384 +0 -3
index f2344380..69fe3695 100755
@@ -42,9 +42,6 @@ cat >$tmp.projid <<EOF
 test:1
 EOF
 
-cp /dev/null $seqres.full
-chmod a+rwx $seqres.full	# arbitrary users will write here
-
 _require_scratch
 _scratch_mkfs >/dev/null 2>&1
 _scratch_enable_pquota
Signature · 1 line
2.55.0
Reviewed-by on v1 1/5
#2 lore raw

Re: [PATCH 1/5] generic: remove chmod of $seqres.full file

Quoted 4 lines · Eric Sandeen

This appears to be an historical artifact.

---

Makes sense,

Quoted 36 lines
 tests/generic/379 | 3 ---
 tests/generic/384 | 3 ---
 2 files changed, 6 deletions(-)
tests/generic/379 +0 -3
index 4c7fc939..9e5889b9 100755
@@ -22,9 +22,6 @@ _cleanup()
 }
 
 
-cp /dev/null $seqres.full
-chmod ugo+rwx $seqres.full
-
 _require_scratch
 _require_quota
 _require_xfs_quota_foreign
tests/generic/384 +0 -3
index f2344380..69fe3695 100755
@@ -42,9 +42,6 @@ cat >$tmp.projid <<EOF
 test:1
 EOF
 
-cp /dev/null $seqres.full
-chmod a+rwx $seqres.full	# arbitrary users will write here
-
 _require_scratch
 _scratch_mkfs >/dev/null 2>&1
 _scratch_enable_pquota
Signature · 1 line
2.55.0
#3 lore raw

PATCH 2/5 Add _require_chmod as needed

In reply to Eric Sandeen
---
 tests/generic/093 | 1 +
 tests/generic/099 | 1 +
 tests/generic/184 | 1 +
 tests/generic/193 | 1 +
 tests/generic/230 | 1 +
 tests/generic/256 | 1 +
 tests/generic/314 | 1 +
 tests/generic/317 | 1 +
 tests/generic/355 | 1 +
 tests/generic/370 | 1 +
 tests/generic/375 | 1 +
 tests/generic/378 | 1 +
 tests/generic/444 | 1 +
 tests/generic/449 | 1 +
 tests/generic/462 | 1 +
 tests/generic/495 | 1 +
 tests/generic/514 | 1 +
 tests/generic/535 | 1 +
 tests/generic/572 | 1 +
 tests/generic/573 | 1 +
 tests/generic/581 | 1 +
 tests/generic/597 | 1 +
 tests/generic/603 | 1 +
 tests/generic/622 | 1 +
 tests/generic/636 | 1 +
 tests/generic/641 | 1 +
 tests/generic/673 | 1 +
 tests/generic/674 | 1 +
 tests/generic/675 | 1 +
 tests/generic/682 | 1 +
 tests/generic/683 | 1 +
 tests/generic/684 | 1 +
 tests/generic/685 | 1 +
 tests/generic/686 | 1 +
 tests/generic/687 | 1 +
 tests/generic/688 | 1 +
 tests/generic/698 | 1 +
 tests/generic/699 | 1 +
 tests/generic/726 | 1 +
 tests/generic/727 | 1 +
 tests/generic/792 | 1 +
 41 files changed, 41 insertions(+)
tests/generic/093 +1 -0
index 047cc821..9c3c855b 100755
@@ -29,6 +29,7 @@ filefilter()
 _require_test
 _require_attrs security
 _require_user
+_require_chmod
 _require_test_program "writemod"
 _require_command "$SETCAP_PROG" "setcap"
 _require_command "$GETCAP_PROG" "getcap"
tests/generic/099 +1 -0
index 980fd38f..cf54e96b 100755
@@ -47,6 +47,7 @@ _cleanup()
 #
 
 _require_test
+_require_chmod
 _require_runas
 
 _acl_setup_ids
tests/generic/184 +1 -0
index c82876d9..81663a65 100755
@@ -13,6 +13,7 @@ _begin_fstest metadata auto quick
 . ./common/filter
 
 _require_test
+_require_chmod
 _require_mknod
 
 rm -f $TEST_DIR/null
tests/generic/193 +1 -0
index ba557428..4e23f33d 100755
@@ -49,6 +49,7 @@ _filter_files()
 
 _require_test
 _require_user
+_require_chmod
 _require_chown
 
 test_root=$TEST_DIR/$seq.$$.root
tests/generic/230 +1 -0
index a8caf5a8..793e3a8f 100755
@@ -17,6 +17,7 @@ _begin_fstest auto quota quick
 _require_scratch
 _require_quota
 _require_user
+_require_chmod
 
 test_files()
 {
tests/generic/256 +1 -0
index fe8be022..eba2ba32 100755
@@ -19,6 +19,7 @@ _require_xfs_io_command "fpunch"
 _require_scratch
 _require_user
 _require_test
+_require_chmod
 
 testfile=$TEST_DIR/256.$$
 
tests/generic/314 +1 -0
index 65f7f9d9..b0fdd567 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick perms
 _require_test
 _require_user
 _require_chown
+_require_chmod
 _require_sgid_inheritance
 
 rm -rf $TEST_DIR/$seq-dir
tests/generic/317 +1 -0
index 1afec6a7..67dcbf91 100755
@@ -33,6 +33,7 @@ file=$SCRATCH_MNT/file1
 
 _require_scratch
 _require_user
+_require_chmod
 _require_ugid_map
 _require_userns
 _require_chown
tests/generic/355 +1 -0
index 6b4f7eba..443c17a3 100755
@@ -14,6 +14,7 @@ _begin_fstest auto quick perms
 
 _require_test
 _require_user
+_require_chmod
 _require_odirect
 _require_chown
 
tests/generic/370 +1 -0
index b5d942de..1b04eab1 100755
@@ -23,6 +23,7 @@ _fixed_by_fs_commit btrfs 03018e5d8508 \
     "btrfs: fix swap file activation failure due to extents that used to be shared"
 _fixed_by_fs_commit xfs 2d873efd174b "xfs: flush inodegc before swapon"
 
+_require_chmod
 _require_scratch_swapfile
 _require_scratch_reflink
 _require_cp_reflink
tests/generic/375 +1 -0
index eb675144..1e2ee334 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick acl perms
 . ./common/attr
 
 _require_test
+_require_chmod
 _require_runas
 _require_acls
 
tests/generic/378 +1 -0
index 5a6bd2b0..7c3a8d93 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick metadata
 
 _require_test
 _require_user
+_require_chmod
 _require_hardlinks
 
 # Setup testfile and its hardlink
tests/generic/444 +1 -0
index 31e0e43e..9094743e 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick acl perms
 . ./common/attr
 
 _require_test
+_require_chmod
 _require_runas
 _require_acls
 
tests/generic/449 +1 -0
index 9cf814ad..370b0db1 100755
@@ -19,6 +19,7 @@ _begin_fstest auto quick acl attr enospc
 # Modify as appropriate.
 _require_scratch
 _require_test
+_require_chmod
 _require_acls
 _require_attrs trusted
 
tests/generic/462 +1 -0
index 49b0df40..d886a26e 100755
@@ -19,6 +19,7 @@ _begin_fstest auto quick dax mmap
 
 # Modify as appropriate.
 _require_test
+_require_chmod
 _require_scratch_dax_mountopt "dax"
 _require_test_program "t_mmap_write_ro"
 # running by unpriviliged user is not necessary to reproduce
tests/generic/495 +1 -0
index dd18693b..4cc4c646 100755
@@ -12,6 +12,7 @@ _begin_fstest auto quick swap
 # Import common functions.
 . ./common/filter
 
+_require_chmod
 _require_scratch_swapfile
 _require_test_program mkswap
 _require_test_program swapon
tests/generic/514 +1 -0
index a2086a25..02537b21 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick clone
 
 _require_scratch_reflink
 _require_user
+_require_chmod
 
 _scratch_mkfs >>$seqres.full 2>&1
 _scratch_mount
tests/generic/535 +1 -0
index 9f552ee8..c8e193cc 100755
@@ -34,6 +34,7 @@ _cleanup()
 
 
 _require_scratch
+_require_chmod
 _require_dm_target flakey
 
 _scratch_mkfs >/dev/null 2>&1
tests/generic/572 +1 -0
index 80356760..97656c4b 100755
@@ -27,6 +27,7 @@ _cleanup()
 . ./common/verity
 
 _require_scratch_verity
+_require_chmod
 _disable_fsverity_signatures
 
 _scratch_mkfs_verity &>> $seqres.full
tests/generic/573 +1 -0
index d3f3296c..3f056b57 100755
@@ -24,6 +24,7 @@ _cleanup()
 
 _require_scratch_verity
 _require_user
+_require_chmod
 _require_chattr ia
 _disable_fsverity_signatures
 
tests/generic/581 +1 -0
index 2773c910..b36a1b89 100755
@@ -29,6 +29,7 @@ _cleanup()
 . ./common/encrypt
 
 _require_user
+_require_chmod
 _require_scratch_encryption -v 2
 
 _scratch_mkfs_encrypted &>> $seqres.full
tests/generic/597 +1 -0
index b97265fb..62f83cd6 100755
@@ -27,6 +27,7 @@ _cleanup()
 
 # Modify as appropriate.
 _require_test
+_require_chmod
 _require_sysctl_variable fs.protected_symlinks
 _require_sysctl_variable fs.protected_hardlinks
 _require_user fsgqa2
tests/generic/603 +1 -0
index 9b5e8245..853d3b16 100755
@@ -115,6 +115,7 @@ _require_setquota_project
 _require_quota
 _require_user
 _require_group
+_require_chmod
 
 _scratch_mkfs >$seqres.full 2>&1
 _scratch_enable_pquota
tests/generic/622 +1 -0
index e8ead300..cb0f5828 100755
@@ -77,6 +77,7 @@ _cleanup()
 # This test uses the shutdown command, so it has to use the scratch filesystem
 # rather than the test filesystem.
 _require_scratch
+_require_chmod
 _require_scratch_shutdown
 _require_metadata_journaling
 _require_xfs_io_command "pwrite"
tests/generic/636 +1 -0
index 2ae74310..402fc917 100755
@@ -13,6 +13,7 @@ _begin_fstest auto quick swap
 # Import common functions.
 . ./common/filter
 
+_require_chmod
 _require_scratch_swapfile
 _require_test_program mkswap
 _require_test_program swapon
tests/generic/641 +1 -0
index a6efcd4c..809204d9 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick swap collapse
 . ./common/filter
 
 _require_scratch
+_require_chmod
 _require_scratch_swapfile
 _require_test_program mkswap
 _require_test_program swapon
tests/generic/673 +1 -0
index 6c54ade8..832fdd72 100755
@@ -16,6 +16,7 @@ _begin_fstest auto clone quick perms
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_scratch_reflink
 
 _scratch_mkfs >> $seqres.full
tests/generic/674 +1 -0
index 41fbdeb7..e5a32782 100755
@@ -16,6 +16,7 @@ _begin_fstest auto clone quick perms dedupe
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_scratch_dedupe
 _require_xfs_io_command dedupe
 
tests/generic/675 +1 -0
index 87dfbdfe..e648182e 100755
@@ -17,6 +17,7 @@ _begin_fstest auto clone quick
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_command "$GETCAP_PROG" getcap
 _require_command "$SETCAP_PROG" setcap
 _require_scratch_reflink
tests/generic/682 +1 -0
index 6914a549..a3bb42ac 100755
@@ -23,6 +23,7 @@ _begin_fstest auto quick quota
 _require_quota
 _require_user
 _require_scratch
+_require_chmod
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/683 +1 -0
index 883905da..226d2758 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=falloc
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/684 +1 -0
index 9cdfe4ab..7595f58a 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=fpunch
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/685 +1 -0
index 55672550..aa7fc848 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=fzero
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/686 +1 -0
index a3fa8e06..03270a7d 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=finsert
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/687 +1 -0
index 0c4b09d2..cd564a7d 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=fcollapse
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/688 +1 -0
index 77db2946..1d16261d 100755
@@ -23,6 +23,7 @@ _cleanup()
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_command "$GETCAP_PROG" getcap
 _require_command "$SETCAP_PROG" setcap
 _require_xfs_io_command falloc
tests/generic/698 +1 -0
index 0029df90..a0cccfe7 100755
@@ -26,6 +26,7 @@ _fixed_by_kernel_commit 168f91289340 \
 	"fs: account for group membership"
 _require_scratch
 _require_chown
+_require_chmod
 _require_idmapped_mounts
 _require_test_program "vfs/mount-idmapped"
 _require_user fsgqa2
tests/generic/699 +1 -0
index 2a6f857d..6e94043f 100755
@@ -25,6 +25,7 @@ _require_extra_fs overlay
 
 _require_scratch
 _require_chown
+_require_chmod
 _require_idmapped_mounts
 _require_test_program "vfs/mount-idmapped"
 _require_user fsgqa2
tests/generic/726 +1 -0
index d2a2a2ce..a6c12133 100755
@@ -23,6 +23,7 @@ _begin_fstest auto fiexchange quick
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_xfs_io_command exchangerange
 _require_xfs_io_command startupdate
 _require_scratch
tests/generic/727 +1 -0
index 9551e47c..92d3743c 100755
@@ -24,6 +24,7 @@ _begin_fstest auto fiexchange quick
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_command "$GETCAP_PROG" getcap
 _require_command "$SETCAP_PROG" setcap
 _require_xfs_io_command exchangerange
tests/generic/792 +1 -0
index d1896728..c457ad6d 100755
@@ -22,6 +22,7 @@ _cleanup()
 . ./common/dmflakey
 
 _require_scratch
+_require_chmod
 _require_test_program unlink-fsync
 _require_dm_target flakey
 
Signature · 1 line
2.55.0
Reviewed-by on v1 2/5
#4 lore raw

Re: [PATCH 2/5] Add _require_chmod as needed

Quoted 2 lines · Eric Sandeen

---

Maybe we need a helper likes _require_posix_fs to filter out non-POSIX filesystems such as exFAT, NTFS, and CIFS etc :)

Quoted 539 lines
 tests/generic/093 | 1 +
 tests/generic/099 | 1 +
 tests/generic/184 | 1 +
 tests/generic/193 | 1 +
 tests/generic/230 | 1 +
 tests/generic/256 | 1 +
 tests/generic/314 | 1 +
 tests/generic/317 | 1 +
 tests/generic/355 | 1 +
 tests/generic/370 | 1 +
 tests/generic/375 | 1 +
 tests/generic/378 | 1 +
 tests/generic/444 | 1 +
 tests/generic/449 | 1 +
 tests/generic/462 | 1 +
 tests/generic/495 | 1 +
 tests/generic/514 | 1 +
 tests/generic/535 | 1 +
 tests/generic/572 | 1 +
 tests/generic/573 | 1 +
 tests/generic/581 | 1 +
 tests/generic/597 | 1 +
 tests/generic/603 | 1 +
 tests/generic/622 | 1 +
 tests/generic/636 | 1 +
 tests/generic/641 | 1 +
 tests/generic/673 | 1 +
 tests/generic/674 | 1 +
 tests/generic/675 | 1 +
 tests/generic/682 | 1 +
 tests/generic/683 | 1 +
 tests/generic/684 | 1 +
 tests/generic/685 | 1 +
 tests/generic/686 | 1 +
 tests/generic/687 | 1 +
 tests/generic/688 | 1 +
 tests/generic/698 | 1 +
 tests/generic/699 | 1 +
 tests/generic/726 | 1 +
 tests/generic/727 | 1 +
 tests/generic/792 | 1 +
 41 files changed, 41 insertions(+)
tests/generic/093 +1 -0
index 047cc821..9c3c855b 100755
@@ -29,6 +29,7 @@ filefilter()
 _require_test
 _require_attrs security
 _require_user
+_require_chmod
 _require_test_program "writemod"
 _require_command "$SETCAP_PROG" "setcap"
 _require_command "$GETCAP_PROG" "getcap"
tests/generic/099 +1 -0
index 980fd38f..cf54e96b 100755
@@ -47,6 +47,7 @@ _cleanup()
 #
 
 _require_test
+_require_chmod
 _require_runas
 
 _acl_setup_ids
tests/generic/184 +1 -0
index c82876d9..81663a65 100755
@@ -13,6 +13,7 @@ _begin_fstest metadata auto quick
 . ./common/filter
 
 _require_test
+_require_chmod
 _require_mknod
 
 rm -f $TEST_DIR/null
tests/generic/193 +1 -0
index ba557428..4e23f33d 100755
@@ -49,6 +49,7 @@ _filter_files()
 
 _require_test
 _require_user
+_require_chmod
 _require_chown
 
 test_root=$TEST_DIR/$seq.$$.root
tests/generic/230 +1 -0
index a8caf5a8..793e3a8f 100755
@@ -17,6 +17,7 @@ _begin_fstest auto quota quick
 _require_scratch
 _require_quota
 _require_user
+_require_chmod
 
 test_files()
 {
tests/generic/256 +1 -0
index fe8be022..eba2ba32 100755
@@ -19,6 +19,7 @@ _require_xfs_io_command "fpunch"
 _require_scratch
 _require_user
 _require_test
+_require_chmod
 
 testfile=$TEST_DIR/256.$$
 
tests/generic/314 +1 -0
index 65f7f9d9..b0fdd567 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick perms
 _require_test
 _require_user
 _require_chown
+_require_chmod
 _require_sgid_inheritance
 
 rm -rf $TEST_DIR/$seq-dir
tests/generic/317 +1 -0
index 1afec6a7..67dcbf91 100755
@@ -33,6 +33,7 @@ file=$SCRATCH_MNT/file1
 
 _require_scratch
 _require_user
+_require_chmod
 _require_ugid_map
 _require_userns
 _require_chown
tests/generic/355 +1 -0
index 6b4f7eba..443c17a3 100755
@@ -14,6 +14,7 @@ _begin_fstest auto quick perms
 
 _require_test
 _require_user
+_require_chmod
 _require_odirect
 _require_chown
 
tests/generic/370 +1 -0
index b5d942de..1b04eab1 100755
@@ -23,6 +23,7 @@ _fixed_by_fs_commit btrfs 03018e5d8508 \
     "btrfs: fix swap file activation failure due to extents that used to be shared"
 _fixed_by_fs_commit xfs 2d873efd174b "xfs: flush inodegc before swapon"
 
+_require_chmod
 _require_scratch_swapfile
 _require_scratch_reflink
 _require_cp_reflink
tests/generic/375 +1 -0
index eb675144..1e2ee334 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick acl perms
 . ./common/attr
 
 _require_test
+_require_chmod
 _require_runas
 _require_acls
 
tests/generic/378 +1 -0
index 5a6bd2b0..7c3a8d93 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick metadata
 
 _require_test
 _require_user
+_require_chmod
 _require_hardlinks
 
 # Setup testfile and its hardlink
tests/generic/444 +1 -0
index 31e0e43e..9094743e 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick acl perms
 . ./common/attr
 
 _require_test
+_require_chmod
 _require_runas
 _require_acls
 
tests/generic/449 +1 -0
index 9cf814ad..370b0db1 100755
@@ -19,6 +19,7 @@ _begin_fstest auto quick acl attr enospc
 # Modify as appropriate.
 _require_scratch
 _require_test
+_require_chmod
 _require_acls
 _require_attrs trusted
 
tests/generic/462 +1 -0
index 49b0df40..d886a26e 100755
@@ -19,6 +19,7 @@ _begin_fstest auto quick dax mmap
 
 # Modify as appropriate.
 _require_test
+_require_chmod
 _require_scratch_dax_mountopt "dax"
 _require_test_program "t_mmap_write_ro"
 # running by unpriviliged user is not necessary to reproduce
tests/generic/495 +1 -0
index dd18693b..4cc4c646 100755
@@ -12,6 +12,7 @@ _begin_fstest auto quick swap
 # Import common functions.
 . ./common/filter
 
+_require_chmod
 _require_scratch_swapfile
 _require_test_program mkswap
 _require_test_program swapon
tests/generic/514 +1 -0
index a2086a25..02537b21 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick clone
 
 _require_scratch_reflink
 _require_user
+_require_chmod
 
 _scratch_mkfs >>$seqres.full 2>&1
 _scratch_mount
tests/generic/535 +1 -0
index 9f552ee8..c8e193cc 100755
@@ -34,6 +34,7 @@ _cleanup()
 
 
 _require_scratch
+_require_chmod
 _require_dm_target flakey
 
 _scratch_mkfs >/dev/null 2>&1
tests/generic/572 +1 -0
index 80356760..97656c4b 100755
@@ -27,6 +27,7 @@ _cleanup()
 . ./common/verity
 
 _require_scratch_verity
+_require_chmod
 _disable_fsverity_signatures
 
 _scratch_mkfs_verity &>> $seqres.full
tests/generic/573 +1 -0
index d3f3296c..3f056b57 100755
@@ -24,6 +24,7 @@ _cleanup()
 
 _require_scratch_verity
 _require_user
+_require_chmod
 _require_chattr ia
 _disable_fsverity_signatures
 
tests/generic/581 +1 -0
index 2773c910..b36a1b89 100755
@@ -29,6 +29,7 @@ _cleanup()
 . ./common/encrypt
 
 _require_user
+_require_chmod
 _require_scratch_encryption -v 2
 
 _scratch_mkfs_encrypted &>> $seqres.full
tests/generic/597 +1 -0
index b97265fb..62f83cd6 100755
@@ -27,6 +27,7 @@ _cleanup()
 
 # Modify as appropriate.
 _require_test
+_require_chmod
 _require_sysctl_variable fs.protected_symlinks
 _require_sysctl_variable fs.protected_hardlinks
 _require_user fsgqa2
tests/generic/603 +1 -0
index 9b5e8245..853d3b16 100755
@@ -115,6 +115,7 @@ _require_setquota_project
 _require_quota
 _require_user
 _require_group
+_require_chmod
 
 _scratch_mkfs >$seqres.full 2>&1
 _scratch_enable_pquota
tests/generic/622 +1 -0
index e8ead300..cb0f5828 100755
@@ -77,6 +77,7 @@ _cleanup()
 # This test uses the shutdown command, so it has to use the scratch filesystem
 # rather than the test filesystem.
 _require_scratch
+_require_chmod
 _require_scratch_shutdown
 _require_metadata_journaling
 _require_xfs_io_command "pwrite"
tests/generic/636 +1 -0
index 2ae74310..402fc917 100755
@@ -13,6 +13,7 @@ _begin_fstest auto quick swap
 # Import common functions.
 . ./common/filter
 
+_require_chmod
 _require_scratch_swapfile
 _require_test_program mkswap
 _require_test_program swapon
tests/generic/641 +1 -0
index a6efcd4c..809204d9 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick swap collapse
 . ./common/filter
 
 _require_scratch
+_require_chmod
 _require_scratch_swapfile
 _require_test_program mkswap
 _require_test_program swapon
tests/generic/673 +1 -0
index 6c54ade8..832fdd72 100755
@@ -16,6 +16,7 @@ _begin_fstest auto clone quick perms
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_scratch_reflink
 
 _scratch_mkfs >> $seqres.full
tests/generic/674 +1 -0
index 41fbdeb7..e5a32782 100755
@@ -16,6 +16,7 @@ _begin_fstest auto clone quick perms dedupe
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_scratch_dedupe
 _require_xfs_io_command dedupe
 
tests/generic/675 +1 -0
index 87dfbdfe..e648182e 100755
@@ -17,6 +17,7 @@ _begin_fstest auto clone quick
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_command "$GETCAP_PROG" getcap
 _require_command "$SETCAP_PROG" setcap
 _require_scratch_reflink
tests/generic/682 +1 -0
index 6914a549..a3bb42ac 100755
@@ -23,6 +23,7 @@ _begin_fstest auto quick quota
 _require_quota
 _require_user
 _require_scratch
+_require_chmod
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/683 +1 -0
index 883905da..226d2758 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=falloc
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/684 +1 -0
index 9cdfe4ab..7595f58a 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=fpunch
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/685 +1 -0
index 55672550..aa7fc848 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=fzero
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/686 +1 -0
index a3fa8e06..03270a7d 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=finsert
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/687 +1 -0
index 0c4b09d2..cd564a7d 100755
@@ -24,6 +24,7 @@ _cleanup()
 # Modify as appropriate.
 _require_user
 _require_test
+_require_chmod
 verb=fcollapse
 _require_xfs_io_command $verb
 _require_congruent_file_oplen $TEST_DIR 65536
tests/generic/688 +1 -0
index 77db2946..1d16261d 100755
@@ -23,6 +23,7 @@ _cleanup()
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_command "$GETCAP_PROG" getcap
 _require_command "$SETCAP_PROG" setcap
 _require_xfs_io_command falloc
tests/generic/698 +1 -0
index 0029df90..a0cccfe7 100755
@@ -26,6 +26,7 @@ _fixed_by_kernel_commit 168f91289340 \
 	"fs: account for group membership"
 _require_scratch
 _require_chown
+_require_chmod
 _require_idmapped_mounts
 _require_test_program "vfs/mount-idmapped"
 _require_user fsgqa2
tests/generic/699 +1 -0
index 2a6f857d..6e94043f 100755
@@ -25,6 +25,7 @@ _require_extra_fs overlay
 
 _require_scratch
 _require_chown
+_require_chmod
 _require_idmapped_mounts
 _require_test_program "vfs/mount-idmapped"
 _require_user fsgqa2
tests/generic/726 +1 -0
index d2a2a2ce..a6c12133 100755
@@ -23,6 +23,7 @@ _begin_fstest auto fiexchange quick
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_xfs_io_command exchangerange
 _require_xfs_io_command startupdate
 _require_scratch
tests/generic/727 +1 -0
index 9551e47c..92d3743c 100755
@@ -24,6 +24,7 @@ _begin_fstest auto fiexchange quick
 
 # Modify as appropriate.
 _require_user
+_require_chmod
 _require_command "$GETCAP_PROG" getcap
 _require_command "$SETCAP_PROG" setcap
 _require_xfs_io_command exchangerange
tests/generic/792 +1 -0
index d1896728..c457ad6d 100755
@@ -22,6 +22,7 @@ _cleanup()
 . ./common/dmflakey
 
 _require_scratch
+_require_chmod
 _require_test_program unlink-fsync
 _require_dm_target flakey
 
Signature · 1 line
2.55.0
#5 lore raw

PATCH 3/5 Add _require_chown as needed

In reply to Eric Sandeen
---
 tests/generic/093 | 1 +
 tests/generic/099 | 1 +
 tests/generic/105 | 1 +
 tests/generic/219 | 1 +
 tests/generic/230 | 1 +
 tests/generic/235 | 1 +
 tests/generic/237 | 1 +
 tests/generic/244 | 1 +
 tests/generic/305 | 1 +
 tests/generic/318 | 1 +
 tests/generic/326 | 1 +
 tests/generic/327 | 1 +
 tests/generic/328 | 1 +
 tests/generic/375 | 1 +
 tests/generic/379 | 1 +
 tests/generic/380 | 1 +
 tests/generic/400 | 1 +
 tests/generic/444 | 1 +
 tests/generic/462 | 1 +
 tests/generic/505 | 1 +
 tests/generic/566 | 1 +
 tests/generic/572 | 1 +
 tests/generic/587 | 1 +
 tests/generic/597 | 1 +
 tests/generic/598 | 1 +
 tests/generic/603 | 1 +
 tests/generic/681 | 1 +
 tests/generic/682 | 1 +
 tests/generic/709 | 1 +
 tests/generic/710 | 1 +
 tests/generic/721 | 1 +
 31 files changed, 31 insertions(+)
tests/generic/093 +1 -0
index 9c3c855b..e1291019 100755
@@ -29,6 +29,7 @@ filefilter()
 _require_test
 _require_attrs security
 _require_user
+_require_chown
 _require_chmod
 _require_test_program "writemod"
 _require_command "$SETCAP_PROG" "setcap"
tests/generic/099 +1 -0
index cf54e96b..40b795e1 100755
@@ -48,6 +48,7 @@ _cleanup()
 
 _require_test
 _require_chmod
+_require_chown
 _require_runas
 
 _acl_setup_ids
tests/generic/105 +1 -0
index a74dc726..180e7418 100755
@@ -26,6 +26,7 @@ _cleanup()
 
 
 _require_scratch
+_require_chown
 _require_acls
 
 _acl_setup_ids
tests/generic/219 +1 -0
index 64282385..7c47762e 100755
@@ -17,6 +17,7 @@ _begin_fstest auto quota quick mmap
 _require_scratch
 _require_quota
 _require_user
+_require_chown
 _require_group
 _require_odirect
 
tests/generic/230 +1 -0
index 793e3a8f..05eb9024 100755
@@ -17,6 +17,7 @@ _begin_fstest auto quota quick
 _require_scratch
 _require_quota
 _require_user
+_require_chown
 _require_chmod
 
 test_files()
tests/generic/235 +1 -0
index 037c29e8..c880c620 100755
@@ -17,6 +17,7 @@ _begin_fstest auto quota quick
 _require_scratch
 _require_quota
 _require_user
+_require_chown
 
 do_repquota()
 {
tests/generic/237 +1 -0
index 266b3d69..2c686dee 100755
@@ -25,6 +25,7 @@ _cleanup()
 # only Linux supports fallocate
 _require_test
 _require_runas
+_require_chown
 
 _acl_setup_ids
 _require_acls
tests/generic/244 +1 -0
index b6803512..c508f01b 100755
@@ -26,6 +26,7 @@ _cleanup()
 
 _require_quota
 _require_scratch
+_require_chown
 
 _scratch_mkfs >> $seqres.full 2>&1
 
tests/generic/305 +1 -0
index 373abf57..04c0f223 100755
@@ -21,6 +21,7 @@ _require_xfs_io_command "fiemap"
 _require_quota
 _require_nobody
 _require_user
+_require_chown
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
tests/generic/318 +1 -0
index 033c0611..0c5c19c8 100755
@@ -34,6 +34,7 @@ file=$SCRATCH_MNT/file1
 _require_scratch
 _acl_setup_ids
 _require_acls
+_require_chown
 _require_ugid_map
 _require_userns
 ns_acl1=0
tests/generic/326 +1 -0
index d16e95aa..3fc04143 100755
@@ -22,6 +22,7 @@ _require_quota
 _require_nobody
 _require_odirect
 _require_user
+_require_chown
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
tests/generic/327 +1 -0
index 9102cbd6..2fffacab 100755
@@ -20,6 +20,7 @@ _require_xfs_io_command "fiemap"
 _require_quota
 _require_nobody
 _require_user
+_require_chown
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
tests/generic/328 +1 -0
index db785475..27160ec2 100755
@@ -21,6 +21,7 @@ _require_quota
 _require_nobody
 _require_odirect
 _require_user
+_require_chown
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
tests/generic/375 +1 -0
index 1e2ee334..81d3de22 100755
@@ -16,6 +16,7 @@ _begin_fstest auto quick acl perms
 
 _require_test
 _require_chmod
+_require_chown
 _require_runas
 _require_acls
 
tests/generic/379 +1 -0
index 9e5889b9..28d004fe 100755
@@ -23,6 +23,7 @@ _cleanup()
 
 
 _require_scratch
+_require_chown
 _require_quota
 _require_xfs_quota_foreign
 
tests/generic/380 +1 -0
index 8d772a96..0a619768 100755
@@ -19,6 +19,7 @@ _begin_fstest quota auto quick
 # Modify as appropriate.
 
 _require_scratch
+_require_chown
 _require_quota
 _require_xfs_quota_foreign
 
tests/generic/400 +1 -0
index 77970da6..48d54f65 100755
@@ -19,6 +19,7 @@ _begin_fstest auto quick quota
 
 _require_quota
 _require_scratch
+_require_chown
 
 _scratch_mkfs >> $seqres.full 2>&1
 
tests/generic/444 +1 -0
index 9094743e..1018e85d 100755
@@ -16,6 +16,7 @@ _begin_fstest auto quick acl perms
 
 _require_test
 _require_chmod
+_require_chown
 _require_runas
 _require_acls
 
tests/generic/462 +1 -0
index d886a26e..0dc0d98b 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick dax mmap
 # Modify as appropriate.
 _require_test
 _require_chmod
+_require_chown
 _require_scratch_dax_mountopt "dax"
 _require_test_program "t_mmap_write_ro"
 # running by unpriviliged user is not necessary to reproduce
tests/generic/505 +1 -0
index eb44573b..ca815d42 100755
@@ -25,6 +25,7 @@ _begin_fstest shutdown auto quick metadata
 
 
 _require_scratch
+_require_chown
 _require_scratch_shutdown
 
 _scratch_mkfs >/dev/null 2>&1
tests/generic/566 +1 -0
index a6ec82fd..87db8095 100755
@@ -27,6 +27,7 @@ _require_scratch
 _require_quota
 _require_xfs_quota_foreign
 _require_user
+_require_chown
 
 _qmount_option "grpquota"
 _scratch_mkfs > $seqres.full
tests/generic/572 +1 -0
index 97656c4b..c3059eb2 100755
@@ -28,6 +28,7 @@ _cleanup()
 
 _require_scratch_verity
 _require_chmod
+_require_chown
 _disable_fsverity_signatures
 
 _scratch_mkfs_verity &>> $seqres.full
tests/generic/587 +1 -0
index 49fcade7..c252dab7 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick rw prealloc quota
 . ./common/quota
 
 _require_user
+_require_chown
 _require_quota
 _require_xfs_io_command "falloc"
 _require_scratch
tests/generic/597 +1 -0
index 62f83cd6..3aef67a1 100755
@@ -28,6 +28,7 @@ _cleanup()
 # Modify as appropriate.
 _require_test
 _require_chmod
+_require_chown
 _require_sysctl_variable fs.protected_symlinks
 _require_sysctl_variable fs.protected_hardlinks
 _require_user fsgqa2
tests/generic/598 +1 -0
index 5b9db69e..52541b3e 100755
@@ -35,6 +35,7 @@ _require_group fsgqa2
 _require_user fsgqa
 _require_group fsgqa
 _require_chmod
+_require_chown
 
 USER1=fsgqa2
 USER2=fsgqa
tests/generic/603 +1 -0
index 853d3b16..bb0fb4a7 100755
@@ -116,6 +116,7 @@ _require_quota
 _require_user
 _require_group
 _require_chmod
+_require_chown
 
 _scratch_mkfs >$seqres.full 2>&1
 _scratch_enable_pquota
tests/generic/681 +1 -0
index dc425201..651ee157 100755
@@ -23,6 +23,7 @@ _begin_fstest auto quick quota
 _require_quota
 _require_user
 _require_scratch
+_require_chown
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/682 +1 -0
index a3bb42ac..80846463 100755
@@ -24,6 +24,7 @@ _require_quota
 _require_user
 _require_scratch
 _require_chmod
+_require_chown
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/709 +1 -0
index e3994d00..04460556 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick fiexchange quota
 
 _require_xfs_io_command exchangerange
 _require_user
+_require_chown
 _require_nobody
 _require_quota
 _require_xfs_quota
tests/generic/710 +1 -0
index 16f7276d..488c6751 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick fiexchange quota
 
 _require_xfs_io_command exchangerange
 _require_user
+_require_chown
 _require_nobody
 _require_quota
 _require_xfs_quota
tests/generic/721 +1 -0
index 75d5063c..fb4eb489 100755
@@ -25,6 +25,7 @@ _require_xfs_io_command startupdate
 _require_test_reflink
 _require_test
 _require_user
+_require_chown
 
 filesnap() {
 	echo "$1"
Signature · 1 line
2.55.0
Reviewed-by on v1 3/5
#6 lore raw

Re: [PATCH 3/5] Add _require_chown as needed

Quoted 2 lines · Eric Sandeen

---

I doubt there's any filesystem that supports chmod but not chown.

Quoted 409 lines
 tests/generic/093 | 1 +
 tests/generic/099 | 1 +
 tests/generic/105 | 1 +
 tests/generic/219 | 1 +
 tests/generic/230 | 1 +
 tests/generic/235 | 1 +
 tests/generic/237 | 1 +
 tests/generic/244 | 1 +
 tests/generic/305 | 1 +
 tests/generic/318 | 1 +
 tests/generic/326 | 1 +
 tests/generic/327 | 1 +
 tests/generic/328 | 1 +
 tests/generic/375 | 1 +
 tests/generic/379 | 1 +
 tests/generic/380 | 1 +
 tests/generic/400 | 1 +
 tests/generic/444 | 1 +
 tests/generic/462 | 1 +
 tests/generic/505 | 1 +
 tests/generic/566 | 1 +
 tests/generic/572 | 1 +
 tests/generic/587 | 1 +
 tests/generic/597 | 1 +
 tests/generic/598 | 1 +
 tests/generic/603 | 1 +
 tests/generic/681 | 1 +
 tests/generic/682 | 1 +
 tests/generic/709 | 1 +
 tests/generic/710 | 1 +
 tests/generic/721 | 1 +
 31 files changed, 31 insertions(+)
tests/generic/093 +1 -0
index 9c3c855b..e1291019 100755
@@ -29,6 +29,7 @@ filefilter()
 _require_test
 _require_attrs security
 _require_user
+_require_chown
 _require_chmod
 _require_test_program "writemod"
 _require_command "$SETCAP_PROG" "setcap"
tests/generic/099 +1 -0
index cf54e96b..40b795e1 100755
@@ -48,6 +48,7 @@ _cleanup()
 
 _require_test
 _require_chmod
+_require_chown
 _require_runas
 
 _acl_setup_ids
tests/generic/105 +1 -0
index a74dc726..180e7418 100755
@@ -26,6 +26,7 @@ _cleanup()
 
 
 _require_scratch
+_require_chown
 _require_acls
 
 _acl_setup_ids
tests/generic/219 +1 -0
index 64282385..7c47762e 100755
@@ -17,6 +17,7 @@ _begin_fstest auto quota quick mmap
 _require_scratch
 _require_quota
 _require_user
+_require_chown
 _require_group
 _require_odirect
 
tests/generic/230 +1 -0
index 793e3a8f..05eb9024 100755
@@ -17,6 +17,7 @@ _begin_fstest auto quota quick
 _require_scratch
 _require_quota
 _require_user
+_require_chown
 _require_chmod
 
 test_files()
tests/generic/235 +1 -0
index 037c29e8..c880c620 100755
@@ -17,6 +17,7 @@ _begin_fstest auto quota quick
 _require_scratch
 _require_quota
 _require_user
+_require_chown
 
 do_repquota()
 {
tests/generic/237 +1 -0
index 266b3d69..2c686dee 100755
@@ -25,6 +25,7 @@ _cleanup()
 # only Linux supports fallocate
 _require_test
 _require_runas
+_require_chown
 
 _acl_setup_ids
 _require_acls
tests/generic/244 +1 -0
index b6803512..c508f01b 100755
@@ -26,6 +26,7 @@ _cleanup()
 
 _require_quota
 _require_scratch
+_require_chown
 
 _scratch_mkfs >> $seqres.full 2>&1
 
tests/generic/305 +1 -0
index 373abf57..04c0f223 100755
@@ -21,6 +21,7 @@ _require_xfs_io_command "fiemap"
 _require_quota
 _require_nobody
 _require_user
+_require_chown
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
tests/generic/318 +1 -0
index 033c0611..0c5c19c8 100755
@@ -34,6 +34,7 @@ file=$SCRATCH_MNT/file1
 _require_scratch
 _acl_setup_ids
 _require_acls
+_require_chown
 _require_ugid_map
 _require_userns
 ns_acl1=0
tests/generic/326 +1 -0
index d16e95aa..3fc04143 100755
@@ -22,6 +22,7 @@ _require_quota
 _require_nobody
 _require_odirect
 _require_user
+_require_chown
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
tests/generic/327 +1 -0
index 9102cbd6..2fffacab 100755
@@ -20,6 +20,7 @@ _require_xfs_io_command "fiemap"
 _require_quota
 _require_nobody
 _require_user
+_require_chown
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
tests/generic/328 +1 -0
index db785475..27160ec2 100755
@@ -21,6 +21,7 @@ _require_quota
 _require_nobody
 _require_odirect
 _require_user
+_require_chown
 
 echo "Format and mount"
 _scratch_mkfs > $seqres.full 2>&1
tests/generic/375 +1 -0
index 1e2ee334..81d3de22 100755
@@ -16,6 +16,7 @@ _begin_fstest auto quick acl perms
 
 _require_test
 _require_chmod
+_require_chown
 _require_runas
 _require_acls
 
tests/generic/379 +1 -0
index 9e5889b9..28d004fe 100755
@@ -23,6 +23,7 @@ _cleanup()
 
 
 _require_scratch
+_require_chown
 _require_quota
 _require_xfs_quota_foreign
 
tests/generic/380 +1 -0
index 8d772a96..0a619768 100755
@@ -19,6 +19,7 @@ _begin_fstest quota auto quick
 # Modify as appropriate.
 
 _require_scratch
+_require_chown
 _require_quota
 _require_xfs_quota_foreign
 
tests/generic/400 +1 -0
index 77970da6..48d54f65 100755
@@ -19,6 +19,7 @@ _begin_fstest auto quick quota
 
 _require_quota
 _require_scratch
+_require_chown
 
 _scratch_mkfs >> $seqres.full 2>&1
 
tests/generic/444 +1 -0
index 9094743e..1018e85d 100755
@@ -16,6 +16,7 @@ _begin_fstest auto quick acl perms
 
 _require_test
 _require_chmod
+_require_chown
 _require_runas
 _require_acls
 
tests/generic/462 +1 -0
index d886a26e..0dc0d98b 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick dax mmap
 # Modify as appropriate.
 _require_test
 _require_chmod
+_require_chown
 _require_scratch_dax_mountopt "dax"
 _require_test_program "t_mmap_write_ro"
 # running by unpriviliged user is not necessary to reproduce
tests/generic/505 +1 -0
index eb44573b..ca815d42 100755
@@ -25,6 +25,7 @@ _begin_fstest shutdown auto quick metadata
 
 
 _require_scratch
+_require_chown
 _require_scratch_shutdown
 
 _scratch_mkfs >/dev/null 2>&1
tests/generic/566 +1 -0
index a6ec82fd..87db8095 100755
@@ -27,6 +27,7 @@ _require_scratch
 _require_quota
 _require_xfs_quota_foreign
 _require_user
+_require_chown
 
 _qmount_option "grpquota"
 _scratch_mkfs > $seqres.full
tests/generic/572 +1 -0
index 97656c4b..c3059eb2 100755
@@ -28,6 +28,7 @@ _cleanup()
 
 _require_scratch_verity
 _require_chmod
+_require_chown
 _disable_fsverity_signatures
 
 _scratch_mkfs_verity &>> $seqres.full
tests/generic/587 +1 -0
index 49fcade7..c252dab7 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick rw prealloc quota
 . ./common/quota
 
 _require_user
+_require_chown
 _require_quota
 _require_xfs_io_command "falloc"
 _require_scratch
tests/generic/597 +1 -0
index 62f83cd6..3aef67a1 100755
@@ -28,6 +28,7 @@ _cleanup()
 # Modify as appropriate.
 _require_test
 _require_chmod
+_require_chown
 _require_sysctl_variable fs.protected_symlinks
 _require_sysctl_variable fs.protected_hardlinks
 _require_user fsgqa2
tests/generic/598 +1 -0
index 5b9db69e..52541b3e 100755
@@ -35,6 +35,7 @@ _require_group fsgqa2
 _require_user fsgqa
 _require_group fsgqa
 _require_chmod
+_require_chown
 
 USER1=fsgqa2
 USER2=fsgqa
tests/generic/603 +1 -0
index 853d3b16..bb0fb4a7 100755
@@ -116,6 +116,7 @@ _require_quota
 _require_user
 _require_group
 _require_chmod
+_require_chown
 
 _scratch_mkfs >$seqres.full 2>&1
 _scratch_enable_pquota
tests/generic/681 +1 -0
index dc425201..651ee157 100755
@@ -23,6 +23,7 @@ _begin_fstest auto quick quota
 _require_quota
 _require_user
 _require_scratch
+_require_chown
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/682 +1 -0
index a3bb42ac..80846463 100755
@@ -24,6 +24,7 @@ _require_quota
 _require_user
 _require_scratch
 _require_chmod
+_require_chown
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/709 +1 -0
index e3994d00..04460556 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick fiexchange quota
 
 _require_xfs_io_command exchangerange
 _require_user
+_require_chown
 _require_nobody
 _require_quota
 _require_xfs_quota
tests/generic/710 +1 -0
index 16f7276d..488c6751 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick fiexchange quota
 
 _require_xfs_io_command exchangerange
 _require_user
+_require_chown
 _require_nobody
 _require_quota
 _require_xfs_quota
tests/generic/721 +1 -0
index 75d5063c..fb4eb489 100755
@@ -25,6 +25,7 @@ _require_xfs_io_command startupdate
 _require_test_reflink
 _require_test
 _require_user
+_require_chown
 
 filesnap() {
 	echo "$1"
Signature · 1 line
2.55.0
#7 lore raw

Re: [PATCH 3/5] Add _require_chown as needed

Quoted 6 lines · Zorro Lang
Quoted 2 lines · Eric Sandeen

---

I doubt there's any filesystem that supports chmod but not chown.

Yep, I'm not sure why we have both helpers, tbh ...

hey, you asked for ful _requirel annotation so .... ;)

Thanks,
-Eric

#8 lore raw

Re: [PATCH 3/5] Add _require_chown as needed

Quoted 11 lines · Eric Sandeen
Quoted 6 lines · Zorro Lang
Quoted 2 lines · Eric Sandeen

---

I doubt there's any filesystem that supports chmod but not chown.

Yep, I'm not sure why we have both helpers, tbh ...

hey, you asked for ful _requirel annotation so .... ;)

Haha, I just wanted to add the same _require_ to patches that were copy-pasted from the same template. I wasn't planning on updating all cases across the fstests. Generally, for test cases that are already merged, we usually don't add extra _require checks unless there's an obvious failure. Anyway, since you've already gone through and updated everything, the current changes look good to me:)

Quoted 5 lines

Thanks,
-Eric

#9 lore raw

Re: [PATCH 3/5] Add _require_chown as needed

Quoted 11 lines · Zorro Lang
Quoted 10 lines · Eric Sandeen
Quoted 6 lines · Zorro Lang
Quoted 2 lines · Eric Sandeen

---

I doubt there's any filesystem that supports chmod but not chown.

Yep, I'm not sure why we have both helpers, tbh ...

Quoted 8 lines
Quoted 1 line

hey, you asked for ful _requirel annotation so .... ;)

Haha, I just wanted to add the same _require_ to patches that were copy-pasted from the same template. I wasn't planning on updating all cases across the fstests. Generally, for test cases that are already merged, we usually don't add extra _require checks unless there's an obvious failure. Anyway, since you've already gone through and updated everything, the current changes look good to me:)

Ok, I will leave it up to you whether you want this series, or the trivial targeted patch I sent first, which is the only one addressing an observed problem. :)

-Eric

#10 lore raw

PATCH 4/5 Add _require_hardlinks as needed

In reply to Eric Sandeen
---
 tests/generic/066 | 1 +
 tests/generic/084 | 1 +
 tests/generic/398 | 1 +
 tests/generic/423 | 1 +
 tests/generic/440 | 1 +
 tests/generic/479 | 1 +
 tests/generic/520 | 1 +
 tests/generic/556 | 1 +
 tests/generic/572 | 1 +
 tests/generic/597 | 1 +
 tests/generic/681 | 1 +
 tests/generic/682 | 1 +
 tests/generic/782 | 1 +
 tests/generic/789 | 1 +
 tests/generic/790 | 1 +
 15 files changed, 15 insertions(+)
tests/generic/066 +1 -0
index 98674cdf..98f23723 100755
@@ -34,6 +34,7 @@ _cleanup()
 . ./common/attr
 
 _require_scratch
+_require_hardlinks
 _require_dm_target flakey
 _require_attrs
 
tests/generic/084 +1 -0
index fe758f11..05f2f4ba 100755
@@ -25,6 +25,7 @@ _cleanup()
 . ./common/filter
 
 _require_scratch
+_require_hardlinks
 
 link_unlink_storm()
 {
tests/generic/398 +1 -0
index 40d7b6e3..a6939b22 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick encrypt
 . ./common/renameat2
 
 _require_scratch_encryption
+_require_hardlinks
 _require_renameat2 exchange
 
 _init_session_keyring
tests/generic/423 +1 -0
index 9d41f7a8..36f8dccc 100755
@@ -27,6 +27,7 @@ _require_test_program "stat_test"
 _require_test_program "af_unix"
 _require_statx
 _require_symlinks
+_require_hardlinks
 _require_mknod
 
 function check_stat () {
tests/generic/440 +1 -0
index 1c8e3e8f..9d80cf04 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick encrypt
 
 _require_scratch_encryption
 _require_symlinks
+_require_hardlinks
 _require_command "$KEYCTL_PROG" keyctl
 
 # Set up an encryption-capable filesystem and an encryption key.
tests/generic/479 +1 -0
index f9661001..ceeaa754 100755
@@ -26,6 +26,7 @@ _cleanup()
 
 _require_scratch
 _require_symlinks
+_require_hardlinks
 _require_mknod
 _require_dm_target flakey
 
tests/generic/520 +1 -0
index 3c7ae615..d03c726c 100755
@@ -28,6 +28,7 @@ _cleanup()
 fssize=$((2**20 * 256))
 
 _require_scratch_nocheck
+_require_hardlinks
 _require_dm_target flakey
 
 # initialize scratch device
tests/generic/556 +1 -0
index 279ff58b..7c5d0371 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick casefold
 _require_scratch_nocheck
 _require_scratch_casefold
 _require_symlinks
+_require_hardlinks
 _require_check_dmesg
 _require_attrs
 
tests/generic/572 +1 -0
index c3059eb2..97f99a53 100755
@@ -29,6 +29,7 @@ _cleanup()
 _require_scratch_verity
 _require_chmod
 _require_chown
+_require_hardlinks
 _disable_fsverity_signatures
 
 _scratch_mkfs_verity &>> $seqres.full
tests/generic/597 +1 -0
index 3aef67a1..6256c4f4 100755
@@ -37,6 +37,7 @@ _require_group fsgqa2
 _require_user fsgqa
 _require_group fsgqa
 _require_symlinks
+_require_hardlinks
 
 OWNER=fsgqa2
 OTHER=fsgqa
tests/generic/681 +1 -0
index 651ee157..14bc78bc 100755
@@ -24,6 +24,7 @@ _require_quota
 _require_user
 _require_scratch
 _require_chown
+_require_hardlinks
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/682 +1 -0
index 80846463..964200c7 100755
@@ -25,6 +25,7 @@ _require_user
 _require_scratch
 _require_chmod
 _require_chown
+_require_hardlinks
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/782 +1 -0
index f3298a70..ef6f6a8e 100755
@@ -23,6 +23,7 @@ _cleanup()
 . ./common/dmflakey
 
 _require_scratch
+_require_hardlinks
 _require_dm_target flakey
 
 _fixed_by_fs_commit btrfs bfe3d755ef7c \
tests/generic/789 +1 -0
index 0e72966e..7cacf238 100755
@@ -22,6 +22,7 @@ _cleanup()
 . ./common/dmflakey
 
 _require_scratch
+_require_hardlinks
 _require_dm_target flakey
 
 _fixed_by_fs_commit btrfs 5254d4181add \
tests/generic/790 +1 -0
index 28f7faa2..44de7bb8 100755
@@ -25,6 +25,7 @@ _cleanup()
 . ./common/dmflakey
 
 _require_scratch
+_require_hardlinks
 _require_dm_target flakey
 
 _fixed_by_fs_commit btrfs 9573a365ff9f \
Signature · 1 line
2.55.0
Reviewed-by on v1 4/5
#11 lore raw

Re: [PATCH 4/5] Add _require_hardlinks as needed

Quoted 2 lines · Eric Sandeen

---

Quoted 201 lines
 tests/generic/066 | 1 +
 tests/generic/084 | 1 +
 tests/generic/398 | 1 +
 tests/generic/423 | 1 +
 tests/generic/440 | 1 +
 tests/generic/479 | 1 +
 tests/generic/520 | 1 +
 tests/generic/556 | 1 +
 tests/generic/572 | 1 +
 tests/generic/597 | 1 +
 tests/generic/681 | 1 +
 tests/generic/682 | 1 +
 tests/generic/782 | 1 +
 tests/generic/789 | 1 +
 tests/generic/790 | 1 +
 15 files changed, 15 insertions(+)
tests/generic/066 +1 -0
index 98674cdf..98f23723 100755
@@ -34,6 +34,7 @@ _cleanup()
 . ./common/attr
 
 _require_scratch
+_require_hardlinks
 _require_dm_target flakey
 _require_attrs
 
tests/generic/084 +1 -0
index fe758f11..05f2f4ba 100755
@@ -25,6 +25,7 @@ _cleanup()
 . ./common/filter
 
 _require_scratch
+_require_hardlinks
 
 link_unlink_storm()
 {
tests/generic/398 +1 -0
index 40d7b6e3..a6939b22 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick encrypt
 . ./common/renameat2
 
 _require_scratch_encryption
+_require_hardlinks
 _require_renameat2 exchange
 
 _init_session_keyring
tests/generic/423 +1 -0
index 9d41f7a8..36f8dccc 100755
@@ -27,6 +27,7 @@ _require_test_program "stat_test"
 _require_test_program "af_unix"
 _require_statx
 _require_symlinks
+_require_hardlinks
 _require_mknod
 
 function check_stat () {
tests/generic/440 +1 -0
index 1c8e3e8f..9d80cf04 100755
@@ -20,6 +20,7 @@ _begin_fstest auto quick encrypt
 
 _require_scratch_encryption
 _require_symlinks
+_require_hardlinks
 _require_command "$KEYCTL_PROG" keyctl
 
 # Set up an encryption-capable filesystem and an encryption key.
tests/generic/479 +1 -0
index f9661001..ceeaa754 100755
@@ -26,6 +26,7 @@ _cleanup()
 
 _require_scratch
 _require_symlinks
+_require_hardlinks
 _require_mknod
 _require_dm_target flakey
 
tests/generic/520 +1 -0
index 3c7ae615..d03c726c 100755
@@ -28,6 +28,7 @@ _cleanup()
 fssize=$((2**20 * 256))
 
 _require_scratch_nocheck
+_require_hardlinks
 _require_dm_target flakey
 
 # initialize scratch device
tests/generic/556 +1 -0
index 279ff58b..7c5d0371 100755
@@ -15,6 +15,7 @@ _begin_fstest auto quick casefold
 _require_scratch_nocheck
 _require_scratch_casefold
 _require_symlinks
+_require_hardlinks
 _require_check_dmesg
 _require_attrs
 
tests/generic/572 +1 -0
index c3059eb2..97f99a53 100755
@@ -29,6 +29,7 @@ _cleanup()
 _require_scratch_verity
 _require_chmod
 _require_chown
+_require_hardlinks
 _disable_fsverity_signatures
 
 _scratch_mkfs_verity &>> $seqres.full
tests/generic/597 +1 -0
index 3aef67a1..6256c4f4 100755
@@ -37,6 +37,7 @@ _require_group fsgqa2
 _require_user fsgqa
 _require_group fsgqa
 _require_symlinks
+_require_hardlinks
 
 OWNER=fsgqa2
 OTHER=fsgqa
tests/generic/681 +1 -0
index 651ee157..14bc78bc 100755
@@ -24,6 +24,7 @@ _require_quota
 _require_user
 _require_scratch
 _require_chown
+_require_hardlinks
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/682 +1 -0
index 80846463..964200c7 100755
@@ -25,6 +25,7 @@ _require_user
 _require_scratch
 _require_chmod
 _require_chown
+_require_hardlinks
 
 _scratch_mkfs > "$seqres.full" 2>&1
 _qmount_option usrquota
tests/generic/782 +1 -0
index f3298a70..ef6f6a8e 100755
@@ -23,6 +23,7 @@ _cleanup()
 . ./common/dmflakey
 
 _require_scratch
+_require_hardlinks
 _require_dm_target flakey
 
 _fixed_by_fs_commit btrfs bfe3d755ef7c \
tests/generic/789 +1 -0
index 0e72966e..7cacf238 100755
@@ -22,6 +22,7 @@ _cleanup()
 . ./common/dmflakey
 
 _require_scratch
+_require_hardlinks
 _require_dm_target flakey
 
 _fixed_by_fs_commit btrfs 5254d4181add \
tests/generic/790 +1 -0
index 28f7faa2..44de7bb8 100755
@@ -25,6 +25,7 @@ _cleanup()
 . ./common/dmflakey
 
 _require_scratch
+_require_hardlinks
 _require_dm_target flakey
 
 _fixed_by_fs_commit btrfs 9573a365ff9f \
Signature · 1 line
2.55.0
#12 lore raw

PATCH 5/5 Add _require_mknod as needed

In reply to Eric Sandeen
---
 tests/generic/398 | 1 +
 tests/generic/598 | 1 +
 2 files changed, 2 insertions(+)
tests/generic/398 +1 -0
index a6939b22..927f63d3 100755
@@ -21,6 +21,7 @@ _begin_fstest auto quick encrypt
 
 _require_scratch_encryption
 _require_hardlinks
+_require_mknod
 _require_renameat2 exchange
 
 _init_session_keyring
tests/generic/598 +1 -0
index 52541b3e..9cb29021 100755
@@ -36,6 +36,7 @@ _require_user fsgqa
 _require_group fsgqa
 _require_chmod
 _require_chown
+_require_mknod
 
 USER1=fsgqa2
 USER2=fsgqa
Signature · 1 line
2.55.0
Reviewed-by on v1 5/5
#13 lore raw

Re: [PATCH 5/5] Add _require_mknod as needed

Quoted 2 lines · Eric Sandeen

---

Quoted 32 lines
 tests/generic/398 | 1 +
 tests/generic/598 | 1 +
 2 files changed, 2 insertions(+)
tests/generic/398 +1 -0
index a6939b22..927f63d3 100755
@@ -21,6 +21,7 @@ _begin_fstest auto quick encrypt
 
 _require_scratch_encryption
 _require_hardlinks
+_require_mknod
 _require_renameat2 exchange
 
 _init_session_keyring
tests/generic/598 +1 -0
index 52541b3e..9cb29021 100755
@@ -36,6 +36,7 @@ _require_user fsgqa
 _require_group fsgqa
 _require_chmod
 _require_chown
+_require_mknod
 
 USER1=fsgqa2
 USER2=fsgqa
Signature · 1 line
2.55.0