Hi, I was running make fullcheck when I found something weird. After editing the *expect.meta files , make fullcheck ran all tests and said "All tests passed", but the output included this (this is the last tests from test_metaflac.sh)> [...] > test case60: --remove --block-type=PICTURE... OK > test case61: --import-picture-from... OK > test case62: --import-picture-from... OK > Testing FLAC file with unknown metadata... OK > Testing FLAC replaygain 8000 (8000 x 1) ... awk: line 29: function > lshift never defined > ERROR, Expected -12.73 db instead of comment[1]: > REPLAYGAIN_TRACK_GAIN=-24601.00 dB > OK > [...] > Testing FLAC replaygain 192000 (48000 x 4) ... awk: line 29: function > lshift never defined > ERROR, Expected -14.16 db instead of comment[1]: > REPLAYGAIN_TRACK_GAIN=-24601.00 dB > OK > [...]I don't know why, but the test continues and says all tests passed while that clearly isn't the case. The error-message is echoed by the die function, but for some reason the script isn't exited at all. It seems exit is ignored in the "run_metaflac --list $flacfile | grep REPLAYGAIN.*GAIN= | while read -r REPLAYGAIN ; do" loop, probably because it is in a pipe or something? I get this problem with both bash and dash. I don't know how to fix this. It might be important, because there have been some changes in the way metaflac handles adding replaygain to files with a samplerate > 48000Hz.
Martijn van Beurden wrote:> I was running make fullcheck when I found something weird. After editing > the *expect.meta files , make fullcheck ran all tests and said "All > tests passed", but the output included this (this is the last tests from > test_metaflac.sh) > > > [...] > > test case60: --remove --block-type=PICTURE... OK > > test case61: --import-picture-from... OK > > test case62: --import-picture-from... OK > > Testing FLAC file with unknown metadata... OK > > Testing FLAC replaygain 8000 (8000 x 1) ... awk: line 29: function > > lshift never definedThat's an error in the awk script, which is embedded in the shell script. I know GNU awk supports lshift, maybe BSD awk doesn't. I'll investigate that futher.> I don't know why, but the test continues and says all tests passed while > that clearly isn't the case.When the error is detected in the shell script it does abort. I'll look at that more closely after I've figured out the lshift issue. Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
On 24-04-13 14:34, Erik de Castro Lopo wrote:> That's an error in the awk script, which is embedded in the shell > script. I know GNU awk supports lshift, maybe BSD awk doesn't. I'll > investigate that futher.On my system awk links to mawk 1.3.3>> I don't know why, but the test continues and says all tests passed while >> that clearly isn't the case. > When the error is detected in the shell script it does abort. I'll look > at that more closely after I've figured out the lshift issue.awk stops, but the script keeps running here. For some reason exit (and die) don't function inside this loop.