Whamcloud - gitweb
LU-3434 scripts: check for mdsfilesystemtype= option 04/25804/2
authorAndreas Dilger <andreas.dilger@intel.com>
Sat, 4 Mar 2017 05:27:32 +0000 (22:27 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 19 Apr 2017 04:46:43 +0000 (04:46 +0000)
Check if the Test-Parameters line is using the old mdsfilesystemtype=
option and ask for it to be removed.  The mdtfilesystemtype= option
should be used instead.

Test-Parameters: trivial
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I52765fd94f4dec896593c86763737fa64f3ebbe5
Reviewed-on: https://review.whamcloud.com/25804
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Charlie Olmstead <charlie.olmstead@intel.com>
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
contrib/git-hooks/commit-msg
contrib/git-hooks/tests/commit.mdsfst [new file with mode: 0644]

index 25a6281..d28e40b 100755 (executable)
@@ -99,6 +99,13 @@ function do_changeid() {
        HAS_CHANGEID=true
 }
 
        HAS_CHANGEID=true
 }
 
+function do_testparams() {
+       ck_wrapup
+
+       grep -q mdsfilesystemtype <<< $LINE &&
+               error "mdsfilesystemtype is deprecated, use mdtfilesystemtype"
+}
+
 # All "innocuous" lines specify a person and email address
 #
 function do_innocuous() {
 # All "innocuous" lines specify a person and email address
 #
 function do_innocuous() {
@@ -215,9 +222,9 @@ exec 3< "$ORIGINAL" 4> "$REVISED" || exit 1
 while IFS= read -u3 LINE; do
        ((NUM += 1))
        case "$LINE" in
 while IFS= read -u3 LINE; do
        ((NUM += 1))
        case "$LINE" in
-       $SIGNOFF* )   do_signoff   ;;
-       $CHANGEID* )  do_changeid  ;;
-       $TESTPARAMS* ) ck_wrapup   ;;
+       $SIGNOFF* )   do_signoff     ;;
+       $CHANGEID* )  do_changeid    ;;
+       $TESTPARAMS* ) do_testparams ;;
 
        "")
                HAS_LAST_BLANK=true
 
        "")
                HAS_LAST_BLANK=true
diff --git a/contrib/git-hooks/tests/commit.mdsfst b/contrib/git-hooks/tests/commit.mdsfst
new file mode 100644 (file)
index 0000000..4f2fd90
--- /dev/null
@@ -0,0 +1,8 @@
+DCO-5866 scripts: check for mdsfilesystemtype
+
+Check if the Test-Parameters line is using the old mdsfilesystemtype=
+option and ask for it to be removed.  The mdtfilesystemtype= option
+should be used instead.
+
+Test-Parameters: trivial mdsfilesystemtype=zfs
+Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>