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 <vent...@google.com> wrote:

>
>
> On Mon, Feb 21, 2022 at 5:30 AM Peter Maydell <peter.mayd...@linaro.org>
> wrote:
>
>> On Wed, 16 Feb 2022 at 17:30, Peter Maydell <peter.mayd...@linaro.org>
>> wrote:
>> >
>> > On Tue, 8 Feb 2022 at 18:18, Patrick Venture <vent...@google.com>
>> wrote:
>> > >
>> > > From: Shengtan Mao <st...@google.com>
>> > >
>> > > Reviewed-by: Hao Wu <wuhao...@google.com>
>> > > Reviewed-by: Chris Rauer <cra...@google.com>
>> > > Signed-off-by: Shengtan Mao <st...@google.com>
>> > > Signed-off-by: Patrick Venture <vent...@google.com>
>> > > ---
>> >
>> >
>> >
>> > 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
>>
>

Reply via email to