+_has_btrfs_sysfs_feature_attr()
+{
+ local feature_attr=$1
+
+ [ -z $feature_attr ] && \
+ _fail "Missing feature name argument for _has_btrfs_sysfs_attr"
+
+ modprobe btrfs &> /dev/null
+
+ test -e /sys/fs/btrfs/features/$feature_attr
+}
We already have _require_btrfs_fs_feature() to do exactly this.
Tried it in patch 5/6 and it works perfectly...
I noticed that. But, _require_btrfs_fs_feature() triggers _notrun()
when the feature is absent in the kernel. Given our need to run the
testcase with and without temp-fsid, it is not suitable.
Thanks, Anand