tests: Introduce afstest_GetProgname
[openafs.git] / tests / volser / vos-t.c
index a8b8f54..ee9581d 100644 (file)
@@ -100,6 +100,7 @@ main(int argc, char **argv)
     struct rx_securityClass *secClass;
     struct ubik_client *ubikClient = NULL;
     int ret = 0;
+    char *argv0 = afstest_GetProgname(argv);
 
     /* Skip all tests if the current hostname can't be resolved */
     afstest_SkipTestsIfBadHostname();
@@ -116,14 +117,14 @@ main(int argc, char **argv)
 
     code = afstest_AddDESKeyFile(dir);
     if (code) {
-       afs_com_err("vos-t", code, "while adding test DES keyfile");
+       afs_com_err(argv0, code, "while adding test DES keyfile");
        ret = 1;
        goto out;
     }
 
     code = afstest_StartVLServer(dirname, &serverPid);
     if (code) {
-       afs_com_err("vos-t", code, "while starting the vlserver");
+       afs_com_err(argv0, code, "while starting the vlserver");
        ret = 1;
        goto out;
     }
@@ -131,7 +132,7 @@ main(int argc, char **argv)
     code = afsconf_ClientAuthSecure(dir, &secClass, &secIndex);
     is_int(code, 0, "Successfully got security class");
     if (code) {
-       afs_com_err("authname-t", code, "while getting anonymous secClass");
+       afs_com_err(argv0, code, "while getting anonymous secClass");
        ret = 1;
        goto out;
     }
@@ -140,7 +141,7 @@ main(int argc, char **argv)
                                 secClass, secIndex, &ubikClient);
     is_int(code, 0, "Successfully built ubik client structure");
     if (code) {
-       afs_com_err("vos-t", code, "while building ubik client");
+       afs_com_err(argv0, code, "while building ubik client");
        ret = 1;
        goto out;
     }