diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bpf/Makefile | 2 | ||||
-rw-r--r-- | tools/bpf/bpf_dbg.c | 7 | ||||
-rw-r--r-- | tools/testing/selftests/bpf/test_progs.c | 4 | ||||
-rw-r--r-- | tools/testing/selftests/net/Makefile | 3 |
4 files changed, 11 insertions, 5 deletions
diff --git a/tools/bpf/Makefile b/tools/bpf/Makefile index 1ea545965ee3..53b60ad452f5 100644 --- a/tools/bpf/Makefile +++ b/tools/bpf/Makefile | |||
@@ -76,6 +76,8 @@ $(OUTPUT)bpf_asm: $(OUTPUT)bpf_asm.o $(OUTPUT)bpf_exp.yacc.o $(OUTPUT)bpf_exp.le | |||
76 | $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $^ | 76 | $(QUIET_LINK)$(CC) $(CFLAGS) -o $@ $^ |
77 | 77 | ||
78 | $(OUTPUT)bpf_exp.lex.c: $(OUTPUT)bpf_exp.yacc.c | 78 | $(OUTPUT)bpf_exp.lex.c: $(OUTPUT)bpf_exp.yacc.c |
79 | $(OUTPUT)bpf_exp.yacc.o: $(OUTPUT)bpf_exp.yacc.c | ||
80 | $(OUTPUT)bpf_exp.lex.o: $(OUTPUT)bpf_exp.lex.c | ||
79 | 81 | ||
80 | clean: bpftool_clean | 82 | clean: bpftool_clean |
81 | $(call QUIET_CLEAN, bpf-progs) | 83 | $(call QUIET_CLEAN, bpf-progs) |
diff --git a/tools/bpf/bpf_dbg.c b/tools/bpf/bpf_dbg.c index 4f254bcc4423..61b9aa5d6415 100644 --- a/tools/bpf/bpf_dbg.c +++ b/tools/bpf/bpf_dbg.c | |||
@@ -1063,7 +1063,7 @@ static int cmd_load_pcap(char *file) | |||
1063 | 1063 | ||
1064 | static int cmd_load(char *arg) | 1064 | static int cmd_load(char *arg) |
1065 | { | 1065 | { |
1066 | char *subcmd, *cont, *tmp = strdup(arg); | 1066 | char *subcmd, *cont = NULL, *tmp = strdup(arg); |
1067 | int ret = CMD_OK; | 1067 | int ret = CMD_OK; |
1068 | 1068 | ||
1069 | subcmd = strtok_r(tmp, " ", &cont); | 1069 | subcmd = strtok_r(tmp, " ", &cont); |
@@ -1073,7 +1073,10 @@ static int cmd_load(char *arg) | |||
1073 | bpf_reset(); | 1073 | bpf_reset(); |
1074 | bpf_reset_breakpoints(); | 1074 | bpf_reset_breakpoints(); |
1075 | 1075 | ||
1076 | ret = cmd_load_bpf(cont); | 1076 | if (!cont) |
1077 | ret = CMD_ERR; | ||
1078 | else | ||
1079 | ret = cmd_load_bpf(cont); | ||
1077 | } else if (matches(subcmd, "pcap") == 0) { | 1080 | } else if (matches(subcmd, "pcap") == 0) { |
1078 | ret = cmd_load_pcap(cont); | 1081 | ret = cmd_load_pcap(cont); |
1079 | } else { | 1082 | } else { |
diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c index faadbe233966..4123d0ab90ba 100644 --- a/tools/testing/selftests/bpf/test_progs.c +++ b/tools/testing/selftests/bpf/test_progs.c | |||
@@ -1108,7 +1108,7 @@ static void test_stacktrace_build_id(void) | |||
1108 | 1108 | ||
1109 | assert(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null") | 1109 | assert(system("dd if=/dev/urandom of=/dev/zero count=4 2> /dev/null") |
1110 | == 0); | 1110 | == 0); |
1111 | assert(system("./urandom_read if=/dev/urandom of=/dev/zero count=4 2> /dev/null") == 0); | 1111 | assert(system("./urandom_read") == 0); |
1112 | /* disable stack trace collection */ | 1112 | /* disable stack trace collection */ |
1113 | key = 0; | 1113 | key = 0; |
1114 | val = 1; | 1114 | val = 1; |
@@ -1158,7 +1158,7 @@ static void test_stacktrace_build_id(void) | |||
1158 | } while (bpf_map_get_next_key(stackmap_fd, &previous_key, &key) == 0); | 1158 | } while (bpf_map_get_next_key(stackmap_fd, &previous_key, &key) == 0); |
1159 | 1159 | ||
1160 | CHECK(build_id_matches < 1, "build id match", | 1160 | CHECK(build_id_matches < 1, "build id match", |
1161 | "Didn't find expected build ID from the map"); | 1161 | "Didn't find expected build ID from the map\n"); |
1162 | 1162 | ||
1163 | disable_pmu: | 1163 | disable_pmu: |
1164 | ioctl(pmu_fd, PERF_EVENT_IOC_DISABLE); | 1164 | ioctl(pmu_fd, PERF_EVENT_IOC_DISABLE); |
diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile index 8f1e13d2e547..daf5effec3f0 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile | |||
@@ -5,7 +5,8 @@ CFLAGS = -Wall -Wl,--no-as-needed -O2 -g | |||
5 | CFLAGS += -I../../../../usr/include/ | 5 | CFLAGS += -I../../../../usr/include/ |
6 | 6 | ||
7 | TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh rtnetlink.sh | 7 | TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh rtnetlink.sh |
8 | TEST_PROGS += fib_tests.sh fib-onlink-tests.sh in_netns.sh pmtu.sh | 8 | TEST_PROGS += fib_tests.sh fib-onlink-tests.sh pmtu.sh |
9 | TEST_GEN_PROGS_EXTENDED := in_netns.sh | ||
9 | TEST_GEN_FILES = socket | 10 | TEST_GEN_FILES = socket |
10 | TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy | 11 | TEST_GEN_FILES += psock_fanout psock_tpacket msg_zerocopy |
11 | TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa | 12 | TEST_GEN_PROGS = reuseport_bpf reuseport_bpf_cpu reuseport_bpf_numa |