aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2021-10-12 15:34:11 +0200
committernareshkamboju <naresh.kamboju@gmail.com>2021-10-14 13:32:00 +0530
commitcd290705abbe2a77868e276b8abd3d8e1d21dcc8 (patch)
tree2fa5d9b6f291e16bcfdae9772ce14cb8bb4f604d
parent5365054b06e77d6db4427a578c75806745c2f9d5 (diff)
downloadtest-definitions-master.tar.gz
lib: sh-test-lib: fixup function mount_debugfsHEADmaster
cleanup return and exit, also fix the if statement checking if not equal to 'debugfs'. Fixes: 5365054b06e7 ("linux: gpiod: mount debugfs if needed") Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
-rwxr-xr-xautomated/lib/sh-test-lib8
1 files changed, 4 insertions, 4 deletions
diff --git a/automated/lib/sh-test-lib b/automated/lib/sh-test-lib
index d3b705be..64d75814 100755
--- a/automated/lib/sh-test-lib
+++ b/automated/lib/sh-test-lib
@@ -708,15 +708,15 @@ exit_cleanup()
mount_debugfs()
{
- if [ "$(mount | grep debugfs)" -eq 1 ]; then
+ if [ "$(mount | grep debugfs)" != "debugfs" ]; then
# try to mount the debugfs hierarchy ourselves and remember it to umount afterwards
mount -t debugfs debugfs /sys/kernel/debug && mounted_debugfs=1
if [ $mounted_debugfs -eq 1 ]; then
- exit 0
+ return
else
- exit 1
+ error_msg "not able to mount debugfs"
fi
else
- exit 0
+ return
fi
}