struct kmod_module *module;
struct test_context test_ctx;
pid_t main_pid;
- char *progpath;
int pipesize;
char *pipebuf;
} globals;
{
char *path, *progpath, *progdir;
- progpath = xstrdup(globals.progpath);
+ progpath = xstrdup(program_invocation_name);
progdir = dirname(progpath);
path = xappend(NULL, "%s/../../src/tools/%s", progdir, tool);
free(progpath);
}
}
-int main(int argc TEST_UNUSED, char **argv)
+int main(int argc TEST_UNUSED, char **argv TEST_UNUSED)
{
struct _test_case *test;
globals.main_pid = getpid();
- globals.progpath = argv[0];
globals.pipesize = get_pipesize();
globals.pipebuf = xmalloc(globals.pipesize);
atexit(cleanup_func);