mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
btrfs/010: don't run without /sys/fs/btrfs
Older kernels don't have /sys/fs/btrfs. btrfs/010 will happily run until it goes to check its work against sysfs and finds those files don't exist. This patch introduces a require check to ensure that the sysfs files are present before running. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
@@ -89,6 +89,14 @@ _require_btrfs_fs_feature()
|
|||||||
_notrun "Feature $feat not supported by the available btrfs version"
|
_notrun "Feature $feat not supported by the available btrfs version"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_require_btrfs_fs_sysfs()
|
||||||
|
{
|
||||||
|
modprobe btrfs > /dev/null 2>&1
|
||||||
|
[ -e /sys/fs/btrfs/features ] || \
|
||||||
|
_notrun "Sysfs not supported by the available btrfs version"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
_check_btrfs_filesystem()
|
_check_btrfs_filesystem()
|
||||||
{
|
{
|
||||||
device=$1
|
device=$1
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ rm -f $seqres.full
|
|||||||
_supported_fs btrfs
|
_supported_fs btrfs
|
||||||
_supported_os Linux
|
_supported_os Linux
|
||||||
_require_test
|
_require_test
|
||||||
|
_require_btrfs_fs_sysfs
|
||||||
|
|
||||||
# Create 32k extents. All of these extents will be accounted as outstanding and
|
# Create 32k extents. All of these extents will be accounted as outstanding and
|
||||||
# reserved.
|
# reserved.
|
||||||
|
|||||||
Reference in New Issue
Block a user