]> err.no Git - varnish/commitdiff
Make sure system "..." returns successfully
authortfheen <tfheen@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 25 Feb 2009 10:50:49 +0000 (10:50 +0000)
committertfheen <tfheen@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 25 Feb 2009 10:50:49 +0000 (10:50 +0000)
We didn't check the return status of system, making failures in a00009
go unnoticed.  Fix this and fix a00009 to not fail when run
uninstalled.

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3826 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishtest/tests/a00009.vtc
varnish-cache/bin/varnishtest/vtc.c

index 85dcce9df4e7fc40d1677c3591287a3886d58427..b3c89e733db43eb856e47c29e83670031a468236 100644 (file)
@@ -2,4 +2,4 @@
 
 test "See that the VCL compiler works"
 
-shell "cd ../varnishd && ./varnishd -b 127.0.0.1:80 -C"
+shell "cd ../varnishd && ./varnishd -b 127.0.0.1:80 -C -n /tmp/__v1"
index 3173261354360ad66281c13d80c08bbde068829f..2bd12426af270b014c9b16445b12a6b321f5ec10 100644 (file)
@@ -246,7 +246,7 @@ cmd_shell(CMD_ARGS)
        AN(av[1]);
        AZ(av[2]);
        vtc_dump(vl, 4, "shell", av[1]);
-       (void)system(av[1]);    /* XXX: assert ? */
+       assert(WEXITSTATUS(system(av[1])) == 0);
 }
 
 /**********************************************************************