Skip to content

make check not working on RHEL7: bash 4.2.46 #7

@xambroz

Description

@xambroz

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions