Fix incorrect OpenBSD macro tests (fix testsuite failure)
The testsuite has been failing on OpenBSD, but an upcoming PR will fix this.
It was previously decided (ticket #20980 (moved)) 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 (moved) and #20980 (moved) 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
Trac:
Username: kjak