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

make check not working on RHEL7: bash 4.2.46 #7

Open
xambroz opened this issue May 23, 2024 · 3 comments
Open

make check not working on RHEL7: bash 4.2.46 #7

xambroz opened this issue May 23, 2024 · 3 comments

Comments

@xambroz
Copy link

xambroz commented May 23, 2024

Hello,
the checks, specifically tests/test_library.sh fails on RHEL7 due to some shell script compatibility issue (bash version 4.2.46).
Instead of running the cfile_test_file with each one of the files in input/set1, it runs:

cfile_test_file 'input/set1/block_size_file input/set1/empty_file input/set1/small_file'
$ make check
make  cfile_test_error cfile_test_file cfile_test_notify cfile_test_support cfile_test_system_string cfi
le_test_winapi test_library.sh test_manpage.sh test_runner.sh
make[1]: Entering directory `/home/mambroz/rpmbuild/BUILD/libcfile-538ec50e581a3b7e136ab0d1a3731b0475680
450/tests'
make[1]: `cfile_test_error' is up to date.
make[1]: `cfile_test_file' is up to date.
make[1]: `cfile_test_notify' is up to date.
make[1]: `cfile_test_support' is up to date.
make[1]: `cfile_test_system_string' is up to date.
make[1]: `cfile_test_winapi' is up to date.
make[1]: Nothing to be done for `test_library.sh'.
make[1]: Nothing to be done for `test_manpage.sh'.
make[1]: Nothing to be done for `test_runner.sh'.
make[1]: Leaving directory `/home/mambroz/rpmbuild/BUILD/libcfile-538ec50e581a3b7e136ab0d1a3731b0475680450/tests'
make  check-TESTS
make[1]: Entering directory `/home/mambroz/rpmbuild/BUILD/libcfile-538ec50e581a3b7e136ab0d1a3731b0475680450/tests'
make[2]: Entering directory `/home/mambroz/rpmbuild/BUILD/libcfile-538ec50e581a3b7e136ab0d1a3731b0475680
450/tests'
FAIL: test_library.sh
make[3]: Entering directory `/home/mambroz/rpmbuild/BUILD/libcfile-538ec50e581a3b7e136ab0d1a3731b0475680
450/tests'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/mambroz/rpmbuild/BUILD/libcfile-538ec50e581a3b7e136ab0d1a3731b04756804
50/tests'
============================================================================
Testsuite summary for libcfile 20240414
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0

$ tail test-suite.log

Testing: error (PASS)
Testing: notify (PASS)
Testing: support (PASS)
Testing: system_string (PASS)
Testing: winapi (PASS)
cfile_test_file.c:1587 result (-1) != 1
Unable to run test: libcfile_file_open
Testing: file with input: input/set1/block_size_file input/set1/empty_file input/set1/small_file (FAIL)


On platforms with newer bash (like Fedora 40) it also doesn't do what was intended. It runs just with one file:

$ ./test_library.sh 
Testing: error (PASS)
Testing: notify (PASS)
Testing: support (PASS)
Testing: system_string (PASS)
Testing: winapi (PASS)
Testing: file with input: input/set1/block_size_file (PASS)
xambroz added a commit to xambroz/libcfile that referenced this issue May 24, 2024
@joachimmetz
Copy link
Member

On platforms with newer bash (like Fedora 40) it also doesn't do what was intended. It runs just with one file:

This is what it supposed to be doing, why do you conclude that "doesn't do what was intended" ?

I'll have a look when time permits, a better approach might be switching to autotest (libyal/libyal#84)

@joachimmetz joachimmetz changed the title test_library.sh fails on RHEL7, doesn't work as intended in Fedora 40 make check not working on RHEL7: bash 4.2.46 May 24, 2024
@joachimmetz
Copy link
Member

On platforms with newer bash (like Fedora 40) it also doesn't do what was intended. It runs just with one file:

Did you intend to say that the test is only run once, instead for every input file ?

@xambroz
Copy link
Author

xambroz commented May 28, 2024

Yes ... on newer bash it is running just on the first file from the available input files. On the example given on just one file out of 3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants