summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/testing/selftests/bpf/test_progs.c8
-rw-r--r--tools/testing/selftests/bpf/test_progs.h2
2 files changed, 8 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
index 307f8f41437d..c639f2e56fc5 100644
--- a/tools/testing/selftests/bpf/test_progs.c
+++ b/tools/testing/selftests/bpf/test_progs.c
@@ -271,6 +271,7 @@ static void dump_test_log(const struct prog_test_def *test,
int i;
struct subtest_state *subtest_state;
bool subtest_failed;
+ bool subtest_filtered;
bool print_subtest;
/* we do not print anything in the worker thread */
@@ -289,9 +290,10 @@ static void dump_test_log(const struct prog_test_def *test,
for (i = 0; i < test_state->subtest_num; i++) {
subtest_state = &test_state->subtest_states[i];
subtest_failed = subtest_state->error_cnt;
+ subtest_filtered = subtest_state->filtered;
print_subtest = verbose() || force_log || subtest_failed;
- if (skip_ok_subtests && !subtest_failed)
+ if ((skip_ok_subtests && !subtest_failed) || subtest_filtered)
continue;
if (subtest_state->log_cnt && print_subtest) {
@@ -423,7 +425,7 @@ bool test__start_subtest(const char *subtest_name)
state->subtest_num,
test->test_name,
subtest_name)) {
- subtest_state->skipped = true;
+ subtest_state->filtered = true;
return false;
}
@@ -1129,6 +1131,7 @@ static int dispatch_thread_send_subtests(int sock_fd, struct test_state *state)
subtest_state->name = strdup(msg.subtest_done.name);
subtest_state->error_cnt = msg.subtest_done.error_cnt;
subtest_state->skipped = msg.subtest_done.skipped;
+ subtest_state->filtered = msg.subtest_done.filtered;
/* collect all logs */
if (msg.subtest_done.have_log)
@@ -1424,6 +1427,7 @@ static int worker_main_send_subtests(int sock, struct test_state *state)
msg.subtest_done.error_cnt = subtest_state->error_cnt;
msg.subtest_done.skipped = subtest_state->skipped;
+ msg.subtest_done.filtered = subtest_state->filtered;
msg.subtest_done.have_log = false;
if (verbose() || state->force_log || subtest_state->error_cnt) {
diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h
index dd1b91d7985a..5fe1365c2bb1 100644
--- a/tools/testing/selftests/bpf/test_progs.h
+++ b/tools/testing/selftests/bpf/test_progs.h
@@ -70,6 +70,7 @@ struct subtest_state {
char *log_buf;
int error_cnt;
bool skipped;
+ bool filtered;
FILE *stdout;
};
@@ -156,6 +157,7 @@ struct msg {
char name[MAX_SUBTEST_NAME + 1];
int error_cnt;
bool skipped;
+ bool filtered;
bool have_log;
} subtest_done;
};