ktest: Use different temp config name for minconfig
authorSteven Rostedt <srostedt@redhat.com>
Tue, 9 Nov 2010 17:20:21 +0000 (12:20 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 18 Nov 2010 16:23:12 +0000 (11:23 -0500)
By using the "use_config" for minconfig and addconfig we risk
trying to copy itself to itself, which will cause an unexpected failure.

Use a different name instead.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

tools/testing/ktest/ktest.pl

index 0d10805..a7a74f0 100755 (executable)
@@ -1735,9 +1735,9 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) {
        $minconfig = $addconfig;
 
     } elsif (defined($addconfig)) {
-       run_command "cat $addconfig $minconfig > $tmpdir/use_config" or
+       run_command "cat $addconfig $minconfig > $tmpdir/add_config" or
            dodie "Failed to create temp config";
-       $minconfig = "$tmpdir/use_config";
+       $minconfig = "$tmpdir/add_config";
     }
 
     my $checkout = $opt{"CHECKOUT[$i]"};