Thread (32 messages) 32 messages, 3 authors, 2015-08-13

Re: [PATCH v4 1/3] xfstests: btrfs: add functions to create dm-error device

From: Anand Jain <hidden>
Date: 2015-08-13 14:39:39
Also in: fstests

quoted
+# this test requires the device mapper error target
+#
+_require_dmerror()
+{
+    _require_command "$DMSETUP_PROG" dmsetup
+
+    $DMSETUP_PROG targets | grep error >/dev/null 2>&1
+    if [ $? -eq 0 ]
+    then
+       :
+    else
+       _notrun "This test requires dm error support"
+    fi
Why not just:

[ $? -ne 0 ] && _notrun "This test requires dm error support"

The empty branch doesn't make much sense.
  yes.
Also, please indent the body of this function using an 8 spaces tab,
which is the official style for fstests (just look at the surrounding
functions for example).
  not sure how this got slipped. I am fixing it.
Other than that, it looks good to me. You can add:

Reviewed-by: Filipe Manana <redacted>
Thanks.
Anand
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help