Commit Graph

34247 Commits

Author SHA1 Message Date
Nick Mathewson
7798c53c98 tor-coccinelle.h: add MOCK_DECL 2019-10-22 09:24:25 -04:00
Nick Mathewson
18f1624bbe tor-coccinelle.h: handle SLIST and LIST. 2019-10-22 09:24:25 -04:00
Nick Mathewson
630d8c7a1a With coccinelle, avoid includes in the middle of an expression. 2019-10-22 09:24:25 -04:00
Nick Mathewson
a2bb66c355 Add a "COCCI" macro that we tell coccinelle is always defined.
This will let us give specific in-file equivalents to given macros
or preprocessor directives, to make things parse.
2019-10-22 09:24:25 -04:00
Nick Mathewson
ea47e53252 tor-coccinelle.h: handle NS and NS_DECL. 2019-10-22 09:24:25 -04:00
Nick Mathewson
017c62000c tor-coccinelle: handle SIMPLEQ and TAILQ better. 2019-10-22 09:24:25 -04:00
Nick Mathewson
c13c0c8999 tor-coccinelle.h: Add {EN,DIS}ABLE_GCC_WARNING. 2019-10-22 09:24:25 -04:00
Nick Mathewson
eb1260e346 tor-coccinelle: expect parentheses after HT_INITIALIZER 2019-10-22 09:24:25 -04:00
Nick Mathewson
9871fcbcd9 Use #warning instead of #warn: one is C and one isn't. 2019-10-22 09:24:25 -04:00
Nick Mathewson
51c2097586 try_parse.sh: add a verbose mode and a meaningful exit code. 2019-10-22 09:24:25 -04:00
Nick Mathewson
9ab96550da document test-operator-cleanup 2019-10-22 09:24:25 -04:00
Nick Mathewson
2d013bbe5c Merge remote-tracking branch 'tor-github/pr/1417' 2019-10-22 08:36:32 -04:00
Nick Mathewson
4413b030f2 Simplify CHECK_DEFAULT() logic a little further.
Since each of these tests only applies to testing networks, put them
all into a single block that checks for testing networks.

(I recommend reviewing with the "diff -b" option, since the change
is mostly indentation.)
2019-10-22 08:32:33 -04:00
Nick Mathewson
8d84e10e87 Make options_validate() no longer use its "defaults" argument.
It can just look at what the defaults are.

Closes ticket 32185.
2019-10-22 08:30:00 -04:00
Nick Mathewson
a1d5341374 Merge branch 'bug32175' 2019-10-22 07:51:30 -04:00
Nick Mathewson
65e80ce646 Merge branch 'from_setconf_removal_squashed' 2019-10-22 07:50:42 -04:00
Nick Mathewson
0bb2e77283 changes file for 31999 2019-10-22 07:50:13 -04:00
Nick Mathewson
6d15fab2dc Extract log-granularity code into its own function.
This pleases practracker.
2019-10-22 07:50:13 -04:00
Nick Mathewson
9ac2c71cbd Add tests for options_init_logs() 2019-10-22 07:50:13 -04:00
Nick Mathewson
f4fc633937 Make a pair of add_*_log() functions mockable. 2019-10-22 07:50:13 -04:00
Nick Mathewson
ac3136a6fb Make options_init_logs STATIC for testing. 2019-10-22 07:50:13 -04:00
Nick Mathewson
98c3b3bb4c Update tests to handle new interpretation of quiet_level.
Two things needed to be changed.  First, we used to set quiet_level
to the default (QUIET_NONE) when running tests, since we would not
call anything that acted based upon it.  But since we sometimes call
options_init_logs(), we need to pre-set quiet_level to QUIET_SILENT
in the logs so that we don't add the default logs.  This did not
cause test failure: just unwanted logs.

Second, we had a test that checked whether options_validate was
messing with options->Logs correctly.  Since options_validate no
longer messes with the logs, we no longer want a test for this.
2019-10-22 07:50:13 -04:00
Nick Mathewson
e07b19d305 Rationalize handling of quiet_level in config.c
Formerly, we would use quiet_level as an excuse to rewrite the log
configuration, adding a default log line if none existed, and if
RunAsDaemon was not set, and if we were not being invoked via
setconf (!).

This is against our best practices for several reasons:
  * We should not be changing configured options except when the
    user tells us to do so.
  * We should especially not be changing options in the options_validate
    function.
  * Distinguishing whether we are being called from setconf adds a
    risky special-case.

Instead, this patch take a simpler approach: it changes the
interpretation of having no logging lines set to mean: If there is a
stdout, add a default log based on quiet_level.

