Re: [PATCH blktests v2] tests/dm: add a regression test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

在 2023/05/01 12:34, Shinichiro Kawasaki 写道:
Yu, thanks for the patch. I have three minor comments below. Other than that,
the patch looks good to me. If you do not mind, I can do these edits. Please let
me know your thoughts.

I'm good with your comments.

Thanks,
Kuai

1) Let's describe a bit more in the commit title, like,
    "tests/dm: add dm test group and a test for self-map"
2) From historical reason, we add executable mode to the test script files.
    Let's add the file mode 755 to the tests/dm/001 file.
3) Please run "make check" to find script issues. With the command, shellcheck
    reports a warning:

    tests/dm/001:23:7: note: Check exit code directly with e.g. 'if mycmd;', not indirectly
    with $?. [SC2181]

A hunk below will avoid the warning.

diff --git a/tests/dm/001 b/tests/dm/001
index 09731d8..f69f30f 100644
--- a/tests/dm/001
+++ b/tests/dm/001
@@ -19,8 +19,8 @@ test_device() {
dmsetup create test --table "0 8192 linear ${TEST_DEV} 0"
  	dmsetup suspend test
-	dmsetup reload test --table "0 8192 linear /dev/mapper/test 0" &> /dev/null
-	if [ $? -eq 0 ]; then
+	if dmsetup reload test --table "0 8192 linear /dev/mapper/test 0" \
+	   &> /dev/null; then
  		echo "reload a dm with maps to itself succeed."
  	fi
  	dmsetup remove test

.


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux