Hey Nam, I see that wget unexpectedly writes a log file (from test-suite.log):
Redirecting output to ‘wget-log’. In log.c, L973 (function check_redirect()), writing the log is caused by pid_t foreground_pgrp = tcgetpgrp (STDIN_FILENO);if (foreground_pgrp != -1 && foreground_pgrp != getpgrp () && !opt.quiet)
{ /* Process backgrounded */ redirect_output (true,NULL); }By knowing this, I can reproduce your issue now (on Linux) with a `make check &`, running the test suite in the background.
Looks like commit dd5c549f6af8e1143e1a6ef66725eea4bcd9ad50 introduced this behavior.
I am currently not sure how to best solve it except by not running the tests in the background.
Regards, Tim On 7/1/23 02:21, Nam Nguyen wrote:
I am trying to get unit tests to pass for the openbsd port of wget 1.21.4. 80 unit tests in test/ and more in testenv/ currently fail. test-suite.log: http://namtsui.com/public/wget-test-suite.txt All failing tests are of the form: --8<---------------cut here---------------start------------->8--- Test failed: unexpected downloaded files [wget-log] FAIL Test-auth-basic.px (exit status: 1) --8<---------------cut here---------------end--------------->8--- With the following two patches, tests pass, no tests fail and a small number are skipped. These patches get rid of the error on extra files. Perhaps the generation of wget-log is messing with the test suite? --8<---------------cut here---------------start------------->8--- Index: testenv/conf/expected_files.py --- testenv/conf/expected_files.py.orig +++ testenv/conf/expected_files.py @@ -55,4 +55,3 @@ class ExpectedFiles: raise TestFailed('Expected file %s not found.' % file.name) if local_fs: print(local_fs) - raise TestFailed('Extra files downloaded.') Index: tests/WgetTests.pm --- tests/WgetTests.pm.orig +++ tests/WgetTests.pm @@ -365,8 +365,6 @@ sub _verify_download ); if (@unexpected_downloads) { - return 'Test failed: unexpected downloaded files [' . - (join ', ', @unexpected_downloads) . "]\n";}--8<---------------cut here---------------end--------------->8---before:--8<---------------cut here---------------start------------->8--- ============================================================================ Testsuite summary for wget 1.21.4 ============================================================================ # TOTAL: 94 # PASS: 5 # SKIP: 9 # XFAIL: 0 # FAIL: 80 # XPASS: 0 # ERROR: 0 ============================================================================ See tests/test-suite.log --8<---------------cut here---------------end--------------->8--- after patches: --8<---------------cut here---------------start------------->8--- SKIP: Test-https-pfs.px SKIP: Test-https-tlsv1x.px SKIP: Test-https-selfsigned.px SKIP: Test-https-tlsv1.px SKIP: Test-https-clientcert.px SKIP: Test-https-badcerts.px SKIP: Test-https-weboftrust.px SKIP: Test-https-crl.px ============================================================================ Testsuite summary for wget 1.21.4 ============================================================================ # TOTAL: 94 # PASS: 85 # SKIP: 9 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 SKIP: Test-no_proxy-env.py ============================================================================ Testsuite summary for wget 1.21.4 ============================================================================ # TOTAL: 45 # PASS: 44 # SKIP: 1 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0 ============================================================================ --8<---------------cut here---------------end--------------->8---
OpenPGP_signature
Description: OpenPGP digital signature