int test_children_sz;
bool test_child;
+__attribute__((format(printf, 1, 2)))
+static void kmsg(const char *format, ...)
+#define KERN_INFO "<5>"
+{
+ va_list ap;
+ FILE *file;
+
+ file = fopen("/dev/kmsg", "w");
+ if (file == NULL)
+ return;
+
+ va_start(ap, format);
+ vfprintf(file, format, ap);
+ va_end(ap);
+
+ fclose(file);
+}
+
bool __igt_fixture(void)
{
assert(!in_fixture);
}
}
- oom_adjust_for_doom();
-
out:
free(short_opts);
free(combined_opts);
/* exit with no error for -h/--help */
exit(ret == -1 ? 0 : IGT_EXIT_INVALID);
- print_version();
+ if (!list_subtests) {
+ kmsg(KERN_INFO "%s: executing\n", command_str);
+ print_version();
+
+ oom_adjust_for_doom();
+ }
return ret;
}
extra_opt_handler);
}
-__attribute__((format(printf, 1, 2)))
-static void kmsg(const char *format, ...)
-#define KERN_INFO "<5>"
-{
- va_list ap;
- FILE *file;
-
- file = fopen("/dev/kmsg", "w");
- if (file == NULL)
- return;
-
- va_start(ap, format);
- vfprintf(file, format, ap);
- va_end(ap);
-
- fclose(file);
-}
-
/*
* Note: Testcases which use these helpers MUST NOT output anything to stdout
* outside of places protected by igt_run_subtest checks - the piglit