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. On Tue, Feb 22, 2022 at 5:28 PM Patrick Venture <[email protected]> wrote: > > > On Mon, Feb 21, 2022 at 5:30 AM Peter Maydell <[email protected]> > wrote: > >> On Wed, 16 Feb 2022 at 17:30, Peter Maydell <[email protected]> >> wrote: >> > >> > On Tue, 8 Feb 2022 at 18:18, Patrick Venture <[email protected]> >> wrote: >> > > >> > > 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. >> >> 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. >> > > 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. > > >> >> thanks >> -- PMM >> >
