[tor-bugs] #32609 [Core Tor/Tor]: Improve practracker unit tests, and run them in "make check" and pre-commit

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Nov 26 17:35:04 UTC 2019


#32609: Improve practracker unit tests, and run them in "make check" and pre-commit
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  teor
     Type:  enhancement                          |         Status:
                                                 |  needs_review
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.4.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  test, network-team-roadmap-november  |  Actual Points:  0.4
Parent ID:  #32522                               |         Points:  0.4
 Reviewer:  nickm                                |        Sponsor:
                                                 |  Sponsor31-can
-------------------------------------------------+-------------------------

Comment (by nickm):

 > This isn't quite the fix I wanted, so I'd like your advice.

 The commits themselves look okay to me.  Is the issue the one that you
 mention here?

 > Is there a way we can restrict includes to ".h" and ".inc"?
 > Perhaps with some custom code in practracker includes.py?

 We could add a .may_include to all directories, starting with "*.h" and
 "*.inc".  Then practracker would start looking at them.  Does that do what
 you want?

 Right now it looks like there are some places where we include .c files
 intentionally.  And arguably we should rename ".i" to ".inc"

 {{{
 [1424]$ git grep '#include' src/ |grep -v '.\(h\|inc\)[>"]'
 src/ext/ed25519/donna/ed25519_tor.c:#include "test-internals.c"
 src/ext/ed25519/donna/fuzz/ed25519-donna-sse2.c:#include "../ed25519.c"
 src/ext/ed25519/donna/fuzz/ed25519-donna.c:#include "../ed25519.c"
 src/ext/timeouts/bench/bench-wheel.c:#include "timeout.c"
 src/ext/timeouts/lua/timeout-lua.c:#include "timeout.c"
 src/ext/timeouts/timeout.c:#include "ext/timeouts/timeout-bitops.c"
 src/lib/evloop/timers.c:#include "ext/timeouts/timeout.c"
 src/lib/fs/files.c:#include "ext/getdelim.c"
 src/lib/string/compat_string.c:#include "ext/strlcpy.c"
 src/lib/string/compat_string.c:#include "ext/strlcat.c"
 src/lib/version/git_revision.c:#include "micro-revision.i"
 src/lib/version/git_revision.c:#include "micro-revision.i"
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32609#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list