浏览代码

ktest: Place quotes around item variable

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>
Steven Rostedt (Red Hat) 11 年之前
父节点
当前提交
7c2c49eceb
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/testing/ktest/ktest.pl

+ 1 - 1
tools/testing/ktest/ktest.pl

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