Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a few fixes in test.c #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

a few fixes in test.c #4

wants to merge 2 commits into from

Conversation

Vigeant
Copy link

@Vigeant Vigeant commented May 4, 2020

  • added a missing include,
  • allocate enough room for a null byte on the heap for msg (the first test failed on my system)
  • initialize the msg heap chunk with null bytes.

Fixed test to allocate anough memory to store a nullbyte. The first test
was failing on my system because msg was not terminated by a null byte
and failed the strcmp in certain conditions. I also added iitialization
of the heap chunk.
@lyusupov
Copy link

lyusupov commented May 1, 2021

I confirm that the test fails on Raspberry Pi unless this patch b6eab95 is applied.

pi@raspberrypi:/run/tmp/libmodes $ ./tests/test  dump.bin
validating message #1
test: tests/test.c:87: test: Assertion `strcmp(msg, messages[msgNo++]) == 0' failed.
Aborted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants