summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-12-17 15:02:06 -0500
committerNick Mathewson <nickm@torproject.org>2019-12-17 15:02:06 -0500
commit08bfc2d71a856feee0db5d230d31c5ad6b45d0c5 (patch)
tree8f59e2d58a9194388c372ad05da5de771e402b99 /src
parent5f9808d1d799c39f014ce3175779123aabc6058b (diff)
parentfefa08df752c87a16b4a203576670c0501736c98 (diff)
downloadtor-08bfc2d71a856feee0db5d230d31c5ad6b45d0c5.tar.gz
tor-08bfc2d71a856feee0db5d230d31c5ad6b45d0c5.zip
Merge branch 'ticket32172_once_again'
Diffstat (limited to 'src')
-rw-r--r--src/test/testing_common.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/testing_common.c b/src/test/testing_common.c
index c28d02be77..378a6f1924 100644
--- a/src/test/testing_common.c
+++ b/src/test/testing_common.c
@@ -89,6 +89,17 @@ setup_directory(void)
(int)getpid(), rnd32);
r = mkdir(temp_dir);
}
+#elif defined(__ANDROID__)
+ /* tor might not like the default perms, so create a subdir */
+ tor_snprintf(temp_dir, sizeof(temp_dir),
+ "/data/local/tmp/tor_%d_%d_%s",
+ (int) getuid(), (int) getpid(), rnd32);
+ r = mkdir(temp_dir, 0700);
+ if (r) {
+ fprintf(stderr, "Can't create directory %s:", temp_dir);
+ perror("");
+ exit(1);
+ }
#else /* !defined(_WIN32) */
tor_snprintf(temp_dir, sizeof(temp_dir), "/tmp/tor_test_%d_%s",
(int) getpid(), rnd32);