tests/qtest: add qtests for npcm7xx sdhci
PATCH v3 1/1 tests/qtest: add qtests for npcm7xx sdhci
From: Shengtan Mao <[email protected]>
---
v3:
* fixup compilation from missing macro value
v2:
* update copyright year
* check result of open
* use g_free instead of free
* move declarations to the top
* use g_file_open_tmp
--- tests/qtest/meson.build | 1 + tests/qtest/npcm7xx_sdhci-test.c | 215 +++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100644 tests/qtest/npcm7xx_sdhci-test.c
tests/qtest/meson.build +1 -0
@@ -189,6 +189,7 @@ qtests_npcm7xx = \ 'npcm7xx_gpio-test', 'npcm7xx_pwm-test', 'npcm7xx_rng-test', + 'npcm7xx_sdhci-test', 'npcm7xx_smbus-test', 'npcm7xx_timer-test', 'npcm7xx_watchdog_timer-test'] + \
tests/qtest/npcm7xx_sdhci-test.c new file +215 -0
215 lines not on this page · raw message
Signature · 1 line
2.35.0.263.gb82422642f-goog
Peter Maydell
AppliedQuoted 8 lines · Patrick Venture
From: Shengtan Mao <[email protected]>
Reviewed-by Hao Wu <[email protected]>Reviewed-by Chris Rauer <[email protected]>Signed-off-by Shengtan Mao <[email protected]>Signed-off-by Patrick Venture <[email protected]>---
Applied to target-arm.next, thanks.
-- PMM
Quoted 13 lines · Peter Maydell
Quoted 8 lines · Patrick Venture
From: Shengtan Mao <[email protected]>
Reviewed-by Hao Wu <[email protected]>Reviewed-by Chris Rauer <[email protected]>Signed-off-by Shengtan Mao <[email protected]>Signed-off-by Patrick Venture <[email protected]>---
Quoted 1 line
Applied to target-arm.next, thanks.
This hits assertions in some of the CI jobs, eg:
https://gitlab.com/qemu-project/qemu/-/jobs/2116932769
258/717 qemu:qtest+qtest-arm / qtest-arm/npcm7xx_sdhci-test INTERRUPT 643.16s killed by signal 6 SIGABRT ――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――― stderr:
** Message: 06:06:50.205: /tmp/sdhci_F7ETH1
**
ERROR:../tests/qtest/npcm7xx_sdhci-test.c:101:sdwrite_read: assertion
failed: (!strcmp(rmsg, msg)) ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ...terminated.
so I've dropped it again.
thanks
-- PMM
Quoted 30 lines · Peter Maydell
Quoted 13 lines · Peter Maydell
Quoted 8 lines · Patrick Venture
From: Shengtan Mao <[email protected]>
Reviewed-by Hao Wu <[email protected]>Reviewed-by Chris Rauer <[email protected]>Signed-off-by Shengtan Mao <[email protected]>Signed-off-by Patrick Venture <[email protected]>---
Quoted 1 line
Applied to target-arm.next, thanks.
This hits assertions in some of the CI jobs, eg:
https://gitlab.com/qemu-project/qemu/-/jobs/2116932769258/717 qemu:qtest+qtest-arm / qtest-arm/npcm7xx_sdhci-test INTERRUPT 643.16s killed by signal 6 SIGABRT ――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――
stderr:
** Message: 06:06:50.205:/tmp/sdhci_F7ETH1
** ERROR:../tests/qtest/npcm7xx_sdhci-test.c:101:sdwrite_read: assertion
failed: (!strcmp(rmsg, msg))
Quoted 5 lines
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ...terminated.
so I've dropped it again.
I'm sorry to hear that, I'll have to pick up some cycles in a week or so and see if I can reproduce the issue.
Quoted 4 lines
thanks
-- PMM
The problem is probably because we read it in using "strcmp". strcmp compares two strings that end with "\0". But one of the string is read in using read() so it didn't read in the ending '\0' character.
We should use strncmp to compare the two strings. It probably avoids the issue.
Quoted 51 lines · Patrick Venture
Quoted 31 lines · Peter Maydell
Quoted 2 lines · Peter Maydell
On Tue, 8 Feb 2022 at 18:18, Patrick Venture <[email protected]>
Quoted 11 lines · wrote:
Quoted 8 lines
From: Shengtan Mao <[email protected]>
Reviewed-by Hao Wu <[email protected]>Reviewed-by Chris Rauer <[email protected]>Signed-off-by Shengtan Mao <[email protected]>Signed-off-by Patrick Venture <[email protected]>---
Quoted 1 line
Applied to target-arm.next, thanks.
This hits assertions in some of the CI jobs, eg:
https://gitlab.com/qemu-project/qemu/-/jobs/2116932769258/717 qemu:qtest+qtest-arm / qtest-arm/npcm7xx_sdhci-test INTERRUPT 643.16s killed by signal 6 SIGABRT ――――――――――――――――――――――――――――――――――――― ✀ ―――――――――――――――――――――――――――――――――――――
stderr:
** Message: 06:06:50.205:/tmp/sdhci_F7ETH1
** ERROR:../tests/qtest/npcm7xx_sdhci-test.c:101:sdwrite_read: assertion
failed: (!strcmp(rmsg, msg))Quoted 5 lines
―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ...terminated.
so I've dropped it again.
I'm sorry to hear that, I'll have to pick up some cycles in a week or so and see if I can reproduce the issue.
Quoted 4 lines
thanks
-- PMM