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

tests/kernel/mem_protect/obj_validation fails build on some boards after recent changes #29263

Closed
pfalcon opened this issue Oct 16, 2020 · 3 comments · Fixed by #29291
Closed
Assignees
Labels
area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug

Comments

@pfalcon
Copy link
Contributor

pfalcon commented Oct 16, 2020

After #25641 : for boards mps2_an385, frdm_k64f, etc.:

01:39:38.262 /home/buildslave/workspace/zephyr-upstream/zephyr/tests/kernel/mem_protect/obj_validation/src/main.c: In function 'dyn_object_release':
01:39:38.262 /home/buildslave/workspace/zephyr-upstream/zephyr/tests/kernel/mem_protect/obj_validation/src/main.c:173:30: error: the comparison will always evaluate as 'true' for the address of 'test_dyn_mutex' will never be NULL [-Werror=address]
01:39:38.262   173 |  zassert_not_null(&test_dyn_mutex, "Can't allocate dynamical kobj");
01:39:38.262       |                              ^~
01:39:38.262 cc1: all warnings being treated as errors

Full sanitycheck build log: https://ci.linaro.org/view/lite-iot-ci/job/zephyr-upstream/5651/PLATFORM=mps2_an385,ZEPHYR_TOOLCHAIN_VARIANT=zephyr,label=docker-xenial-amd64-13/console

@pfalcon pfalcon added the bug The issue is a bug, or the PR is fixing a bug label Oct 16, 2020
@pfalcon pfalcon added the area: Tests Issues related to a particular existing or missing test label Oct 16, 2020
@nashif
Copy link
Member

nashif commented Oct 16, 2020

@pfalcon which toolchain are you using?

@nashif
Copy link
Member

nashif commented Oct 16, 2020

ok, i see above you are using zephyr sdk. Not able to reproduce this locally and in Zephyr's CI, wonder why this warning is active in your environment.

This is still an issue that needs to be fixed, @maksimmasalski you are checking the address, not the pointer.

@pfalcon
Copy link
Contributor Author

pfalcon commented Oct 16, 2020

The full picture can be seen here: https://ci.linaro.org/view/lite-iot-ci/job/zephyr-upstream/5650/ . The compile warning-as-error happens synchronously for both Zephyr SDK 0.11.4 and gnuarmemb gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2.

But it happens for disco_l475_iot1, frdm_k64f, mps2_an385, nucleo_f401re, and doesn't happen for cc3220sf_launchxl, frdm_kw41z, nucleo_f103rb, qemu_cortex_m3.

I have to admit I didn't try to reproduce locally - I usually do, but last couple of times I figure we were duplicating effort with a few other folks, so I decided to shoot a ticket first.

I'd also guess it's more or less clear there's a typo, in zassert_not_null(&test_dyn_mutex, "Can't allocate dynamical kobj"); , the & looks stray (unless there's a bigger logic error in context).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants