diff options
Diffstat (limited to 'src/lib/tests/shm_rbuff_test.c')
-rw-r--r-- | src/lib/tests/shm_rbuff_test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/tests/shm_rbuff_test.c b/src/lib/tests/shm_rbuff_test.c index d07f79a2..1d16a09d 100644 --- a/src/lib/tests/shm_rbuff_test.c +++ b/src/lib/tests/shm_rbuff_test.c @@ -93,11 +93,19 @@ int shm_rbuff_test(int argc, printf("success [%zd entries].\n\n", shm_rbuff_queued(rb)); + /* empty the rbuff */ + while (shm_rbuff_read(rb) >= 0) + ; + shm_rbuff_destroy(rb); return 0; error: + /* empty the rbuff */ + while (shm_rbuff_read(rb) >= 0) + ; + shm_rbuff_destroy(rb); err: printf("failed.\n\n"); |