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

Running all.sh --force on a clean repository removes programs/fuzz/Makefile #6247

Closed
AndrzejKurek opened this issue Aug 30, 2022 · 3 comments · Fixed by #6248
Closed

Running all.sh --force on a clean repository removes programs/fuzz/Makefile #6247

AndrzejKurek opened this issue Aug 30, 2022 · 3 comments · Fixed by #6248
Assignees
Labels
bug component-test Test framework and CI scripts good-first-issue Good for newcomers priority-low Low priority - this may not receive review soon

Comments

@AndrzejKurek
Copy link
Contributor

This forces the user to discard programs/fuzz/Makefile changes to regain a working repository copy.

@AndrzejKurek AndrzejKurek added bug good-first-issue Good for newcomers component-test Test framework and CI scripts priority-low Low priority - this may not receive review soon labels Aug 30, 2022
@gilles-peskine-arm
Copy link
Contributor

Same with Makefile, programs/Makefile, etc. This is because some components use CMake in-tree, and that overwrites **/Makefile. It's documented. The point of --force is to say you don't mind this.

Why is this issue about programs/fuzz/Makefile specificatlly? Just the one you happened to notice, or is it / should it be treated differently from the others?

@AndrzejKurek
Copy link
Contributor Author

Oh, maybe I wasn't specific enough. The script fails to execute and does not clean after itself on a fresh repository:

./tests/scripts/all.sh test_full_cmake_gcc_asan --force
cp: cannot stat 'include/mbedtls/mbedtls_config.h.all.bak': No such file or directory
git status
On branch pkcs5-no-md
Your branch is up to date with 'AndrzejKurek/pkcs5-no-md'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    programs/fuzz/Makefile

no changes added to commit (use "git add" and/or "git commit -a")

@gilles-peskine-arm
Copy link
Contributor

Ah. And there's more. Using --force on a clean repository causes another error:

cp: cannot stat 'include/mbedtls/mbedtls_config.h.all.bak': No such file or directory

And after that, programs/fuzz/Makefile is deleted. So there are in fact two bugs here. Probably unrelated, but worth fixing together.

@gilles-peskine-arm gilles-peskine-arm self-assigned this Aug 30, 2022
gilles-peskine-arm added a commit to gilles-peskine-arm/mbedtls that referenced this issue Aug 30, 2022
Other programs/*/Makefile are only created by CMake, but programs/fuzz has
its own Makefile in the repository. Fixes Mbed-TLS#6247.

Signed-off-by: Gilles Peskine <[email protected]>
gilles-peskine-arm added a commit to gilles-peskine-arm/mbedtls that referenced this issue Sep 22, 2022
Other programs/*/Makefile are only created by CMake, but programs/fuzz has
its own Makefile in the repository. Fixes Mbed-TLS#6247.

Signed-off-by: Gilles Peskine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component-test Test framework and CI scripts good-first-issue Good for newcomers priority-low Low priority - this may not receive review soon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants