You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: skip 16-bit guard copy tests when namespace is in 64-bit guard 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.
Add two helpers to TestNVMeCopy:
- _get_current_ns_pif(): reads flbas from id-ns to determine the active
lbaf index (NVMe spec FLBAS bit-field encoding), then looks up pif from
the corresponding nvm-id-ns elbaf entry.
- _check_16b_guard_ns(): calls skipTest if ns_mgmt is unavailable and
the active namespace PI format is not 16-bit guard (pif != 0).
Wire the check into:
- TestNVMeCopyFormat0.setUp() (new setUp override)
- TestNVMeCopyFormat23.test_copy_format_2()
- TestNVMeCopyFormat23.test_copy_format_2_sopts()
When ns_mgmt IS supported, TestNVMe.setUp() already recreates the
namespace with flbas=0 (no metadata/PI), so the check is a no-op.
Agent-Logs-Url: https://github.com/igaw/nvme-cli/sessions/c4376a88-dd31-47dc-b3d2-b6ad16fc190c
Co-authored-by: igaw <1050803+igaw@users.noreply.github.com>
0 commit comments