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

build system: race condition when building and running an app for native #20948

Open
maribu opened this issue Nov 4, 2024 · 2 comments
Open
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@maribu
Copy link
Member

maribu commented Nov 4, 2024

Description

make BOARD=native -C tests/unittests all test -j

Seems to be racy: At least occasionally an old binary seems to be run. This is probably

Steps to reproduce the issue

Run make BOARD=native -C tests/unittests all test -j, it should pass. Add e.g. TEST_ASSERT_EQUAL_INT(1, 0); to one of the tests and run make BOARD=native -C tests/unittests all test -j. This time it should fail, but it will pass again. Run make BOARD=native -C tests/unittests all test -j again, this time it will fail as expected.

Expected results

make BOARD=native -C tests/unittests all test -j should build and run the test using the freshly build executable.

Actual results

At least occasionally, the old binary is run instead.

Versions

Current master.

@maribu maribu added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Nov 4, 2024
@Enoch247
Copy link
Contributor

Enoch247 commented Nov 4, 2024

Is this only true for the native board, or just only known to be true for native, and unproven/tests for other boards?

@maribu
Copy link
Member Author

maribu commented Nov 4, 2024

I have never observed this on other boards. But there is an explicit flash target needed. Probably tests does correctly depend on flash (if that is among the goals), and flash correctly depends on the linked binary. native is special in the regard that flash is a no-op.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

2 participants