diff --git a/lib/tests/test-mu-common.c b/lib/tests/test-mu-common.c index 32f0c5bc..9f23b928 100644 --- a/lib/tests/test-mu-common.c +++ b/lib/tests/test-mu-common.c @@ -36,11 +36,21 @@ char* test_mu_common_get_random_tmpdir (void) { - return g_strdup_printf ("%s%cmu-test-%d%ctest-%x", g_get_tmp_dir(), - G_DIR_SEPARATOR, - getuid(), - G_DIR_SEPARATOR, - (int)random()*getpid()*(int)time(NULL)); + char*dir; + int res; + + dir = g_strdup_printf ( + "%s%cmu-test-%d%ctest-%x", + g_get_tmp_dir(), + G_DIR_SEPARATOR, + getuid(), + G_DIR_SEPARATOR, + (int)random()*getpid()*(int)time(NULL)); + + res = g_mkdir_with_parents (dir, 0700); + g_assert (res != -1); + + return dir; } diff --git a/lib/tests/test-mu-store.c b/lib/tests/test-mu-store.c index 300c68b0..4dd37c3c 100644 --- a/lib/tests/test-mu-store.c +++ b/lib/tests/test-mu-store.c @@ -45,8 +45,8 @@ test_mu_store_new_destroy (void) err = NULL; store = mu_store_new_writable (tmpdir, NULL, FALSE, &err); + g_assert_no_error (err); g_assert (store); - g_assert (err == NULL); g_assert_cmpuint (0,==,mu_store_count (store, NULL));