提交 29795544 编写于 作者: A Andrea Bolognani

tests: testQemuCapsIterate: Validate suffix

We're going to depend on the fact that the suffix starts with a
dot later on, so we better ensure that it does.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Reviewed-by: NJiri Denemark <jdenemar@redhat.com>
上级 85394f67
......@@ -906,6 +906,12 @@ testQemuCapsIterate(const char *suffix,
if (!callback)
return 0;
/* Validate suffix */
if (!STRPREFIX(suffix, ".")) {
VIR_TEST_VERBOSE("malformed suffix '%s'", suffix);
goto cleanup;
}
if (virDirOpen(&dir, TEST_QEMU_CAPS_PATH) < 0)
goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册