All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: Check for metadata uuid feature in misc-tests/034-metadata-uuid
@ 2019-08-05 11:45 Nikolay Borisov
  2019-08-05 12:16 ` Qu Wenruo
  2019-08-05 18:55 ` David Sterba
  0 siblings, 2 replies; 5+ messages in thread
From: Nikolay Borisov @ 2019-08-05 11:45 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Nikolay Borisov

Instead of checking the kernel version, explicitly check for the
presence of metadata_uuid file in sysfs. This allows the test to be run
on older kernels that might have this feature backported.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 tests/misc-tests/034-metadata-uuid/test.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/misc-tests/034-metadata-uuid/test.sh b/tests/misc-tests/034-metadata-uuid/test.sh
index 3ef110cda823..6ac55b1cacfa 100755
--- a/tests/misc-tests/034-metadata-uuid/test.sh
+++ b/tests/misc-tests/034-metadata-uuid/test.sh
@@ -10,8 +10,8 @@ check_prereq btrfs-image
 setup_root_helper
 prepare_test_dev
 
-if ! check_min_kernel_version 5.0; then
-	_not_run "kernel too old, METADATA_UUID support needed"
+if [ ! -f /sys/fs/btrfs/features/metadata_uuid ] ; then
+	_not_run "METADATA_UUID feature not supported"
 fi
 
 read_fsid() {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-05 18:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 11:45 [PATCH] btrfs-progs: Check for metadata uuid feature in misc-tests/034-metadata-uuid Nikolay Borisov
2019-08-05 12:16 ` Qu Wenruo
2019-08-05 12:20   ` Nikolay Borisov
2019-08-05 12:26     ` Qu Wenruo
2019-08-05 18:55 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.