[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 41/56] tests/unit: Strengthen FIFO8 tests
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 41/56] tests/unit: Strengthen FIFO8 tests |
Date: |
Wed, 11 Sep 2024 14:14:06 +0200 |
Replace reused bytes { 0x1, 0x2, 0x3, 0x4 } by { 0x9, 0xa, 0xb, 0xc }
to be sure a different value is overwritten.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20240906132909.78886-2-philmd@linaro.org>
---
tests/unit/test-fifo.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/unit/test-fifo.c b/tests/unit/test-fifo.c
index 1e54cde871..9b3a4940d0 100644
--- a/tests/unit/test-fifo.c
+++ b/tests/unit/test-fifo.c
@@ -22,7 +22,7 @@ static void test_fifo8_pop_bufptr_wrap(void)
{
Fifo8 fifo;
uint8_t data_in1[] = { 0x1, 0x2, 0x3, 0x4 };
- uint8_t data_in2[] = { 0x5, 0x6, 0x7, 0x8, 0x1, 0x2 };
+ uint8_t data_in2[] = { 0x5, 0x6, 0x7, 0x8, 0x9, 0xa };
const uint8_t *buf;
uint32_t count;
@@ -65,7 +65,7 @@ static void test_fifo8_peek_bufptr_wrap(void)
{
Fifo8 fifo;
uint8_t data_in1[] = { 0x1, 0x2, 0x3, 0x4 };
- uint8_t data_in2[] = { 0x5, 0x6, 0x7, 0x8, 0x1, 0x2 };
+ uint8_t data_in2[] = { 0x5, 0x6, 0x7, 0x8, 0x9, 0xa };
const uint8_t *buf;
uint32_t count;
@@ -112,7 +112,7 @@ static void test_fifo8_pop_buf_wrap(void)
{
Fifo8 fifo;
uint8_t data_in1[] = { 0x1, 0x2, 0x3, 0x4 };
- uint8_t data_in2[] = { 0x5, 0x6, 0x7, 0x8, 0x1, 0x2, 0x3, 0x4 };
+ uint8_t data_in2[] = { 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc };
uint8_t data_out[4];
int count;
@@ -126,8 +126,8 @@ static void test_fifo8_pop_buf_wrap(void)
g_assert(count == 4);
count = fifo8_pop_buf(&fifo, data_out, 4);
g_assert(count == 4);
- g_assert(data_out[0] == 0x1 && data_out[1] == 0x2 &&
- data_out[2] == 0x3 && data_out[3] == 0x4);
+ g_assert(data_out[0] == 0x9 && data_out[1] == 0xa &&
+ data_out[2] == 0xb && data_out[3] == 0xc);
g_assert(fifo8_num_used(&fifo) == 0);
fifo8_destroy(&fifo);
@@ -157,7 +157,7 @@ static void test_fifo8_peek_buf_wrap(void)
{
Fifo8 fifo;
uint8_t data_in1[] = { 0x1, 0x2, 0x3, 0x4 };
- uint8_t data_in2[] = { 0x5, 0x6, 0x7, 0x8, 0x1, 0x2, 0x3, 0x4 };
+ uint8_t data_in2[] = { 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc };
uint8_t data_out[4];
int count;
--
2.45.2
- [PULL 28/56] hw/char/pl011: Extract pl011_read_rxdata() from pl011_read(), (continued)
- [PULL 28/56] hw/char/pl011: Extract pl011_read_rxdata() from pl011_read(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 38/56] fifo8: add fifo8_peek_buf() function, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 36/56] fifo8: rename fifo8_pop_buf() to fifo8_peekpop_buf(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 42/56] tests/unit: Expand test_fifo8_peek_buf_wrap() coverage, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 37/56] fifo8: honour do_pop argument in fifo8_peekpop_buf(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 39/56] fifo8: introduce fifo8_peek() function, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 43/56] tests/unit: Comment FIFO8 tests, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 44/56] hw/char/escc: convert Sun mouse to use QemuInputHandler, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 35/56] fifo8: replace fifo8_pop_bufptr() with fifo8_peekpop_bufptr() in fifo8_pop_buf(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 40/56] tests/unit: add test-fifo unit test, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 41/56] tests/unit: Strengthen FIFO8 tests,
Philippe Mathieu-Daudé <=
- [PULL 45/56] hw/input/adb-mouse: convert to use QemuInputHandler, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 46/56] hw/char: replace assert(0) with g_assert_not_reached(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 47/56] hw/core: replace assert(0) with g_assert_not_reached(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 48/56] hw/watchdog: replace assert(0) with g_assert_not_reached(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 49/56] hw/gpio: remove break after g_assert_not_reached(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 50/56] hw/misc: remove break after g_assert_not_reached(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 51/56] hw/pci-host: remove break after g_assert_not_reached(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 52/56] system: replace assert(0) with g_assert_not_reached(), Philippe Mathieu-Daudé, 2024/09/11
- [PULL 53/56] ui/sdl2: release all modifiers, Philippe Mathieu-Daudé, 2024/09/11
- [PULL 54/56] ui/sdl2: ignore GUI keys in SDL_TEXTINPUT handler, Philippe Mathieu-Daudé, 2024/09/11