-
Notifications
You must be signed in to change notification settings - Fork 0
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
Reproducible Docker build for test cases in src/test #288
base: main
Are you sure you want to change the base?
Conversation
increases portability of the docker-helper, allowing it to be used similar to 'opam env'. strips almost all docker configuration from makefiles
I think it was 11.3.0 |
The docker-helper.sh script seems to assume podman is being used. |
It does, but it should be overridable. I'll update the docs to mention this. |
For
when running
|
You seem to have \r\n line endings in the src/test/make/docker-flake.txt file. I'll see if i can force \n line endings in a gitattributes. |
Oh I thought I'd fixed that but I guess not |
Just checking, do you use git through WSL or through just Windows? WSL, I'd think, wouldn't have this problem. |
A much better solution is to add a .gitattributes file to mandate that .sh files (& whichever other files you are referencing in your scripts) keep LF line endings and but I hadn't bothered to do that previously because it hadn't really been much of a nuisance with previous bash scripts. |
I was planning to do that, I was just curious. |
in particular, using docker instead of podman
At the very least, all of the following probably should have eol=lf but I'm probably missing something since I'm still having an issue with
Docker works to lift everything, it's just incredibly slow (unsurprisingly). The md5 sums all match. There's still a bunch of test cases where it needs to be added to the config files not to compile the BAP or GTIRB variants - it's mostly GTIRB variants in the indirect_calls folder I think. The .expected files will need to be updated before merging since they're still for the earlier version I think? |
What happens with md5sum-check? |
but I can't track down where the |
src/test/make/docker-helper.sh
Outdated
elif [[ "$1" == stop ]]; then | ||
# starts the instance of the docker image. | ||
set -x | ||
exec $DOCKER rm -f -t 1 $unique_container |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work with docker, only podman, since docker doesn't have a -t flag for rm
docker stop supports -t, unlike docker rm.
I can't encounter this, even after forcing git to use crlf by default. You can try (very carefully) resetting the src/test directory: |
worked fine once I fixed the line endings in compiled.md5sum, which is how I knew the md5sums were fine, but the |
@l-kent For correct/syscall/gcc_O2, can I trouble you to build the test case with update: i've docker-installed ubuntu:22.04 and it looks like it has
This leads to
So, I feel justified in adding |
Diffs in We fail 54 tests compared to 30 failing in main. I'll take a look, maybe it's BAP-related. Edit: As of 05e7deb, indirect call tests are fixed and 38 tests fail. |
makes this not tied to specific adt files
This has been my pet project for a while and my continuous focus for the last week and a bit. It has been through a fair bit of beta-testing to work out some kinks. Hopefully, it is a well-prepared change.
The effect of this PR is to remove all of the committed lifter outputs from src/test/ and replace them with a system to compile and lift them in a reproducible way. This is done with a Docker image which contains fixed versions of the required tools, a number of scripts to tie it together, and hashes recorded within the repository in place of the committed files.
Please see https://github.com/UQ-PAC/BASIL/blob/nix-docker-build/src/test/readme.md for documentation about the Docker build. If you want to try out the changes, that readme should have all the steps needed (let me know if anything is not clear).
Note! The SystemTests are not passing. I will need some help to work these out, since the changes to ADT/GTIRB files might be very large since they were last updated in the repository.
There are obvious benefits:
We foresaw the following pain points and have worked to reduce them:
There are also drawbacks / limitations.
Anticipated questions:
Catalogue of changed files:
To make the changes easier to see, I have made a diff which excludes all the generated file changes: https://gist.github.com/katrinafyi/23f9a7de5b99cf1843814ccb72302e18.
In summary,
Orthogonal but related changes:
TODO