fixes and improvements for nvme_copy_test #3327
Merged
igaw merged 10 commits intolinux-nvme:masterfrom Apr 28, 2026
Merged
Conversation
25c3270 to
788303d
Compare
The file might already exist, thus in the case make sure it's truncated to zero before writing to it. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Implement Host Behavior Support in the feat plugin to enable its use in the nvme_copy_test test case, which currently relies on parsing raw log pages. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Replace the the raw output decoding of the Host Behavior Support feature with the new 'nvme feat host-behavior-support' command. Signed-off-by: Daniel Wagner <wagi@kernel.org>
get_lba_format_size incorrectly treats the 'ms' field as a power-of-2 exponent. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Report the result of each individual test instead of combining them. Signed-off-by: Daniel Wagner <wagi@kernel.org>
The copy test can only run with valid mcl, mssrl, and msrc values. Therefore, check that they are non-zero. QEMU’s default namespace settings set these values to 0. The user must set them explicitly, e.g -device nvme-ns,drive=ns0,nsid=1,mcl=1024,mssrl=1024,msrc=63 Signed-off-by: Daniel Wagner <wagi@kernel.org>
The setUp method was enabling all cross-namespace cdfe bits (CDF2E | CDF3E = 12) for every test, including format 0 and 1. Only enable support necessary descriptor version used in the test. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Copy Descriptor Formats 1h and 3h require the source namespace to be formatted with 64-bit guard protection information (pif=2 in the extended LBA format entry per nvm-id-ns). When the namespace uses a standard 16-bit guard LBA format the controller returns "Invalid Format" (0x410a). Signed-off-by: Daniel Wagner <wagi@kernel.org>
… PI mode When ns_mgmt_supported=False, TestNVMe.setUp/tearDown never touch the namespace. If the device is configured with 64-bit guard PI (e.g. QEMU started with pif=2, or namespace left reformatted by a previous run), copy descriptor format 0 and format 2 commands would fail with NVMe status "Invalid Format" instead of being skipped cleanly. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Teach the test framework about PI and MS. Signed-off-by: Daniel Wagner <wagi@kernel.org>
Collaborator
Author
|
Tested with various Qemu configurations:
All but one test passes (see #3321) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address the long standing decoding issue reported in #3232 by implementing
nvme feat host-behavior-suportedand update the test case to use it.Second split the nvme_copy_test into several sub tests so they reported independently.
Third, test if the device actually has valid values for mcl, mssrl, and msrc. Qemu's default settings are 0.
Fixes: #3232 #3322