DEP8 failure due to stderr output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pytest (Ubuntu) |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
pytest 7.1.2 is failing migration because its test now produces stderr output. Specifically, this comes from the "lsof -v" command it runs to check if lsof is available:
autopkgtest [14:33:03]: test unittests-3: [------
lsof version information:
revision: 4.95.0
latest revision: https:/
latest FAQ: https:/
latest (non-formatted) man page: https:/
compiler: cc
compiler version: 11.3.0 (Ubuntu 11.3.0-1ubuntu1)
compiler flags: -g -O2 -ffile-
loader flags: -L./lib -llsof -Wl,-Bsymbolic-
Anyone can list all files.
/dev warnings are disabled.
Kernel ID check is disabled.
...
==== 2908 passed, 68 skipped, 4 deselected, 9 xfailed in 202.43s (0:03:22) =====
autopkgtest [14:36:26]: test unittests-3: -------
autopkgtest [14:36:26]: test unittests-3: - - - - - - - - - - results - - - - - - - - - -
unittests-3 FAIL stderr: lsof version information:
autopkgtest [14:36:27]: test unittests-3: - - - - - - - - - - stderr - - - - - - - - -
It's unclear why this started happening just now. "lsof -v" didn't change behavior, the allow-stderr flag was not in d/t/control in previous releases, and we can even see the "lsof -v" output in previous test runs that succeeded.
We can either add the allow-stderr flag to d/t/control, at the risk of relaxing the test a bit, or patch pytest to send "lsof -v" to stdout instead, like this:
- subprocess.
+ subprocess.
In debian this isn't failing because lsof is not installed, and since it's not listed as a dependency in d/t/control, the lsof check is just never run, and thus we don't have stderr output.
description: | updated |
File descriptor leaks are also sent to stderr:
unittests-3 FAIL stderr: testing/ test_assertion. py:1456: PytestWarning: ***** 6 FD leakage detected
Upstream is treating file descriptor leaks as warnings instead of errors since https:/ /github. com/nicoddemus/ pytest/ commit/ d9a2e70155a85e7 69d32a1e1fbe7e6 55203e9575
So let's allow stderr