smbtorture: Default to listing all tests if no prefix was specified.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 11 Dec 2010 17:00:24 +0000 (18:00 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 11 Dec 2010 17:48:05 +0000 (18:48 +0100)
source4/torture/smbtorture.c

index 49d9b1887d1a5f5bdde034d5dd9be9c47e1d1d30..cfa8b0f87db2a2df8f9b6471371bd3cd57d4c96a 100644 (file)
@@ -633,8 +633,12 @@ int main(int argc,char *argv[])
        }
 
        if (list_tests) {
-               for (i=1;i<argc_new;i++) {
-                       print_test_list(torture_root, NULL, argv_new[i]);
+               if (argc_new == 1) {
+                       print_test_list(torture_root, NULL, "");
+               } else {
+                       for (i=1;i<argc_new;i++) {
+                               print_test_list(torture_root, NULL, argv_new[i]);
+                       }
                }
                return 0;
        }