Skip to content

Commit 5838f46

Browse files
Geliang Tangintel-lab-lkp
authored andcommitted
Squash to "selftests/bpf: Add bpf scheduler test"
Now ss_search() are only used by bpf_sched tests. It will be dropped in next step. Signed-off-by: Geliang Tang <[email protected]>
1 parent 1febacf commit 5838f46

File tree

1 file changed

+7
-1
lines changed
  • tools/testing/selftests/bpf/prog_tests

1 file changed

+7
-1
lines changed

tools/testing/selftests/bpf/prog_tests/mptcp.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,15 @@ static struct nstoken *sched_init(char *flags, char *sched)
480480
return NULL;
481481
}
482482

483+
static int ss_search(char *src, char *dst, char *port, char *keyword)
484+
{
485+
return SYS_NOFAIL("ip netns exec %s ss -enita src %s dst %s %s %d | grep -q '%s'",
486+
NS_TEST, src, dst, port, PORT_1, keyword);
487+
}
488+
483489
static int has_bytes_sent(char *dst)
484490
{
485-
return _ss_search(ADDR_1, dst, "sport", "bytes_sent:");
491+
return ss_search(ADDR_1, dst, "sport", "bytes_sent:");
486492
}
487493

488494
static void send_data_and_verify(char *sched, bool addr1, bool addr2)

0 commit comments

Comments
 (0)