Skip to content

Commit e8eee34

Browse files
committed
nvme_cli/tests: test suit/nvme_compare_test failed
1 parent f5b985f commit e8eee34

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/nvme_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def create_ns(self, nsze, ncap, flbas, dps):
358358
"""
359359
create_ns_cmd = f"{self.nvme_bin} create-ns {self.ctrl} " + \
360360
f"--nsze={str(nsze)} --ncap={str(ncap)} --flbas={str(flbas)} " + \
361-
f"--dps={str(dps)} --verbose --output-format=json"
361+
f"--dps={str(dps)}"
362362
return subprocess.Popen(create_ns_cmd, shell=True,
363363
stdout=subprocess.PIPE, encoding='utf-8')
364364

@@ -376,8 +376,8 @@ def create_and_validate_ns(self, nsid, nsze, ncap, flbas, dps):
376376
proc = self.create_ns(nsze, ncap, flbas, dps)
377377
err = proc.wait()
378378
if err == 0:
379-
json_output = json.loads(proc.stdout.read())
380-
self.assertEqual(int(json_output['nsid']), nsid,
379+
output = proc.stdout.read()
380+
self.assertEqual(int(output.strip().split(':')[-1]), nsid,
381381
"ERROR : create namespace failed")
382382
id_ns_cmd = f"{self.nvme_bin} id-ns {self.ctrl} " + \
383383
f"--namespace-id={str(nsid)}"

0 commit comments

Comments
 (0)