提交 c1c1ff7e 编写于 作者: J Jiri Denemark

tests: Fix detection of expected error

上级 49c612b3
......@@ -102,17 +102,15 @@ cleanup:
static int test0(const void *unused ATTRIBUTE_UNUSED)
{
virCommandPtr cmd;
char *log;
int ret = -1;
free(virtTestLogContentAndReset());
cmd = virCommandNew(abs_builddir "/commandhelper-doesnotexist");
if (virCommandRun(cmd, NULL) == 0)
goto cleanup;
if ((log = virtTestLogContentAndReset()) == NULL)
goto cleanup;
if (strstr(log, ": error :") == NULL)
if (virGetLastError() == NULL)
goto cleanup;
virResetLastError();
ret = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册