]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: add _fixed_by_fs_commit helper
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 25 Feb 2026 10:27:40 +0000 (11:27 +0100)
committerZorro Lang <zlang@kernel.org>
Wed, 4 Mar 2026 15:58:03 +0000 (23:58 +0800)
Add a new helper `_fixed_by_fs_commit` eliminating the
 if [ $FSTYP = fs ] && _fixed_by_kernel_commit XXXX YYYY
pattern.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc

index fd4ca9641822cf8bf7e922ec8af60b43fb0c3076..3b2a491d6c15447ee0ca8636b2151ecc0abf9ad6 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -1898,6 +1898,16 @@ _fixed_by_kernel_commit()
        _fixed_by_git_commit kernel $*
 }
 
+_fixed_by_fs_commit()
+{
+       local fstyp=$1
+       shift
+
+       if [ "$fstyp" = "$FSTYP" ]; then
+               _fixed_by_kernel_commit $*
+       fi
+}
+
 # Compare with _fixed_by_* helpers, this helper is used for test cases
 # are not regression tests, e.g. functional tests or maintainer tests,
 # this helper suggests git commits that should be applied to source trees