containers / composefs

The reliability of disk images, the flexibility of files
Other
461 stars 36 forks source link

With 1.0.4 tests can not be run #305

Closed dvzrv closed 3 months ago

dvzrv commented 4 months ago

Hi! :wave:

I package this project for Arch Linux. With 1.0.3 I was still able to do make -k check -C <source_dir> after build. With 1.0.4 I am no longer able to do that, as there appear to be hardcoded paths and e.g. gendir or composefs-info are not found and the tests fail.

With 1.0.4 I have to do cd <source_dir> && make -k check to get tests to work.

Seeing how #301 is about to deprecate autotools (yay) I guess this is likely soon not going to be a problem anymore though.

The tests show:

Making check in libcomposefs
make[1]: Entering directory '/build/composefs/src/composefs-1.0.4/libcomposefs'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/build/composefs/src/composefs-1.0.4/libcomposefs'
Making check in tools
make[1]: Entering directory '/build/composefs/src/composefs-1.0.4/tools'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/build/composefs/src/composefs-1.0.4/tools'
Making check in tests
make[1]: Entering directory '/build/composefs/src/composefs-1.0.4/tests'
VALGRIND_PREFIX="" ./test-units.sh "./../tools/"
Test options: can_whiteout=y has_fuse=n has_fsck=n has_fsverity=n
Test test_inline: OK
Test test_objects: OK
Test test_mount_digest: OK
./test-units.sh: line 77: composefs-info: command not found
assertion failed:  = 37061ef2ac4c21bec68489b56138c5780306a4ad7fe6676236ecdf2c9027cd92
assertion failed:  = 91e7d88cb7bc9cf6d8db3b0ecf89af4abf204bef5b3ade5113d5b62ef374e70b
/build/composefs/src/composefs-1.0.4/tests
Test test_composefs_info_measure_files: OK
VALGRIND_PREFIX="" ./test-checksums.sh "./../tools/" "./assets" "config.dump.gz config-with-hard-link.dump.gz special.dump special_v1.dump cs9-x86_64-developer.dump.gz cs9-x86_64-minimal.dump.gz f36-x86_64-silverblue.dump.gz"
Test options: can_whiteout=y has_fuse=n has_fsck=n has_fsverity=n
Verifying config.dump.gz
Verifying config-with-hard-link.dump.gz
Verifying special.dump --min-version=0 --max-version=0
Verifying special_v1.dump --min-version=1 --max-version=1
Verifying cs9-x86_64-developer.dump.gz
Verifying cs9-x86_64-minimal.dump.gz
Verifying f36-x86_64-silverblue.dump.gz
VALGRIND_PREFIX="" ./test-random-fuse.sh "./../tools/"
Test options: can_whiteout=y has_fuse=n has_fsck=n has_fsverity=n
Generating root dir
./test-random-fuse.sh: line 28: ./gendir: cannot execute: required file not found
make[1]: *** [Makefile:484: check-random-fuse] Error 127
make[1]: Target 'check' not remade because of errors.
make[1]: Leaving directory '/build/composefs/src/composefs-1.0.4/tests'
make[1]: Entering directory '/build/composefs/src/composefs-1.0.4'
make[1]: Leaving directory '/build/composefs/src/composefs-1.0.4'
make: *** [Makefile:582: check-recursive] Error 1
make: Target 'check' not remade because of errors.
dvzrv commented 4 months ago

In https://github.com/containers/composefs/commit/f7465b3a57935d96451b392b07aa3a1dafb56e7b the issue with composefs-info appears to be fixed.

However, this still leaves us with the missing ./gendir:

Making check in libcomposefs
make[1]: Entering directory '/build/composefs/src/composefs-1.0.4/libcomposefs'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/build/composefs/src/composefs-1.0.4/libcomposefs'
Making check in tools
make[1]: Entering directory '/build/composefs/src/composefs-1.0.4/tools'
make[1]: Nothing to be done for 'check'.
make[1]: Leaving directory '/build/composefs/src/composefs-1.0.4/tools'
Making check in tests
make[1]: Entering directory '/build/composefs/src/composefs-1.0.4/tests'
VALGRIND_PREFIX="" ./test-units.sh "./../tools/"
Test options: can_whiteout=y has_fuse=n has_fsck=n has_fsverity=n
Test test_inline: OK
Test test_objects: OK
Test test_mount_digest: OK
/build/composefs/src/composefs-1.0.4/tests
Test test_composefs_info_measure_files: OK
VALGRIND_PREFIX="" ./test-checksums.sh "./../tools/" "./assets" "config.dump.gz config-with-hard-link.dump.gz special.dump special_v1.dump cs9-x86_64-developer.dump.gz cs9-x86_64-minimal.dump.gz f36-x86_64-silverblue.dump.gz"
Test options: can_whiteout=y has_fuse=n has_fsck=n has_fsverity=n
Verifying config.dump.gz
Verifying config-with-hard-link.dump.gz
Verifying special.dump --min-version=0 --max-version=0
Verifying special_v1.dump --min-version=1 --max-version=1
Verifying cs9-x86_64-developer.dump.gz
Verifying cs9-x86_64-minimal.dump.gz
Verifying f36-x86_64-silverblue.dump.gz
VALGRIND_PREFIX="" ./test-random-fuse.sh "./../tools/"
Test options: can_whiteout=y has_fuse=n has_fsck=n has_fsverity=n
Generating root dir
./test-random-fuse.sh: line 28: ./gendir: cannot execute: required file not found
make[1]: *** [Makefile:484: check-random-fuse] Error 127
make[1]: Target 'check' not remade because of errors.
make[1]: Leaving directory '/build/composefs/src/composefs-1.0.4/tests'
make[1]: Entering directory '/build/composefs/src/composefs-1.0.4'
make[1]: Leaving directory '/build/composefs/src/composefs-1.0.4'
make: *** [Makefile:582: check-recursive] Error 1
make: Target 'check' not remade because of errors.

I am a bit puzzled. Are these tests not run in CI on every commit?

cgwalters commented 3 months ago

The tests work for me locally.

Are these tests not run in CI on every commit?

Yes (one can see the logs in the actions tab), e.g. https://github.com/containers/composefs/actions/runs/10161729417/job/28100839893

./test-random-fuse.sh: line 28: ./gendir: cannot execute: required file not found

I think the error is perhaps confusing; read it more carefully. It's not that the file itself is missing, it's that it has #!/usr/bin/python3 - are you sure you're not just missing that?

dvzrv commented 3 months ago

It's not that the file itself is missing, it's that it has #!/usr/bin/python3 - are you sure you're not just missing that?

Ah, it appears that something dragged in Python in the previous build of the package and does no longer do that.

The autotools build system does not fail on this though (and the new meson based build system seems to also not search for Python availability AFAICT). If Python is an explicit test requirement, the build system needs to make sure, that it is available.