check: exit with exit code 1 after printing the usage message
authorTheodore Ts'o <tytso@mit.edu>
Sat, 3 Jul 2021 16:02:47 +0000 (12:02 -0400)
committerEryu Guan <guaneryu@gmail.com>
Sun, 4 Jul 2021 10:06:46 +0000 (18:06 +0800)
If check is passed an invalid command line option, exit with a
non-zero exit code so that a script calling check can detect the
failure.  The check script already performs an "exit 1" if a valid
option has an invalid argument, so this is consistent with existing
practice.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
check

diff --git a/check b/check
index 3dab763..de8104d 100755 (executable)
--- a/check
+++ b/check
@@ -116,7 +116,7 @@ examples:
  check -X .exclude -g auto
  check -E ~/.xfstests.exclude
 '
-           exit 0
+           exit 1
 }
 
 get_sub_group_list()