]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Remove remnants of removing the fake emulator output
authorJohn Ferlan <jferlan@redhat.com>
Tue, 8 Jan 2013 21:21:51 +0000 (16:21 -0500)
committerEric Blake <eblake@redhat.com>
Wed, 9 Jan 2013 00:19:32 +0000 (17:19 -0700)
Coverity determined that 'emulator' could no longer be set and determined the
code was dead.  Looking through the history, I discovered commit-id ed769e18
removed code originally added by commit-id 9237e955 and further modified by
commit-id 6a7e7c4f.

tests/qemuxml2argvtest.c

index b6e99db4436fad8bb5098523d09823617970c2f4..31ed116d77d6389ee257a3d31112dd85a745188c 100644 (file)
@@ -91,7 +91,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
     virDomainChrSourceDef monitor_chr;
     virConnectPtr conn;
     char *log = NULL;
-    char *emulator = NULL;
     virCommandPtr cmd = NULL;
 
     if (!(conn = virGetConnect()))
@@ -173,15 +172,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
     if (!(actualargv = virCommandToString(cmd)))
         goto out;
 
-    if (emulator) {
-        /* Skip the abs_srcdir portion of replacement emulator.  */
-        char *start_skip = strstr(actualargv, abs_srcdir);
-        char *end_skip = strstr(actualargv, emulator);
-        if (!start_skip || !end_skip)
-            goto out;
-        memmove(start_skip, end_skip, strlen(end_skip) + 1);
-    }
-
     len = virtTestLoadFile(cmdline, &expectargv);
     if (len < 0)
         goto out;
@@ -203,7 +193,6 @@ static int testCompareXMLToArgvFiles(const char *xml,
 
 out:
     VIR_FREE(log);
-    VIR_FREE(emulator);
     VIR_FREE(expectargv);
     VIR_FREE(actualargv);
     virCommandFree(cmd);