提交 febec9cb 编写于 作者: C Cong 提交者: GitHub

Merge pull request #1112 from yanan-fu/nvdimm_dax

qemu.tests.nvdimm: Avoid "nvdimm_dax" be referenced before assignment
......@@ -113,8 +113,7 @@ def run(test, params, env):
process.system("grep 'memmap=' /proc/cmdline")
except process.CmdError:
test.error("Please add kernel param 'memmap' before start test.")
nvdimm_dax = params.get("nvdimm_dax", "no") == "yes"
if nvdimm_dax:
if params.get("nvdimm_dax") == "yes":
try:
process.system(params["ndctl_install_cmd"], shell=True)
except process.CmdError:
......@@ -168,7 +167,7 @@ def run(test, params, env):
if nvdimm_test.session:
nvdimm_test.session.close()
vm.destroy()
if nvdimm_dax:
if params.get("nvdimm_dax") == "yes":
try:
process.system(params["del_dax_cmd"], timeout=240, shell=True)
except process.CmdError:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册