Skip to content

Commit 20b5a9d

Browse files
committed
nvme effects-log block device is not allowed
When using the "effects-log" command in nvme-cli without specifying the "csi" argument, a default action is added to check the ctrl register, allowing only character devices like nvme0. In older versions of nvme-cli, the default value of csi was set to 0 and issued without any problems But it has been fixed now. It can be used regardless of the version when used as a character device. Reference: linux-nvme/nvme-cli#2742 Signed-off-by: Steven Seungcheol Lee <[email protected]>
1 parent c7e2d39 commit 20b5a9d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/autoval_ssd/lib/utils/storage/nvme/nvme_drive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,9 @@ def get_effects_log(self):
550550
TestStepError
551551
When fails to retrieve the command effects log.
552552
"""
553-
cmd = "nvme effects-log /dev/%s -o json" % self.block_name
553+
pattern = re.compile(r'^(nvme\d+)(?=n)')
554+
char_name = pattern.match(self.block_name).group(1)
555+
cmd = "nvme effects-log /dev/%s -o json" % char_name
554556
out = self.host.run(cmd=cmd)
555557
return json.loads(out)
556558

0 commit comments

Comments
 (0)