Browse Source

tests: app_kernel: restore the PIPE_NOBUFF variant

... now that the new pipe implementation supports it.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
pull/84302/head
Nicolas Pitre 6 months ago committed by Benjamin Cabé
parent
commit
99c2057bb6
  1. 11
      tests/benchmarks/app_kernel/src/master.c
  2. 4
      tests/benchmarks/app_kernel/src/pipe_b.c
  3. 4
      tests/benchmarks/app_kernel/src/pipe_r.c

11
tests/benchmarks/app_kernel/src/master.c

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
BENCH_BMEM char msg[MAX_MSG];
BENCH_BMEM char data_bench[MESSAGE_SIZE];
BENCH_DMEM struct k_pipe *test_pipes[] = {&PIPE_SMALLBUFF, &PIPE_BIGBUFF};
BENCH_DMEM struct k_pipe *test_pipes[] = {&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF};
BENCH_BMEM char sline[SLINE_LEN + 1];
/*
@ -70,6 +70,7 @@ K_MBOX_DEFINE(MAILB1); @@ -70,6 +70,7 @@ K_MBOX_DEFINE(MAILB1);
K_MUTEX_DEFINE(DEMO_MUTEX);
K_PIPE_DEFINE(PIPE_NOBUFF, 0, 4);
K_PIPE_DEFINE(PIPE_SMALLBUFF, 256, 4);
K_PIPE_DEFINE(PIPE_BIGBUFF, 4096, 4);
@ -187,7 +188,7 @@ int main(void) @@ -187,7 +188,7 @@ int main(void)
k_thread_access_grant(&recv_thread, &DEMOQX1, &DEMOQX4, &DEMOQX192,
&MB_COMM, &CH_COMM, &SEM0, &SEM1, &SEM2, &SEM3,
&SEM4, &STARTRCV, &DEMO_MUTEX,
&PIPE_SMALLBUFF, &PIPE_BIGBUFF);
&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF);
k_thread_start(&recv_thread);
k_thread_start(&test_thread);
@ -211,7 +212,7 @@ int main(void) @@ -211,7 +212,7 @@ int main(void)
k_thread_access_grant(&test_thread, &DEMOQX1, &DEMOQX4, &DEMOQX192,
&MB_COMM, &CH_COMM, &SEM0, &SEM1, &SEM2, &SEM3,
&SEM4, &STARTRCV, &DEMO_MUTEX,
&PIPE_SMALLBUFF, &PIPE_BIGBUFF);
&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF);
k_thread_start(&recv_thread);
k_thread_start(&test_thread);
@ -235,11 +236,11 @@ int main(void) @@ -235,11 +236,11 @@ int main(void)
k_thread_access_grant(&test_thread, &DEMOQX1, &DEMOQX4, &DEMOQX192,
&MB_COMM, &CH_COMM, &SEM0, &SEM1, &SEM2, &SEM3,
&SEM4, &STARTRCV, &DEMO_MUTEX,
&PIPE_SMALLBUFF, &PIPE_BIGBUFF);
&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF);
k_thread_access_grant(&recv_thread, &DEMOQX1, &DEMOQX4, &DEMOQX192,
&MB_COMM, &CH_COMM, &SEM0, &SEM1, &SEM2, &SEM3,
&SEM4, &STARTRCV, &DEMO_MUTEX,
&PIPE_SMALLBUFF, &PIPE_BIGBUFF);
&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF);
k_thread_start(&recv_thread);
k_thread_start(&test_thread);

4
tests/benchmarks/app_kernel/src/pipe_b.c

@ -90,7 +90,7 @@ void pipe_test(void) @@ -90,7 +90,7 @@ void pipe_test(void)
PRINT_STRING(dashline);
for (putsize = 8U; putsize <= MESSAGE_SIZE_PIPE; putsize <<= 1) {
for (pipe = 0; pipe < 2; pipe++) {
for (pipe = 0; pipe < 3; pipe++) {
putcount = NR_OF_PIPE_RUNS;
pipeput(test_pipes[pipe], _ALL_N, putsize, putcount,
&puttime[pipe]);
@ -125,7 +125,7 @@ void pipe_test(void) @@ -125,7 +125,7 @@ void pipe_test(void)
for (putsize = 8U; putsize <= (MESSAGE_SIZE_PIPE); putsize <<= 1) {
putcount = MESSAGE_SIZE_PIPE / putsize;
for (pipe = 0; pipe < 2; pipe++) {
for (pipe = 0; pipe < 3; pipe++) {
pipeput(test_pipes[pipe], _1_TO_N, putsize,
putcount, &puttime[pipe]);
/* size*count == MESSAGE_SIZE_PIPE */

4
tests/benchmarks/app_kernel/src/pipe_r.c

@ -36,7 +36,7 @@ void piperecvtask(void) @@ -36,7 +36,7 @@ void piperecvtask(void)
/* matching (ALL_N) */
for (getsize = 8; getsize <= MESSAGE_SIZE_PIPE; getsize <<= 1) {
for (pipe = 0; pipe < 2; pipe++) {
for (pipe = 0; pipe < 3; pipe++) {
getcount = NR_OF_PIPE_RUNS;
pipeget(test_pipes[pipe], _ALL_N, getsize,
getcount, &gettime);
@ -52,7 +52,7 @@ void piperecvtask(void) @@ -52,7 +52,7 @@ void piperecvtask(void)
/* non-matching (1_TO_N) */
for (getsize = (MESSAGE_SIZE_PIPE); getsize >= 8; getsize >>= 1) {
getcount = MESSAGE_SIZE_PIPE / getsize;
for (pipe = 0; pipe < 2; pipe++) {
for (pipe = 0; pipe < 3; pipe++) {
/* size*count == MESSAGE_SIZE_PIPE */
pipeget(test_pipes[pipe], _1_TO_N,
getsize, getcount, &gettime);

Loading…
Cancel
Save