Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What was the failure message?
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.
Ideally we won't stuck on older versions forever or else we cannot get security updates.
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.
It fails most "compat" tests with some strange "file not found" errors. It might be just a bug in the tests, but I would feel uneasy running
cryptsetup
that could break something that is "compat".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.
Is this with or without sandbox? The latest cryptsetup also checks block devices for other filesystems and prevent corruption that way. That's means I would also feel uneasy to not having this safety feature.
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.
I cannot reproduce the failure. Tests works for me: https://gist.github.com/Mic92/a603aea57ecd079b76903a54d3e1dd90#file-cryptsetup-log-L406
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.
ok,
File not found
could be the script itself, please try to usepatchShebangs
instead:https://gitlab.com/cryptsetup/cryptsetup/blob/master/tests/compat-test#L1
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.
There seem to be 2 issues here:
The
file not found
error above is sandbox-related (although patchShebangs is already used). Still trying to find the reason.With sandboxing disabled, the
compat
test runs and succeeds if the build directory is on an ext4 fs, but 2 test cases fail if the build directory is on a btrfs fs (which is my default here). This is weird. We cannot have test success depend on the what fs the build dir is on, so we will need to disable the failing cases.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.
No, actually it's only one issue: the test uses an internal tool
unit-utils-io
to read/write blocks in the fileblocwise_localfile
. This file exists butunit-utils-io
opens it withO_DIRECT
https://gitlab.com/cryptsetup/cryptsetup/blob/master/tests/unit-utils-io.c#L92, which is forbidden on a tmpfs and on btrfs (which produces thefile not found
errors - tmpfs in sandbox, btrfs without sandbox) but allowed on ext4. This is just stupid.@oxij @Mic92 what should we do? We could
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.
Either
O_DIRECT is not implemented on zfs. It is a braindead interface anyway.
Reverting just because a test does not work in our build environment is pointless as the test works perfectly fine without it.
Actually we already have integration tests for cryptsetup. And don't think we need to duplicate upstream testing beyond a certain level in our own systems. Most of the critical stuff in cryptsetup is implemented in the kernel anyway.
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.
I'm implementing a solution to patch out O_DIRECT and disable the remaining 4 test cases. PR will follow shortly.