Skip to content

Commit 99c2057

Browse files
Nicolas Pitrekartben
authored andcommitted
tests: app_kernel: restore the PIPE_NOBUFF variant
... now that the new pipe implementation supports it. Signed-off-by: Nicolas Pitre <[email protected]>
1 parent 29ae9e3 commit 99c2057

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

tests/benchmarks/app_kernel/src/master.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
BENCH_BMEM char msg[MAX_MSG];
2424
BENCH_BMEM char data_bench[MESSAGE_SIZE];
2525

26-
BENCH_DMEM struct k_pipe *test_pipes[] = {&PIPE_SMALLBUFF, &PIPE_BIGBUFF};
26+
BENCH_DMEM struct k_pipe *test_pipes[] = {&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF};
2727
BENCH_BMEM char sline[SLINE_LEN + 1];
2828

2929
/*
@@ -70,6 +70,7 @@ K_MBOX_DEFINE(MAILB1);
7070

7171
K_MUTEX_DEFINE(DEMO_MUTEX);
7272

73+
K_PIPE_DEFINE(PIPE_NOBUFF, 0, 4);
7374
K_PIPE_DEFINE(PIPE_SMALLBUFF, 256, 4);
7475
K_PIPE_DEFINE(PIPE_BIGBUFF, 4096, 4);
7576

@@ -187,7 +188,7 @@ int main(void)
187188
k_thread_access_grant(&recv_thread, &DEMOQX1, &DEMOQX4, &DEMOQX192,
188189
&MB_COMM, &CH_COMM, &SEM0, &SEM1, &SEM2, &SEM3,
189190
&SEM4, &STARTRCV, &DEMO_MUTEX,
190-
&PIPE_SMALLBUFF, &PIPE_BIGBUFF);
191+
&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF);
191192

192193
k_thread_start(&recv_thread);
193194
k_thread_start(&test_thread);
@@ -211,7 +212,7 @@ int main(void)
211212
k_thread_access_grant(&test_thread, &DEMOQX1, &DEMOQX4, &DEMOQX192,
212213
&MB_COMM, &CH_COMM, &SEM0, &SEM1, &SEM2, &SEM3,
213214
&SEM4, &STARTRCV, &DEMO_MUTEX,
214-
&PIPE_SMALLBUFF, &PIPE_BIGBUFF);
215+
&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF);
215216

216217
k_thread_start(&recv_thread);
217218
k_thread_start(&test_thread);
@@ -235,11 +236,11 @@ int main(void)
235236
k_thread_access_grant(&test_thread, &DEMOQX1, &DEMOQX4, &DEMOQX192,
236237
&MB_COMM, &CH_COMM, &SEM0, &SEM1, &SEM2, &SEM3,
237238
&SEM4, &STARTRCV, &DEMO_MUTEX,
238-
&PIPE_SMALLBUFF, &PIPE_BIGBUFF);
239+
&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF);
239240
k_thread_access_grant(&recv_thread, &DEMOQX1, &DEMOQX4, &DEMOQX192,
240241
&MB_COMM, &CH_COMM, &SEM0, &SEM1, &SEM2, &SEM3,
241242
&SEM4, &STARTRCV, &DEMO_MUTEX,
242-
&PIPE_SMALLBUFF, &PIPE_BIGBUFF);
243+
&PIPE_NOBUFF, &PIPE_SMALLBUFF, &PIPE_BIGBUFF);
243244

244245
k_thread_start(&recv_thread);
245246
k_thread_start(&test_thread);

tests/benchmarks/app_kernel/src/pipe_b.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void pipe_test(void)
9090
PRINT_STRING(dashline);
9191

9292
for (putsize = 8U; putsize <= MESSAGE_SIZE_PIPE; putsize <<= 1) {
93-
for (pipe = 0; pipe < 2; pipe++) {
93+
for (pipe = 0; pipe < 3; pipe++) {
9494
putcount = NR_OF_PIPE_RUNS;
9595
pipeput(test_pipes[pipe], _ALL_N, putsize, putcount,
9696
&puttime[pipe]);
@@ -125,7 +125,7 @@ void pipe_test(void)
125125

126126
for (putsize = 8U; putsize <= (MESSAGE_SIZE_PIPE); putsize <<= 1) {
127127
putcount = MESSAGE_SIZE_PIPE / putsize;
128-
for (pipe = 0; pipe < 2; pipe++) {
128+
for (pipe = 0; pipe < 3; pipe++) {
129129
pipeput(test_pipes[pipe], _1_TO_N, putsize,
130130
putcount, &puttime[pipe]);
131131
/* size*count == MESSAGE_SIZE_PIPE */

tests/benchmarks/app_kernel/src/pipe_r.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void piperecvtask(void)
3636
/* matching (ALL_N) */
3737

3838
for (getsize = 8; getsize <= MESSAGE_SIZE_PIPE; getsize <<= 1) {
39-
for (pipe = 0; pipe < 2; pipe++) {
39+
for (pipe = 0; pipe < 3; pipe++) {
4040
getcount = NR_OF_PIPE_RUNS;
4141
pipeget(test_pipes[pipe], _ALL_N, getsize,
4242
getcount, &gettime);
@@ -52,7 +52,7 @@ void piperecvtask(void)
5252
/* non-matching (1_TO_N) */
5353
for (getsize = (MESSAGE_SIZE_PIPE); getsize >= 8; getsize >>= 1) {
5454
getcount = MESSAGE_SIZE_PIPE / getsize;
55-
for (pipe = 0; pipe < 2; pipe++) {
55+
for (pipe = 0; pipe < 3; pipe++) {
5656
/* size*count == MESSAGE_SIZE_PIPE */
5757
pipeget(test_pipes[pipe], _1_TO_N,
5858
getsize, getcount, &gettime);

0 commit comments

Comments
 (0)