View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000386 | file | General | public | 2022-10-01 06:18 | 2022-10-09 18:00 |
Reporter | delphij | Assigned To | christos | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 5.43 | ||||
Summary | 0000386: tests/gpkg-1-zst.result contains an extra \n | ||||
Description | (I'm not 100% sure if this is a defect or not; it was discovered by FreeBSD CI, and https://ci.freebsd.org/job/FreeBSD-main-amd64-test/22193/testReport/usr.bin.file/file_test/contrib_file_tests/ is an example) So basically what our test cases does is that for each *.testfile under file's tests/, it does a "file --brief" on it and compare the trimmed output against the .result. The code can be found here: https://cgit.freebsd.org/src/tree/usr.bin/file/tests/file_test.sh In file 5.42, a test case was added for gpkg-1-zst.testfile, but the result contained an extra \n at the end, so the cmp would fail because the result is no longer exactly identical. | ||||
Steps To Reproduce | $ file --brief tests/gpkg-1-zst.testfile | tr -d '\012' > /tmp/actual $ cmp tests/gpkg-1-zst.result /tmp/actual cmp: EOF on /tmp/actual Expected result: cmp should give empty result. | ||||
Additional Information | Proposed fix would be to remove the trailing \n so it matches the others: truncate -s 85 tests/gpkg-1-zst.result and possibly run the tests as part of CI process for file :) However, I am not 100% sure if the omission of the trailing \n's were intentional for these .result files. It took me some time to understand why the FreeBSD test case was removing the \n (https://cgit.freebsd.org/src/tree/usr.bin/file/tests/file_test.sh#n43). So please consider either applying this fix or changing all the .result files so that they have a trailing \n. | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2022-10-01 06:18 | delphij | New Issue | |
2022-10-09 18:00 | christos | Assigned To | => christos |
2022-10-09 18:00 | christos | Status | new => assigned |
2022-10-09 18:00 | christos | Status | assigned => resolved |
2022-10-09 18:00 | christos | Resolution | open => fixed |
2022-10-09 18:00 | christos | Note Added: 0003828 |