diff --git a/usr.sbin/installer/test/libinstaller_test.c b/usr.sbin/installer/test/libinstaller_test.c index ecd3d97..02be2a2 100644 --- a/usr.sbin/installer/test/libinstaller_test.c +++ b/usr.sbin/installer/test/libinstaller_test.c @@ -54,6 +54,9 @@ #endif #include "libaura/fspred.h" +#define IDIR "/tmp/installer" +#define IDIRTMP IDIR "/tmp" + void test_storage(struct i_fn_args *); void libinstaller_backend(struct i_fn_args **); void libinstaller_frontend(struct dfui_connection **); @@ -76,8 +79,7 @@ libinstaller_backend(struct i_fn_args **a) { struct i_fn_args *ap = *a; - ap = i_fn_args_new("/", "/tmp/installer/temp", - DFUI_TRANSPORT_TCP, "9999"); + ap = i_fn_args_new("/", IDIRTMP, DFUI_TRANSPORT_TCP, "9999"); tstate = test_storage; @@ -139,10 +141,10 @@ main(int argc __unused, char **argv __unused) struct i_fn_args *a; int r; - if (!is_dir("/tmp/installer") || - !is_dir("/tmp/installer/temp")) - errx(1, "Please run 'mkdir -p /tmp/installer/temp'"); - + /* Our test directory */ + if (!is_dir(IDIR)) + mkdir(IDIR, 0755); + mkdir(IDIRTMP, 0755); r = fork(); switch(r) {