CommandLineUnitTests failure on CentOS 7 / GCC 9.3.1
Summary
Yet more of std::filesystem
shenanigans. Only affects tests.
The reference file name in tests is not generated correctly: we should transform a.pdb.gz
to a.pdb
, but instead get a.pdb.gz/a.pdb
.
From https://gromacs.bioexcel.eu/t/gromacs-2023-1-25-commandlineunittests-failed/6367:
[RUN] ParseCommonArgsTest.HandlesCompressedFiles
/data/a/lore***/GROMACS/gromacs-2023.1/gromacs-2023.1/src/gromacs/commandline/tests/pargs.cpp:422: Failure
Expected equality of these values:
expectedF.u8string()
Which is: "/data/a/lore****/GROMACS/gromacs-2023.1/gromacs-2023.1/build_create_andy_gcc9ucx_nopme_hpcx/src/gromacs/commandline/tests/Testing/Temporary/ParseCommonArgsTest_HandlesCompressedFiles.pdb.gz/ParseCommonArgsTest_HandlesCompressedFiles.pdb"
opt2fn("-f", nfile(), fnm)
This is: "/data/a/lore****/GROMACS/gromacs-2023.1/gromacs-2023.1/build_create_andy_gcc9ucx_nopme_hpcx/src/gromacs/commandline/tests/Testing/Temporary/ParseCommonArgsTest_HandlesCompressedFiles.pdb"
/data/a/lore****/GROMACS/gromacs-2023.1/gromacs-2023.1/src/gromacs/commandline/tests/pargs.cpp:423: Fails
Expected equality of these values:
expectedG.u8string()
Which is: "/data/a/lore****/GROMACS/gromacs-2023.1/gromacs-2023.1/build_create_andy_gcc9ucx_nopme_hpcx/src/gromacs/commandline/tests/Testing/Temporary/ParseCommonArgsTest_HandlesCompressedFiles.gro.Z/ParseCommonArgsTest_HandlesCompressedFiles.gro"
opt2fn("-g", nfile(), fnm)
This is: "/data/a/lore****/GROMACS/gromacs-2023.1/gromacs-2023.1/build_create_andy_gcc9ucx_nopme_hpcx/src/gromacs/commandline/tests/Testing/Temporary/ParseCommonArgsTest_HandlesCompressedFiles.gro"
[ FAILED ] ParseCommonArgsTest.HandlesCompressedFiles (6 ms)
Note: There is a secondary issue of EXPECT_EQ
poorly handling the pairing of std::filesystem::path
with const char*
, but that is easily solved with .u8string()
.
Exact steps to reproduce
Build GROMACS in centos:7
container with GCC9 enablement, run tests.
For developers: Why is this important?
That looks like a bug in the standard library of a particular compiler version, but people are using it and get worried about the failed tests.
Edited by Andrey Alekseenko