lwp: Don't cast returns from malloc()
[openafs.git] / tests / volser / vos-t.c
index a247e0e..dc8f64e 100644 (file)
@@ -12,7 +12,7 @@
 #include <afs/vldbint.h>
 #include <afs/cellconfig.h>
 
-#include <tap/basic.h>
+#include <tests/tap/basic.h>
 
 #include "common.h"
 
@@ -60,12 +60,20 @@ TestListAddrs(struct ubik_client *client, char *dirname)
     pipe(outpipe);
     pid = fork();
     if (pid == 0) {
+       char *build, *binPath;
+
        dup2(outpipe[1], STDOUT_FILENO); /* Redirect stdout into pipe */
        close(outpipe[0]);
        close(outpipe[1]);
 
-       execl("../../src/volser/vos", "vos",
+       build = getenv("BUILD");
+       if (build == NULL)
+           build = "..";
+
+       asprintf(&binPath, "%s/../src/volser/vos", build);
+       execl(binPath, "vos",
              "listaddrs", "-config", dirname, "-noauth", NULL);
+       exit(1);
     }
     close(outpipe[1]);
     buffer = malloc(4096);
@@ -125,7 +133,7 @@ main(int argc, char **argv)
 
     TestListAddrs(ubikClient, dirname);
 
-    code = afstest_StopVLServer(serverPid);
+    code = afstest_StopServer(serverPid);
     is_int(0, code, "Server exited cleanly");
 
     return 0;