mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Run "make autostyle" in advance of new series.
This commit is contained in:
parent
b5d08ddc09
commit
444233c15e
@ -4958,9 +4958,9 @@ options_init_logs(const or_options_t *old_options, const or_options_t *options,
|
|||||||
if (!validate_only) {
|
if (!validate_only) {
|
||||||
add_syslog_log(severity, options->SyslogIdentityTag);
|
add_syslog_log(severity, options->SyslogIdentityTag);
|
||||||
}
|
}
|
||||||
#else
|
#else /* !defined(HAVE_SYSLOG_H) */
|
||||||
log_warn(LD_CONFIG, "The android logging API is no longer supported.");
|
log_warn(LD_CONFIG, "The android logging API is no longer supported.");
|
||||||
#endif
|
#endif /* defined(HAVE_SYSLOG_H) */
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -852,4 +852,4 @@ resolve_addr_reset_suggested(int family)
|
|||||||
tor_addr_make_unspec(&last_suggested_addrs[af_to_idx(family)]);
|
tor_addr_make_unspec(&last_suggested_addrs[af_to_idx(family)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* TOR_UNIT_TESTS */
|
#endif /* defined(TOR_UNIT_TESTS) */
|
||||||
|
@ -61,7 +61,7 @@ void resolve_addr_reset_suggested(int family);
|
|||||||
|
|
||||||
#endif /* TOR_UNIT_TESTS */
|
#endif /* TOR_UNIT_TESTS */
|
||||||
|
|
||||||
#endif /* RESOLVE_ADDR_PRIVATE */
|
#endif /* defined(RESOLVE_ADDR_PRIVATE) */
|
||||||
|
|
||||||
#endif /* TOR_CONFIG_RESOLVE_ADDR_H */
|
#endif /* !defined(TOR_CONFIG_RESOLVE_ADDR_H) */
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ process_win32_console_ctrl(DWORD ctrl_type)
|
|||||||
activate_signal(SIGINT);
|
activate_signal(SIGINT);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* defined(_WIN32) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write current memory usage information to the log.
|
* Write current memory usage information to the log.
|
||||||
@ -514,7 +514,7 @@ handle_signals(void)
|
|||||||
* to handle control signals like Ctrl+C in the console, we can use this to
|
* to handle control signals like Ctrl+C in the console, we can use this to
|
||||||
* simulate the SIGINT signal */
|
* simulate the SIGINT signal */
|
||||||
if (enabled) SetConsoleCtrlHandler(process_win32_console_ctrl, TRUE);
|
if (enabled) SetConsoleCtrlHandler(process_win32_console_ctrl, TRUE);
|
||||||
#endif
|
#endif /* defined(_WIN32) */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Cause the signal handler for signal_num to be called in the event loop. */
|
/* Cause the signal handler for signal_num to be called in the event loop. */
|
||||||
|
@ -14,4 +14,4 @@
|
|||||||
|
|
||||||
extern const char risky_option_list[];
|
extern const char risky_option_list[];
|
||||||
|
|
||||||
#endif
|
#endif /* !defined(TOR_RISKY_OPTIONS_H) */
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
#include "core/or/or_handshake_state_st.h"
|
#include "core/or/or_handshake_state_st.h"
|
||||||
#include "feature/nodelist/routerinfo_st.h"
|
#include "feature/nodelist/routerinfo_st.h"
|
||||||
#include "core/or/var_cell_st.h"
|
#include "core/or/var_cell_st.h"
|
||||||
#include "src/feature/relay/relay_find_addr.h"
|
#include "feature/relay/relay_find_addr.h"
|
||||||
|
|
||||||
#include "lib/tls/tortls.h"
|
#include "lib/tls/tortls.h"
|
||||||
#include "lib/tls/x509.h"
|
#include "lib/tls/x509.h"
|
||||||
|
@ -445,7 +445,7 @@ trailing_zeros(uint64_t x)
|
|||||||
x>>=1;
|
x>>=1;
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
#endif
|
#endif /* defined(__GNUC__) */
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
#define TRACEPOINT_DEFINE
|
#define TRACEPOINT_DEFINE
|
||||||
#define TRACEPOINT_CREATE_PROBES
|
#define TRACEPOINT_CREATE_PROBES
|
||||||
|
|
||||||
#include "trace_probes_circuit.h"
|
#include "core/or/trace_probes_circuit.h"
|
||||||
|
|
||||||
#endif /* USE_TRACING_INSTRUMENTATION_LTTNG */
|
#endif /* defined(USE_TRACING_INSTRUMENTATION_LTTNG) */
|
||||||
|
@ -19,4 +19,4 @@
|
|||||||
|
|
||||||
#endif /* USE_TRACING_INSTRUMENTATION_LTTNG */
|
#endif /* USE_TRACING_INSTRUMENTATION_LTTNG */
|
||||||
|
|
||||||
#endif /* TOR_TRACE_PROBES_CIRCUIT_H */
|
#endif /* !defined(TOR_TRACE_PROBES_CIRCUIT_H) */
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#include "feature/nodelist/node_st.h"
|
#include "feature/nodelist/node_st.h"
|
||||||
#include "feature/nodelist/routerinfo_st.h"
|
#include "feature/nodelist/routerinfo_st.h"
|
||||||
|
|
||||||
#include "src/app/config/statefile.h"
|
#include "app/config/statefile.h"
|
||||||
|
|
||||||
static int control_setconf_helper(control_connection_t *conn,
|
static int control_setconf_helper(control_connection_t *conn,
|
||||||
const control_cmd_args_t *args,
|
const control_cmd_args_t *args,
|
||||||
|
@ -183,9 +183,9 @@ static HT_HEAD(cdm_diff_ht, cdm_diff_t) cdm_diff_ht = HT_INITIALIZER();
|
|||||||
// diff manager becomes larger than 64. To see if the issue goes away, we
|
// diff manager becomes larger than 64. To see if the issue goes away, we
|
||||||
// hardcode this value to 64 now while we investigate a better solution.
|
// hardcode this value to 64 now while we investigate a better solution.
|
||||||
# define CACHE_MAX_NUM 64
|
# define CACHE_MAX_NUM 64
|
||||||
#else
|
#else /* !defined(_WIN32) */
|
||||||
# define CACHE_MAX_NUM 128
|
# define CACHE_MAX_NUM 128
|
||||||
#endif
|
#endif /* defined(_WIN32) */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration for this module
|
* Configuration for this module
|
||||||
|
@ -46,6 +46,6 @@ typedef struct hs_metrics_entry_t {
|
|||||||
extern const hs_metrics_entry_t base_metrics[];
|
extern const hs_metrics_entry_t base_metrics[];
|
||||||
extern const size_t base_metrics_size;
|
extern const size_t base_metrics_size;
|
||||||
|
|
||||||
#endif /* HS_METRICS_ENTRY_PRIVATE */
|
#endif /* defined(HS_METRICS_ENTRY_PRIVATE) */
|
||||||
|
|
||||||
#endif /* !defined(TOR_FEATURE_HS_METRICS_ENTRY_H) */
|
#endif /* !defined(TOR_FEATURE_HS_METRICS_ENTRY_H) */
|
||||||
|
@ -93,7 +93,7 @@ STATIC int have_enough_mem_for_dircache(const struct or_options_t *options,
|
|||||||
struct port_cfg_t;
|
struct port_cfg_t;
|
||||||
STATIC const char *describe_relay_port(const struct port_cfg_t *port);
|
STATIC const char *describe_relay_port(const struct port_cfg_t *port);
|
||||||
|
|
||||||
#endif /* TOR_UNIT_TESTS */
|
#endif /* defined(TOR_UNIT_TESTS) */
|
||||||
|
|
||||||
#endif /* defined(RELAY_CONFIG_PRIVATE) */
|
#endif /* defined(RELAY_CONFIG_PRIVATE) */
|
||||||
|
|
||||||
|
@ -28,5 +28,5 @@ void relay_addr_learn_from_dirauth(void);
|
|||||||
|
|
||||||
#endif /* RELAY_FIND_ADDR_PRIVATE */
|
#endif /* RELAY_FIND_ADDR_PRIVATE */
|
||||||
|
|
||||||
#endif /* TOR_RELAY_FIND_ADDR_H */
|
#endif /* !defined(TOR_RELAY_FIND_ADDR_H) */
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ STATIC void add_obs(bw_array_t *b, time_t when, uint64_t n);
|
|||||||
STATIC void bw_array_free_(bw_array_t *b);
|
STATIC void bw_array_free_(bw_array_t *b);
|
||||||
STATIC size_t bwhist_fill_bandwidth_history(char *buf, size_t len,
|
STATIC size_t bwhist_fill_bandwidth_history(char *buf, size_t len,
|
||||||
const bw_array_t *b);
|
const bw_array_t *b);
|
||||||
#endif /* defined(REPHIST_PRIVATE) */
|
#endif /* defined(BWHIST_PRIVATE) */
|
||||||
|
|
||||||
#ifdef TOR_UNIT_TESTS
|
#ifdef TOR_UNIT_TESTS
|
||||||
extern struct bw_array_t *write_array;
|
extern struct bw_array_t *write_array;
|
||||||
|
@ -145,6 +145,6 @@ struct hs_v2_stats_t;
|
|||||||
const struct hs_v2_stats_t *rep_hist_get_hs_v2_stats(void);
|
const struct hs_v2_stats_t *rep_hist_get_hs_v2_stats(void);
|
||||||
struct hs_v3_stats_t;
|
struct hs_v3_stats_t;
|
||||||
const struct hs_v3_stats_t *rep_hist_get_hs_v3_stats(void);
|
const struct hs_v3_stats_t *rep_hist_get_hs_v3_stats(void);
|
||||||
#endif
|
#endif /* defined(TOR_UNIT_TESTS) */
|
||||||
|
|
||||||
#endif /* !defined(TOR_REPHIST_H) */
|
#endif /* !defined(TOR_REPHIST_H) */
|
||||||
|
@ -106,7 +106,7 @@ crypto_openssl_get_version_str(void)
|
|||||||
#else
|
#else
|
||||||
/* This old name was changed around OpenSSL 1.1.0 */
|
/* This old name was changed around OpenSSL 1.1.0 */
|
||||||
const int query = SSLEAY_VERSION;
|
const int query = SSLEAY_VERSION;
|
||||||
#endif
|
#endif /* defined(OPENSSL_VERSION) */
|
||||||
|
|
||||||
if (crypto_openssl_version_str == NULL) {
|
if (crypto_openssl_version_str == NULL) {
|
||||||
const char *raw_version = OpenSSL_version(query);
|
const char *raw_version = OpenSSL_version(query);
|
||||||
|
@ -571,7 +571,7 @@ wrap_closedir(void *arg)
|
|||||||
{
|
{
|
||||||
closedir(arg);
|
closedir(arg);
|
||||||
}
|
}
|
||||||
#endif /* defined(HAVE_GLOB) */
|
#endif /* defined(_WIN32) || ... */
|
||||||
|
|
||||||
/** Return a new list containing the paths that match the pattern
|
/** Return a new list containing the paths that match the pattern
|
||||||
* <b>pattern</b>. Return NULL on error. On POSIX systems, errno is set by the
|
* <b>pattern</b>. Return NULL on error. On POSIX systems, errno is set by the
|
||||||
@ -636,7 +636,7 @@ tor_glob(const char *pattern)
|
|||||||
#else
|
#else
|
||||||
(void)pattern;
|
(void)pattern;
|
||||||
return result;
|
return result;
|
||||||
#endif /* !defined(HAVE_GLOB) */
|
#endif /* defined(_WIN32) || ... */
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -258,7 +258,7 @@
|
|||||||
abort()
|
abort()
|
||||||
#else
|
#else
|
||||||
#define FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL FALLTHROUGH
|
#define FALLTHROUGH_UNLESS_ALL_BUGS_ARE_FATAL FALLTHROUGH
|
||||||
#endif
|
#endif /* defined(ALL_BUGS_ARE_FATAL) */
|
||||||
|
|
||||||
/** In older code, we used tor_fragile_assert() to mark optional failure
|
/** In older code, we used tor_fragile_assert() to mark optional failure
|
||||||
* points. At these points, we could make some debug builds fail.
|
* points. At these points, we could make some debug builds fail.
|
||||||
|
@ -40,7 +40,7 @@ struct metrics_store_entry_t {
|
|||||||
} u;
|
} u;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* METRICS_STORE_ENTRY_PRIVATE */
|
#endif /* defined(METRICS_STORE_ENTRY_PRIVATE) */
|
||||||
|
|
||||||
typedef struct metrics_store_entry_t metrics_store_entry_t;
|
typedef struct metrics_store_entry_t metrics_store_entry_t;
|
||||||
|
|
||||||
|
@ -734,7 +734,7 @@ sb_socket(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
|
|||||||
SCMP_CMP(2, SCMP_CMP_EQ, IPPROTO_IP));
|
SCMP_CMP(2, SCMP_CMP_EQ, IPPROTO_IP));
|
||||||
if (rc)
|
if (rc)
|
||||||
return rc;
|
return rc;
|
||||||
#endif
|
#endif /* defined(ENABLE_NSS) */
|
||||||
|
|
||||||
rc = seccomp_rule_add_3(ctx, SCMP_ACT_ALLOW, SCMP_SYS(socket),
|
rc = seccomp_rule_add_3(ctx, SCMP_ACT_ALLOW, SCMP_SYS(socket),
|
||||||
SCMP_CMP(0, SCMP_CMP_EQ, PF_UNIX),
|
SCMP_CMP(0, SCMP_CMP_EQ, PF_UNIX),
|
||||||
@ -1691,7 +1691,7 @@ get_syscall_from_ucontext(const ucontext_t *ctx)
|
|||||||
{
|
{
|
||||||
return (int) ctx->uc_mcontext.M_SYSCALL;
|
return (int) ctx->uc_mcontext.M_SYSCALL;
|
||||||
}
|
}
|
||||||
#else
|
#else /* !defined(SYSCALL_NAME_DEBUGGING) */
|
||||||
static const char *
|
static const char *
|
||||||
get_syscall_name(int syscall_num)
|
get_syscall_name(int syscall_num)
|
||||||
{
|
{
|
||||||
@ -1704,7 +1704,7 @@ get_syscall_from_ucontext(const ucontext_t *ctx)
|
|||||||
(void) ctx;
|
(void) ctx;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* defined(SYSCALL_NAME_DEBUGGING) */
|
||||||
|
|
||||||
#ifdef USE_BACKTRACE
|
#ifdef USE_BACKTRACE
|
||||||
#define MAX_DEPTH 256
|
#define MAX_DEPTH 256
|
||||||
|
@ -80,7 +80,7 @@ struct tor_tls_t {
|
|||||||
uint64_t last_write_count;
|
uint64_t last_write_count;
|
||||||
uint64_t last_read_count;
|
uint64_t last_read_count;
|
||||||
long last_error;
|
long last_error;
|
||||||
#endif
|
#endif /* defined(ENABLE_NSS) */
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* !defined(TOR_TORTLS_ST_H) */
|
#endif /* !defined(TOR_TORTLS_ST_H) */
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
log_debug(LD_GENERAL, "Tracepoint \"" XSTR(event_name) "\" from " \
|
log_debug(LD_GENERAL, "Tracepoint \"" XSTR(event_name) "\" from " \
|
||||||
"subsystem \"" XSTR(subsystem) "\" hit.")
|
"subsystem \"" XSTR(subsystem) "\" hit.")
|
||||||
|
|
||||||
#else /* defined(USE_TRACING_INSTRUMENTATION_LOG_DEBUG) */
|
#else /* !defined(USE_TRACING_INSTRUMENTATION_LOG_DEBUG) */
|
||||||
|
|
||||||
/* NOP the debug event. */
|
/* NOP the debug event. */
|
||||||
#define TOR_TRACE_LOG_DEBUG(subsystem, name, ...)
|
#define TOR_TRACE_LOG_DEBUG(subsystem, name, ...)
|
||||||
|
@ -26,7 +26,7 @@ tracing_log_warning(void)
|
|||||||
"purpose, your tor is NOT safe to run.");
|
"purpose, your tor is NOT safe to run.");
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else /* !defined(HAVE_TRACING) */
|
||||||
|
|
||||||
/* NOP it. */
|
/* NOP it. */
|
||||||
#define tracing_log_warning()
|
#define tracing_log_warning()
|
||||||
|
@ -1215,7 +1215,7 @@ get_interface_address6_replacement(int severity, sa_family_t family,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* 0 */
|
||||||
|
|
||||||
static int n_get_interface_address6_failure = 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_ptr_op(result, OP_EQ, NULL);
|
||||||
tt_int_op(include_used, OP_EQ, 1);
|
tt_int_op(include_used, OP_EQ, 1);
|
||||||
config_free_lines(result);
|
config_free_lines(result);
|
||||||
#endif
|
#endif /* !defined(_WIN32) */
|
||||||
|
|
||||||
// test pattern *.conf
|
// test pattern *.conf
|
||||||
tor_snprintf(torrc_contents, sizeof(torrc_contents),
|
tor_snprintf(torrc_contents, sizeof(torrc_contents),
|
||||||
@ -6181,9 +6181,9 @@ test_config_include_hidden(void *data)
|
|||||||
len++;
|
len++;
|
||||||
}
|
}
|
||||||
tt_int_op(len, OP_EQ, 1);
|
tt_int_op(len, OP_EQ, 1);
|
||||||
#else
|
#else /* !defined(_WIN32) */
|
||||||
tt_ptr_op(result, OP_EQ, NULL);
|
tt_ptr_op(result, OP_EQ, NULL);
|
||||||
#endif
|
#endif /* defined(_WIN32) */
|
||||||
config_free_lines(result);
|
config_free_lines(result);
|
||||||
|
|
||||||
// test wildcards match hidden folders when explicitly in the pattern
|
// 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) \
|
#define CONFIG_TEST_SETUP(suffix, name, flags, setup, setup_data) \
|
||||||
{ #name#suffix, test_config_ ## name, flags, setup, setup_data }
|
{ #name#suffix, test_config_ ## name, flags, setup, setup_data }
|
||||||
#endif
|
#endif /* !defined(COCCI) */
|
||||||
|
|
||||||
struct testcase_t config_tests[] = {
|
struct testcase_t config_tests[] = {
|
||||||
CONFIG_TEST(adding_trusted_dir_server, TT_FORK),
|
CONFIG_TEST(adding_trusted_dir_server, TT_FORK),
|
||||||
|
@ -650,7 +650,7 @@ test_protover_vote_roundtrip_ours(void *args)
|
|||||||
*/
|
*/
|
||||||
#define PROTOVER(proto_string, version_macro) \
|
#define PROTOVER(proto_string, version_macro) \
|
||||||
(proto_string "=" STR(version_macro))
|
(proto_string "=" STR(version_macro))
|
||||||
#endif
|
#endif /* defined(COCCI) */
|
||||||
|
|
||||||
#define DEBUG_PROTOVER(flags) \
|
#define DEBUG_PROTOVER(flags) \
|
||||||
STMT_BEGIN \
|
STMT_BEGIN \
|
||||||
|
@ -4532,7 +4532,7 @@ test_util_glob(void *ptr)
|
|||||||
#else
|
#else
|
||||||
const char *results_test3[] = {"dir1", "dir2", "file1", "file2",
|
const char *results_test3[] = {"dir1", "dir2", "file1", "file2",
|
||||||
"forbidden"};
|
"forbidden"};
|
||||||
#endif
|
#endif /* defined(_WIN32) */
|
||||||
TEST("*i*");
|
TEST("*i*");
|
||||||
EXPECT(results_test3);
|
EXPECT(results_test3);
|
||||||
|
|
||||||
@ -4570,7 +4570,7 @@ test_util_glob(void *ptr)
|
|||||||
const char *results_test10[] = {"file1"};
|
const char *results_test10[] = {"file1"};
|
||||||
TEST("file1"PATH_SEPARATOR);
|
TEST("file1"PATH_SEPARATOR);
|
||||||
EXPECT(results_test10);
|
EXPECT(results_test10);
|
||||||
#endif
|
#endif /* defined(__APPLE__) || defined(__darwin__) || ... */
|
||||||
|
|
||||||
// test path separator at end - with wildcards and linux path separator
|
// test path separator at end - with wildcards and linux path separator
|
||||||
const char *results_test11[] = {"dir1", "dir2", "forbidden"};
|
const char *results_test11[] = {"dir1", "dir2", "forbidden"};
|
||||||
@ -4584,7 +4584,7 @@ test_util_glob(void *ptr)
|
|||||||
#else
|
#else
|
||||||
const char *results_test12[] = {"dir1", "dir2", "empty", "file1", "file2",
|
const char *results_test12[] = {"dir1", "dir2", "empty", "file1", "file2",
|
||||||
"forbidden"};
|
"forbidden"};
|
||||||
#endif
|
#endif /* defined(_WIN32) */
|
||||||
TEST("*");
|
TEST("*");
|
||||||
EXPECT(results_test12);
|
EXPECT(results_test12);
|
||||||
|
|
||||||
@ -4631,7 +4631,7 @@ test_util_glob(void *ptr)
|
|||||||
tor_free(pattern);
|
tor_free(pattern);
|
||||||
tt_assert(!results);
|
tt_assert(!results);
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* !defined(_WIN32) */
|
||||||
|
|
||||||
#undef TEST
|
#undef TEST
|
||||||
#undef EXPECT
|
#undef EXPECT
|
||||||
@ -4643,7 +4643,7 @@ test_util_glob(void *ptr)
|
|||||||
(void) chmod(dir1_forbidden, 0700);
|
(void) chmod(dir1_forbidden, 0700);
|
||||||
(void) chmod(dir2_forbidden, 0700);
|
(void) chmod(dir2_forbidden, 0700);
|
||||||
(void) chmod(forbidden_forbidden, 0700);
|
(void) chmod(forbidden_forbidden, 0700);
|
||||||
#endif
|
#endif /* !defined(_WIN32) */
|
||||||
tor_free(dir1);
|
tor_free(dir1);
|
||||||
tor_free(dir2);
|
tor_free(dir2);
|
||||||
tor_free(forbidden);
|
tor_free(forbidden);
|
||||||
@ -4657,11 +4657,11 @@ test_util_glob(void *ptr)
|
|||||||
SMARTLIST_FOREACH(results, char *, f, tor_free(f));
|
SMARTLIST_FOREACH(results, char *, f, tor_free(f));
|
||||||
smartlist_free(results);
|
smartlist_free(results);
|
||||||
}
|
}
|
||||||
#else
|
#else /* !defined(HAVE_GLOB) */
|
||||||
tt_skip();
|
tt_skip();
|
||||||
done:
|
done:
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif /* defined(HAVE_GLOB) */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -4769,7 +4769,7 @@ test_util_get_glob_opened_files(void *ptr)
|
|||||||
// dot files are not special on windows
|
// dot files are not special on windows
|
||||||
const char *results_test3[] = {"", ".test-hidden", "dir1", "dir2", "empty",
|
const char *results_test3[] = {"", ".test-hidden", "dir1", "dir2", "empty",
|
||||||
"file1", "file2", "forbidden"};
|
"file1", "file2", "forbidden"};
|
||||||
#endif
|
#endif /* !defined(_WIN32) */
|
||||||
TEST("*"PATH_SEPARATOR"*");
|
TEST("*"PATH_SEPARATOR"*");
|
||||||
EXPECT(results_test3);
|
EXPECT(results_test3);
|
||||||
|
|
||||||
@ -4781,7 +4781,7 @@ test_util_get_glob_opened_files(void *ptr)
|
|||||||
// dot files are not special on windows
|
// dot files are not special on windows
|
||||||
const char *results_test4[] = {"", ".test-hidden", "dir1", "dir2", "empty",
|
const char *results_test4[] = {"", ".test-hidden", "dir1", "dir2", "empty",
|
||||||
"file1", "file2", "forbidden"};
|
"file1", "file2", "forbidden"};
|
||||||
#endif
|
#endif /* !defined(_WIN32) */
|
||||||
TEST("*"PATH_SEPARATOR"*"PATH_SEPARATOR);
|
TEST("*"PATH_SEPARATOR"*"PATH_SEPARATOR);
|
||||||
EXPECT(results_test4);
|
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)));
|
TT_FAIL(("unable to chmod a file on cleanup: %s", strerror(errno)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* !defined(_WIN32) */
|
||||||
tor_free(dir1);
|
tor_free(dir1);
|
||||||
tor_free(dir2);
|
tor_free(dir2);
|
||||||
tor_free(forbidden);
|
tor_free(forbidden);
|
||||||
@ -4860,11 +4860,11 @@ test_util_get_glob_opened_files(void *ptr)
|
|||||||
SMARTLIST_FOREACH(results, char *, f, tor_free(f));
|
SMARTLIST_FOREACH(results, char *, f, tor_free(f));
|
||||||
smartlist_free(results);
|
smartlist_free(results);
|
||||||
}
|
}
|
||||||
#else
|
#else /* !defined(HAVE_GLOB) */
|
||||||
tt_skip();
|
tt_skip();
|
||||||
done:
|
done:
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif /* defined(HAVE_GLOB) */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user