Merging upstream version 2.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
888be815c6
commit
e4376063b0
521 changed files with 21541 additions and 21644 deletions
|
@ -20,15 +20,16 @@
|
|||
""" Base class for all the testcases
|
||||
"""
|
||||
|
||||
import re
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import mmap
|
||||
import stat
|
||||
import time
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import stat
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
from nose import tools
|
||||
from nose.tools import assert_equal
|
||||
from nvme_test_logger import TestNVMeLogger
|
||||
|
@ -477,3 +478,26 @@ class TestNVMe(object):
|
|||
encoding='utf-8')
|
||||
run_io_result = run_io.communicate()[1]
|
||||
assert_equal(run_io_result, None)
|
||||
|
||||
def supp_check_id_ctrl(self, key):
|
||||
""" Wrapper for support check.
|
||||
- Args:
|
||||
- key : search key.
|
||||
- Returns:
|
||||
- value for key requested.
|
||||
"""
|
||||
id_ctrl = "nvme id-ctrl " + self.ctrl
|
||||
print("\n" + id_ctrl)
|
||||
proc = subprocess.Popen(id_ctrl,
|
||||
shell=True,
|
||||
stdout=subprocess.PIPE,
|
||||
encoding='utf-8')
|
||||
err = proc.wait()
|
||||
assert_equal(err, 0, "ERROR : nvme Identify controller Data \
|
||||
structure failed")
|
||||
for line in proc.stdout:
|
||||
if key in line:
|
||||
key = line.replace(",", "", 1)
|
||||
print(key)
|
||||
val = (key.split(':'))[1].strip()
|
||||
return int(val, 16)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue