summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2021-03-12 11:40:48 -0500
committerNick Mathewson <nickm@torproject.org>2021-03-12 11:40:48 -0500
commit444233c15ec34b78bba0b03547f0ae70b8e2b918 (patch)
tree934196084833755c33879b4c04faf1eaa6b1bc1d /src/test
parentb5d08ddc09ec785d81e4043d9f9e2f032c9e49ab (diff)
downloadtor-444233c15ec34b78bba0b03547f0ae70b8e2b918.tar.gz
tor-444233c15ec34b78bba0b03547f0ae70b8e2b918.zip
Run "make autostyle" in advance of new series.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_config.c10
-rw-r--r--src/test/test_protover.c2
-rw-r--r--src/test/test_util.c24
3 files changed, 18 insertions, 18 deletions
diff --git a/src/test/test_config.c b/src/test/test_config.c
index 3921274462..e364857175 100644
--- a/src/test/test_config.c
+++ b/src/test/test_config.c
@@ -1215,7 +1215,7 @@ get_interface_address6_replacement(int severity, sa_family_t family,
return 0;
}
-#endif
+#endif /* 0 */
static int n_get_interface_address6_failure = 0;
@@ -6041,7 +6041,7 @@ test_config_include_wildcards(void *data)
tt_ptr_op(result, OP_EQ, NULL);
tt_int_op(include_used, OP_EQ, 1);
config_free_lines(result);
-#endif
+#endif /* !defined(_WIN32) */
// test pattern *.conf
tor_snprintf(torrc_contents, sizeof(torrc_contents),
@@ -6181,9 +6181,9 @@ test_config_include_hidden(void *data)
len++;
}
tt_int_op(len, OP_EQ, 1);
-#else
+#else /* !defined(_WIN32) */
tt_ptr_op(result, OP_EQ, NULL);
-#endif
+#endif /* defined(_WIN32) */
config_free_lines(result);
// test wildcards match hidden folders when explicitly in the pattern
@@ -6993,7 +6993,7 @@ test_config_multifamily_port(void *arg)
#define CONFIG_TEST_SETUP(suffix, name, flags, setup, setup_data) \
{ #name#suffix, test_config_ ## name, flags, setup, setup_data }
-#endif
+#endif /* !defined(COCCI) */
struct testcase_t config_tests[] = {
CONFIG_TEST(adding_trusted_dir_server, TT_FORK),
diff --git a/src/test/test_protover.c b/src/test/test_protover.c
index 696f7a7061..2f77db185f 100644
--- a/src/test/test_protover.c
+++ b/src/test/test_protover.c
@@ -650,7 +650,7 @@ test_protover_vote_roundtrip_ours(void *args)
*/
#define PROTOVER(proto_string, version_macro) \
(proto_string "=" STR(version_macro))
-#endif
+#endif /* defined(COCCI) */
#define DEBUG_PROTOVER(flags) \
STMT_BEGIN \
diff --git a/src/test/test_util.c b/src/test/test_util.c
index ad762d2725..b8766ae9e0 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -4532,7 +4532,7 @@ test_util_glob(void *ptr)
#else
const char *results_test3[] = {"dir1", "dir2", "file1", "file2",
"forbidden"};
-#endif
+#endif /* defined(_WIN32) */
TEST("*i*");
EXPECT(results_test3);
@@ -4570,7 +4570,7 @@ test_util_glob(void *ptr)
const char *results_test10[] = {"file1"};
TEST("file1"PATH_SEPARATOR);
EXPECT(results_test10);
-#endif
+#endif /* defined(__APPLE__) || defined(__darwin__) || ... */
// test path separator at end - with wildcards and linux path separator
const char *results_test11[] = {"dir1", "dir2", "forbidden"};
@@ -4584,7 +4584,7 @@ test_util_glob(void *ptr)
#else
const char *results_test12[] = {"dir1", "dir2", "empty", "file1", "file2",
"forbidden"};
-#endif
+#endif /* defined(_WIN32) */
TEST("*");
EXPECT(results_test12);
@@ -4631,7 +4631,7 @@ test_util_glob(void *ptr)
tor_free(pattern);
tt_assert(!results);
}
-#endif
+#endif /* !defined(_WIN32) */
#undef TEST
#undef EXPECT
@@ -4643,7 +4643,7 @@ test_util_glob(void *ptr)
(void) chmod(dir1_forbidden, 0700);
(void) chmod(dir2_forbidden, 0700);
(void) chmod(forbidden_forbidden, 0700);
-#endif
+#endif /* !defined(_WIN32) */
tor_free(dir1);
tor_free(dir2);
tor_free(forbidden);
@@ -4657,11 +4657,11 @@ test_util_glob(void *ptr)
SMARTLIST_FOREACH(results, char *, f, tor_free(f));
smartlist_free(results);
}
-#else
+#else /* !defined(HAVE_GLOB) */
tt_skip();
done:
return;
-#endif
+#endif /* defined(HAVE_GLOB) */
}
static void
@@ -4769,7 +4769,7 @@ test_util_get_glob_opened_files(void *ptr)
// dot files are not special on windows
const char *results_test3[] = {"", ".test-hidden", "dir1", "dir2", "empty",
"file1", "file2", "forbidden"};
-#endif
+#endif /* !defined(_WIN32) */
TEST("*"PATH_SEPARATOR"*");
EXPECT(results_test3);
@@ -4781,7 +4781,7 @@ test_util_get_glob_opened_files(void *ptr)
// dot files are not special on windows
const char *results_test4[] = {"", ".test-hidden", "dir1", "dir2", "empty",
"file1", "file2", "forbidden"};
-#endif
+#endif /* !defined(_WIN32) */
TEST("*"PATH_SEPARATOR"*"PATH_SEPARATOR);
EXPECT(results_test4);
@@ -4846,7 +4846,7 @@ test_util_get_glob_opened_files(void *ptr)
TT_FAIL(("unable to chmod a file on cleanup: %s", strerror(errno)));
}
}
-#endif
+#endif /* !defined(_WIN32) */
tor_free(dir1);
tor_free(dir2);
tor_free(forbidden);
@@ -4860,11 +4860,11 @@ test_util_get_glob_opened_files(void *ptr)
SMARTLIST_FOREACH(results, char *, f, tor_free(f));
smartlist_free(results);
}
-#else
+#else /* !defined(HAVE_GLOB) */
tt_skip();
done:
return;
-#endif
+#endif /* defined(HAVE_GLOB) */
}
static void