Solves ticket 31999.
2019-10-22 07:50:13 -04:00
teor
b3478a8856
Merge branch 'maint-0.4.2' 2019-10-22 20:48:26 +10:00
teor
f98b59524c
Merge branch 'maint-0.4.1' into maint-0.4.2 2019-10-22 20:48:20 +10:00
teor
2318bb237f
Merge branch 'maint-0.4.0' into maint-0.4.1 2019-10-22 20:48:13 +10:00
teor
9bb0ca122f
Merge branch 'maint-0.3.5' into maint-0.4.0 2019-10-22 20:48:05 +10:00
teor
bed4390133
Merge remote-tracking branch 'origin/maint-0.3.5' into maint-0.3.5 2019-10-22 20:47:44 +10:00
teor
8f84999f58
Merge branch 'ticket32177_041' into ticket32177_042
Merge RUST_VERSION from maint-0.4.2 into disabled macOS rust build
from ticket32177_041.
2019-10-22 19:44:58 +10:00
teor
86b1714731
Merge branch 'ticket32177_040' into ticket32177_041 2019-10-22 19:43:38 +10:00
teor
868bcc24e5
Merge branch 'ticket32177_035' into ticket32177_040 2019-10-22 19:43:33 +10:00
teor
8e0190d837
Merge branch 'maint-0.3.5' into ticket32177_035 2019-10-22 19:43:18 +10:00
teor
4c4a0d50ff
Travis: Disable the Rust macOS build
This build was added in 0.3.5.

We need to mitigate slow scheduling of Travis macOS jobs.

Closes ticket 32177.
2019-10-22 19:42:45 +10:00
teor
92ad87b808
Merge branch 'ticket32177_029' into ticket32177_035
Stem from maint-0.3.5, disabled macOS chutney from ticket32177_029.
2019-10-22 19:42:23 +10:00
teor
511aeba8ee
Travis: Disable all but one macOS build
We need to mitigate slow scheduling of Travis macOS jobs.

Closes ticket 32177.
2019-10-22 19:35:43 +10:00
Nick Mathewson
b4e1dc747e Merge remote-tracking branch 'tor-github/pr/1420' 2019-10-21 18:45:34 -04:00
Nick Mathewson
53aa159632 Merge branch 'maint-0.4.0' into maint-0.4.1 2019-10-21 18:44:44 -04:00
Nick Mathewson
89ead08eef Merge branch 'maint-0.3.5' into maint-0.4.0 2019-10-21 18:44:44 -04:00
Nick Mathewson
7a35c8d8be Merge branch 'maint-0.4.1' into maint-0.4.2 2019-10-21 18:44:44 -04:00
Nick Mathewson
65c0df4dbf Merge branch 'maint-0.4.2' 2019-10-21 18:44:44 -04:00
Nick Mathewson
cb13930f2b Fix a memory leak introduced by the changes to test_options.c
Since this code passes the same options to options_validate() more
than once, options_validate() needs to be prepared for that.  (This
previously worked by accident, since the smartlist of schedulers
wasn't initialized.)
2019-10-21 18:28:53 -04:00
Nick Mathewson
bd518b9ab1 Fix a memory leak introduced by changes to test_options.c
Since the FirewallPorts smartlist is now initialized, we can't just
overwrite it.
2019-10-21 18:28:08 -04:00
Taylor Yu
97e8a05083 Changes file for ticket 32176 2019-10-21 16:20:12 -05:00
Taylor Yu
6f8fad54fd Reword back matter of tor.1.txt
Reword the SEE ALSO and BUGS sections of tor.1.txt.  Based on a patch
by Swati Thacker.  Part of #32176.
2019-10-21 16:20:12 -05:00
Taylor Yu
8b9b51a6cb Reformat some file names in tor.1.txt
Reformat file name headings in the FILES section of tor.1.txt to
display as fixed-width in the HTML version.

Based on a patch by Swati Thacker.  Part of #32176.
2019-10-21 16:20:12 -05:00
Taylor Yu
e8fe6bd8d6 Reword FILES section of tor.1.txt
Reword the FILES section of tor.1.txt.  Based on a patch by Swati
Thacker.

Part of #32176.
2019-10-21 16:20:12 -05:00
Taylor Yu
a4e83cd5e5 Remove redundant FILES entry in tor.1.txt
There was a redundant entry for approved-routers in the FILES section
of tor.1.txt.

Part of #32176.
2019-10-21 16:20:12 -05:00
Nick Mathewson
5e2ffd6fd7 Fix up some Windows CI issues. 2019-10-21 15:31:56 -04:00
Nick Mathewson
b064e0420a Changes file for 32175 (test_options.c cleanup) 2019-10-21 14:46:04 -04:00
Nick Mathewson
171a741901 test_options.c: Remove TEST_OPTIONS_DEFAULT_VALUES
This finally became the empty string, since we no longer have to do
anything in individual test_options.c tests to make "" be a valid
set of options.  Now we can remove it at last.
2019-10-21 14:41:27 -04:00