qtest: Add assertion that required environment variable is set
authorEd Maste <emaste@freebsd.org>
Tue, 28 Apr 2015 19:27:51 +0000 (15:27 -0400)
committerJohn Snow <jsnow@redhat.com>
Tue, 28 Apr 2015 19:27:51 +0000 (15:27 -0400)
Signed-off-by: Ed Maste <emaste@freebsd.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 1427911244-22565-1-git-send-email-emaste@freebsd.org
Signed-off-by: John Snow <jsnow@redhat.com>
tests/libqtest.c

index 659a3c7c63d6b1a47a0f3c2c1923ef0521108d86..a525dc532c48c9ab2a63e68ed8ec89f030784167 100644 (file)
@@ -488,6 +488,7 @@ void qtest_qmp_eventwait(QTestState *s, const char *event)
 const char *qtest_get_arch(void)
 {
     const char *qemu = getenv("QTEST_QEMU_BINARY");
+    g_assert(qemu != NULL);
     const char *end = strrchr(qemu, '/');
 
     return end + strlen("/qemu-system-");