Skip to content

More cleanups for tap_runner#3245

Merged
igaw merged 3 commits intolinux-nvme:masterfrom
igaw:fix-ci
Apr 8, 2026
Merged

More cleanups for tap_runner#3245
igaw merged 3 commits intolinux-nvme:masterfrom
igaw:fix-ci

Conversation

@igaw
Copy link
Copy Markdown
Collaborator

@igaw igaw commented Apr 8, 2026

TAP and Meson has some rules how to handle the stdout and stderr, this brings it in line. It's not perfect in the sense that all stderr should be guarded inside a YAML block or '#'. While not ideal, it's valid and keeping the tap_runner simple is more important IMO.

4/76 nvme-cli - nvme_get_features_test                                  FAIL             3.42s   0/1 subtests passed
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ✀  ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――
stderr:
/dev/nvme0: Resource temporarily unavailable
Usage: nvme get-feature <device> [OPTIONS]

Read operating parameters of the specified controller. Operating parameters
are grouped and identified by Feature Identifiers; each Feature Identifier
contains one or more attributes that may affect behavior of the feature.
Each Feature has three possible settings: default, saveable, and current. If
a Feature is saveable, it may be modified by set-feature. Default values are
vendor-specific and not changeable. Use set-feature to change saveable
Features.

Options:
  [  --verbose, -v ]                    --- Increase output verbosity
  [  --output-format=<FMT>, -o <FMT> ]  --- Output format:
                                            normal|json|binary|tabular
  [  --feature-id=<NUM>, -f <NUM> ]     --- feature identifier
  [  --namespace-id=<NUM>, -n <NUM> ]   --- identifier of desired namespace
  [  --sel=<NUM>, -s <NUM> ]            --- [0-3]:
                                            current/default/saved/supported
  [  --data-len=<NUM>, -l <NUM> ]       --- buffer len (if) data is sent or
                                            received
  [  --raw-binary, -b ]                 --- show feature in binary format
  [  --cdw11=<NUM>, -c <NUM> ]          --- feature specific dword 11
  [  --uuid-index=<NUM>, -U <NUM> ]     --- specify uuid index
  [  --human-readable, -H ]             --- show feature in readable format
  [  --changed, -C ]                    --- show feature changed
  [  --timeout=<NUM> ]                  --- timeout value, in milliseconds
  [  --dry-run ]                        --- show command instead of executing
  [  --no-retries ]                     --- disable retry logic on errors
  [  --no-ioctl-probing ]               --- disable 64-bit IOCTL support
                                            probing
  [  --output-format-version=<NUM> ]    --- output format version: 1|2
  ---
  traceback: |
    Traceback (most recent call last):
      File "/usr/lib/python3.11/unittest/case.py", line 57, in testPartExecutor
        yield
      File "/usr/lib/python3.11/unittest/case.py", line 623, in run
        self._callTestMethod(testMethod)
      File "/usr/lib/python3.11/unittest/case.py", line 579, in _callTestMethod
        if method() is not None:
           ^^^^^^^^
      File "/home/wagi/work/nvme-cli/tests/nvme_get_features_test.py", line 106, in test_get_mandatory_features
        self.get_mandatory_features(feature_id)
      File "/home/wagi/work/nvme-cli/tests/nvme_get_features_test.py", line 91, in get_mandatory_features
        self.assertEqual(proc.wait(), 0)
    AssertionError: 1 != 0
  ...

and a snippet from the Meson's log file:

test:         nvme-cli - nvme_ctrl_reset_test
start time:   09:18:42
duration:     1.44s
result:       exit status 0
command:      MALLOC_PERTURB_=32 PATH=/home/wagi/work/nvme-cli/.build-debian:/usr/bin:/usr/sbin /usr/bin/python3 /home/wagi/work/nvme-cli/tests/tap_runner.py --start-dir /home/wagi/work/nvme-cli/tests nvme_ctrl_reset_test
----------------------------------- stdout -----------------------------------
TAP version 13
1..1
# Using nvme binary 'nvme'
# setup: ctrl: /dev/nvme0, ns1: /dev/nvme0n1, default_nsid: 1, flbas: 0
# Running io: dd if=/dev/nvme0n1 of=/dev/null bs=512 count=10 > /dev/null 2>&1
# Running io: dd if=/dev/zero of=/dev/nvme0n1 bs=512 count=10 > /dev/null 2>&1
ok 1 - test_ctrl_reset (TestNVMeCtrlReset)
==============================================================================

and when running them directly:

$  /usr/bin/python3 /nvme-cli/tests/tap_runner.py --start-dir /nvme-cli/tests nvme_get_features_test
TAP version 13
1..1
# Using nvme binary 'nvme'
# setup: ctrl: /dev/nvme0, ns1: /dev/nvme0n1, default_nsid: 1, flbas: 0
ok 1 - test_get_mandatory_features (TestNVMeGetMandatoryFeatures)

igaw added 3 commits April 8, 2026 11:19
Ensure the config file is found.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
The TAP allows to have stderr output and meson test is also expecting
the errors reported on stderr. So don't intercept the stderr and forward
it to stdout. This reduces the whole tap runner complexity quite a bit.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
This is adding unnecessary output to every run. Make it optional.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
@igaw igaw merged commit 48b4976 into linux-nvme:master Apr 8, 2026
29 checks passed
@igaw igaw deleted the fix-ci branch April 8, 2026 09:25
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