[tor-bugs] #28938 [Core Tor]: Fix incorrect OpenBSD macro tests (fix testsuite failure)

Tor Bug Tracker & Wiki blackhole at torproject.org
Sun Dec 23 21:01:59 UTC 2018


#28938: Fix incorrect OpenBSD macro tests (fix testsuite failure)
--------------------+--------------------------
 Reporter:  kjak    |          Owner:  (none)
     Type:  defect  |         Status:  new
 Priority:  Medium  |      Component:  Core Tor
  Version:          |       Severity:  Normal
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
 Reviewer:          |        Sponsor:
--------------------+--------------------------
 The testsuite has been failing on OpenBSD, but an upcoming PR will fix
 this.

 It was previously decided (ticket #20980) that the `OpenBSD` macro would
 be used to test for OpenBSD (rather than `__OpenBSD__`, etc.) because the
 former seems to be defined on OpenBSD forks when the latter may or may not
 be.

 However, `sys/param.h` needs to be included for this macro to be defined.
 There were many files where `OpenBSD` was tested for, but when
 `sys/param.h` was not included.

 An upcoming PR will contain a fix to include `sys/param.h` in the files
 where the `OpenBSD` macro is used (when it is not included already).  It
 will also change a couple of instances of the `__OpenBSD__` macro to
 `OpenBSD`.

 See commit 27df23abb675ffeb198bf0c1cc85c4baed77a988 where the usage of
 `__OpenBSD__` and `OPENBSD` macros were replaced with `OpenBSD`.

 See also tickets #6982 and #20980 where the various macros were discussed.
 The latter ticket is where it was decided to use the `OpenBSD` macro.


 I tested on this box:

 {{{
 $ uname -mrs
 OpenBSD 6.4 amd64
 }}}


 Before:

 {{{
 =============================================
    tor 0.4.0.0-alpha-dev: ./test-suite.log
 =============================================

 # TOTAL: 20
 # PASS:  15
 # SKIP:  4
 # XFAIL: 0
 # FAIL:  1
 # XPASS: 0
 # ERROR: 0

 <snip>

 options/validate__transproxy: [forking]
   FAIL src/test/test_options.c:1164: assert(tdata)
   [validate__transproxy FAILED]

 <snip>
 }}}

 ...and after:

 {{{
 =============================================
    tor 0.4.0.0-alpha-dev: ./test-suite.log
 =============================================

 # TOTAL: 20
 # PASS:  16
 # SKIP:  4
 # XFAIL: 0
 # FAIL:  0
 # XPASS: 0
 # ERROR: 0
 }}}

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


More information about the tor-bugs mailing list