diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 6c12873809..f34408395b 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -1359,6 +1359,8 @@ mymain(void)
"\n");
+
+#ifdef WITH_YAJL
TEST_BACKING_PARSE("json:", NULL);
TEST_BACKING_PARSE("json:asdgsdfg", NULL);
TEST_BACKING_PARSE("json:{}", NULL);
@@ -1573,6 +1575,7 @@ mymain(void)
"\n");
+#endif /* WITH_YAJL */
cleanup:
/* Final cleanup */