ktest: Place quotes around item variable
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Tue, 3 Feb 2015 20:45:13 +0000 (15:45 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Tue, 3 Feb 2015 20:45:13 +0000 (15:45 -0500)
Seems that some of the new console logic causes doprint to possibly
get evaluated. When printing a commit message that contains parenthesis,
it fails with a shell parsing error.

This gets fixed when we add quotes around the $item variable, and prevent
it from being evaluated by any shell commands.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
tools/testing/ktest/ktest.pl

index 840803b3cd41d36649a61bac391252d4984b89d2..d08e214ec6e793f07b71fb734c33db00baab901f 100755 (executable)
@@ -3447,7 +3447,7 @@ sub patchcheck {
        my $sha1 = $item;
        $sha1 =~ s/^([[:xdigit:]]+).*/$1/;
 
-       doprint "\nProcessing commit $item\n\n";
+       doprint "\nProcessing commit \"$item\"\n\n";
 
        run_command "git checkout $sha1" or
            die "Failed to checkout $sha1";