]> www.infradead.org Git - users/sagi/blktests.git/commitdiff
common/rc: add _have_configfs
authorJohannes Thumshirn <jthumshirn@suse.de>
Wed, 21 Mar 2018 12:13:05 +0000 (13:13 +0100)
committerOmar Sandoval <osandov@fb.com>
Fri, 6 Apr 2018 23:41:01 +0000 (16:41 -0700)
Add a _have_configfs() helper function checking if we have configfs
mounted similar to the already present _have_tracefs().

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
common/rc

index 41cc1331b799d893de31f85cd7f3c9595c397192..899c1826a53429853a8c3522bbc4e0c9f710bea3 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -95,6 +95,14 @@ _have_blktrace() {
        _have_program blktrace
 }
 
+_have_configfs() {
+       if ! findmnt -t configfs /sys/kernel/config >/dev/null; then
+               SKIP_REASON="configfs is not mounted at /sys/kernel/config"
+               return 1
+       fi
+       return 0
+}
+
 _have_tracefs() {
        if ! findmnt -t tracefs /sys/kernel/debug/tracing >/dev/null; then
                SKIP_REASON="tracefs is not mounted at /sys/kernel/debug/tracing"