Skip to content

tests/tap_runner: intercept stderr#3244

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
igaw:fix-tap-runner
Apr 7, 2026
Merged

tests/tap_runner: intercept stderr#3244
igaw merged 1 commit intolinux-nvme:masterfrom
igaw:fix-tap-runner

Conversation

@igaw
Copy link
Copy Markdown
Collaborator

@igaw igaw commented Apr 7, 2026

Obviously, besides intercepting stdout, the tap runner should also intercept stderr.

root@79d7b51a2cc1:/build/nvme-cli# /usr/bin/python3 /build/nvme-cli/tests/tap_runner.py --start-dir /build/nvme-cli/tests nvme_attach_detach_ns_test
TAP version 13
1..1
#
# Using nvme binary 'nvme'
# find: ‘/sys/devices/system/cpu/cpu7/thermal_throttle’: Permission denied
# find: ‘/sys/devices/system/cpu/cpu5/thermal_throttle’: Permission denied
# find: ‘/sys/devices/system/cpu/cpu3/thermal_throttle’: Permission denied
# find: ‘/sys/devices/system/cpu/cpu1/thermal_throttle’: Permission denied
# find: ‘/sys/devices/system/cpu/cpu6/thermal_throttle’: Permission denied
# find: ‘/sys/devices/system/cpu/cpu4/thermal_throttle’: Permission denied
# find: ‘/sys/devices/system/cpu/cpu2/thermal_throttle’: Permission denied
# find: ‘/sys/devices/system/cpu/cpu0/thermal_throttle’: Permission denied
# find: ‘/sys/devices/virtual/powercap’: Permission denied
# /bin/sh: 1: nvme: not found
not ok 1 - test_attach_detach_ns (TestNVMeAttachDetachNSCmd)
# Traceback (most recent call last):
#   File "/usr/lib/python3.13/unittest/case.py", line 58, in testPartExecutor
#     yield
#   File "/usr/lib/python3.13/unittest/case.py", line 647, in run
#     self._callSetUp()
#     ~~~~~~~~~~~~~~~^^
#   File "/usr/lib/python3.13/unittest/case.py", line 603, in _callSetUp
#     self.setUp()
#     ~~~~~~~~~~^^
#   File "/build/nvme-cli/tests/nvme_attach_detach_ns_test.py", line 50, in setUp
#     super().setUp()
#     ~~~~~~~~~~~~~^^
#   File "/build/nvme-cli/tests/nvme_test.py", line 85, in setUp
#     self.ns_mgmt_supported = self.get_ns_mgmt_support()
#                              ~~~~~~~~~~~~~~~~~~~~~~~~^^
#   File "/build/nvme-cli/tests/nvme_test.py", line 237, in get_ns_mgmt_support
#     oacs = to_decimal(self.get_id_ctrl_field_value("oacs"))
#                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
#   File "/build/nvme-cli/tests/nvme_test.py", line 345, in get_id_ctrl_field_value
#     self.assertEqual(err, 0, "ERROR : reading id-ctrl failed")
#     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# AssertionError: 127 != 0 : ERROR : reading id-ctrl failed
#
#

Obviously, besides intercepting stdout, the tap runner should also
intercept stderr.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
@igaw igaw merged commit 59f52fc into linux-nvme:master Apr 7, 2026
28 checks passed
@igaw igaw deleted the fix-tap-runner branch April 7, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant