GNU bug report logs -
#35762
When `test-driver` script + `check` testing framework are writing to same logfile = corrupted output
Previous Next
Reported by: howaboutsynergy <at> protonmail.com
Date: Thu, 16 May 2019 14:32:01 UTC
Severity: normal
Done: Karl Berry <karl <at> freefriends.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
A possible fix, or mitigation, based on the answer by John Bollinger[1] follows. I have tested this to work[2] even though it requires changes[2] in the program that created the test(s) executables and that program is 'check' - A unit testing framework for C [3].
[1] https://stackoverflow.com/a/56168216/11509478
[2] https://github.com/libcheck/check/issues/188#issuecomment-493161758
[3] https://github.com/libcheck/check
--- /tmp/test-driver 2018-09-18 15:06:54.000000000 +0200
+++ /usr/share/automake-1.16/test-driver 2019-05-16 17:58:09.690988983 +0200
@@ -104,7 +104,8 @@ trap "st=141; $do_exit" 13
trap "st=143; $do_exit" 15
# Test script is run here.
-"$@" >$log_file 2>&1
+echo -n "" >"$log_file"
+"$@" >>"$log_file" 2>&1
estatus=$?
if test $enable_hard_errors = no && test $estatus -eq 99; then
(the above patch is also attached)
Cheers.
[a.patch (text/x-patch, attachment)]
[publickey - howaboutsynergy@protonmail.com - 0x947B9B34.asc (application/pgp-keys, attachment)]
[signature.asc (application/pgp-signature, attachment)]
This bug report was last modified 4 years and 259 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.