]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - tools/testing/ktest/ktest.pl
ktest: Fix breakage from change of oldnoconfig to olddefconfig
[karo-tx-linux.git] / tools / testing / ktest / ktest.pl
index 067337bbce7b3c38232c1b3f9a478442d4627acb..6b1e0c5edc5b9be047b50c214f77c7854a9f30e3 100755 (executable)
@@ -1966,10 +1966,14 @@ sub make_oldconfig {
 
     if (!run_command "$make olddefconfig") {
        # Perhaps olddefconfig doesn't exist in this version of the kernel
-       # try a yes '' | oldconfig
-       doprint "olddefconfig failed, trying yes '' | make oldconfig\n";
-       run_command "yes '' | $make oldconfig" or
-           dodie "failed make config oldconfig";
+       # try oldnoconfig
+       doprint "olddefconfig failed, trying make oldnoconfig\n";
+       if (!run_command "$make oldnoconfig") {
+           doprint "oldnoconfig failed, trying yes '' | make oldconfig\n";
+           # try a yes '' | oldconfig
+           run_command "yes '' | $make oldconfig" or
+               dodie "failed make config oldconfig";
+       }
     }
 }