/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2024 Meta Platforms, Inc. and affiliates. * Copyright (c) 2024 David Vernet <dvernet@meta.com> * Copyright (c) 2024 Tejun Heo <tj@kernel.org>
*/ #include <stdio.h> #include <unistd.h> #include <signal.h> #include <libgen.h> #include <bpf/bpf.h> #include"scx_test.h"
constchar help_fmt[] = "The runner for sched_ext tests.\n" "\n" "The runner is statically linked against all testcases, and runs them all serially.\n" "It's required for the testcases to be serial, as only a single host-wide sched_ext\n" "scheduler may be loaded at any given time." "\n" "Usage: %s [-t TEST] [-h]\n" "\n" " -t TEST Only run tests whose name includes this string\n" " -s Include print output for skipped tests\n" " -l List all available tests\n" " -q Don't print the test descriptions during run\n" " -h Display this help and exit\n";
for (i = 0; i < __scx_num_tests; i++) { enum scx_test_status status; struct scx_test *test = &__scx_tests[i];
if (list) {
printf("%s\n", test->name); if (i == (__scx_num_tests - 1)) return 0; continue;
}
if (filter && should_skip_test(test, filter)) { /* * Printing the skipped tests and their preambles can * add a lot of noise to the runner output. Printing * this is only really useful for CI, so let's skip it * by default.
*/ if (print_skipped) {
print_test_preamble(test, quiet);
print_test_result(test, SCX_TEST_SKIP, ++testnum);
} continue;
}
print_test_preamble(test, quiet);
status = run_test(test);
print_test_result(test, status, ++testnum); switch (status) { case SCX_TEST_PASS:
passed++; break; case SCX_TEST_SKIP:
skipped++; break; case SCX_TEST_FAIL:
failed++; break;
}
}
printf("\n\n=============================\n\n");
printf("RESULTS:\n\n");
printf("PASSED: %u\n", passed);
printf("SKIPPED: %u\n", skipped);
printf("FAILED: %u\n", failed);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.