923 Commits

Author SHA1 Message Date
Michael Rash
3fb75cace3 [test suite] add SRC,PKT_SRC,DST var subsitution test 2015-10-18 09:48:07 -07:00
Michael Rash
7a09daba4c [test suite] more command cycle tests (multiple substitution vars) 2015-10-18 09:28:48 -07:00
Michael Rash
5597730e27 [test suite] added open/close file tests 2015-10-18 09:13:49 -07:00
Michael Rash
4587a279e1 [server] validate CMD_CYCLE_* vars from the access.conf file 2015-10-13 19:17:06 -07:00
Michael Rash
d67fbde992 [server] start on command open/close cycle support (issue #117) 2015-10-13 18:00:07 -07:00
Damien Stuart
24b3a216bd Updated c-unit-test README for changes in test locations. Updated autoconf files to remove references to the old c-unit-test configuration. 2015-09-05 11:05:32 -04:00
Damien Stuart
2e60687dcf Merge branch 'master' into dstuart_refactor_autoconf 2015-08-29 12:46:24 -04:00
Michael Rash
c04feff5ef [test suite] initialize coverage files in non --include mode 2015-08-23 20:50:24 -07:00
Michael Rash
b060495bb4 [test suite] rm previous coverage files in coverage mode when --include criteria is not used 2015-08-23 20:32:59 -07:00
Michael Rash
9531099a1f [test suite] use pkill when available 2015-08-23 20:08:17 -07:00
Michael Rash
fe9e42f212 [test suite] minor sudo error code searching update 2015-08-21 22:29:35 -04:00
Michael Rash
dd1528c829 [test suite] set sudo path on the fwknopd command line 2015-08-21 22:24:45 -04:00
Michael Rash
e999f61f82 [test suite] allow /usr/local/etc/sudoers path 2015-08-21 22:04:58 -04:00
Michael Rash
a9c3e204dc [test suite] pgrep usage bug fix 2015-08-18 20:40:14 -04:00
Michael Rash
f3b25bdc24 [test suite] require custom config paths for sudo tests 2015-08-16 21:06:26 -04:00
Michael Rash
47851dffdd [test suite] use pgrep for fwknopd check at init time 2015-07-25 19:17:10 -07:00
Michael Rash
591d400216 [test suite] fix sudo user tests 2015-07-25 13:26:50 -07:00
Michael Rash
6116419e21 [test suite] ensure HMAC key string is equal to SHA512_BLOCK_LEN in length (fixes ASAN warning) 2015-07-24 10:43:53 -07:00
Michael Rash
d681485e29 [server] add sudo support, closes #159 2015-07-22 04:08:58 -07:00
Michael Rash
89b2e8f477 [server] interface goes down will cause fwknopd to exit
By default, fwknopd will now exit if the interface that it is
sniffing goes down (patch contributed by Github user 'sgh7'). If this
happens, it is expected that the native process monitoring feature in
things like systemd or upstart will restart fwknopd. However, if fwknopd
is not being monitored by systemd, upstart, or anything else, this
behavior can be disabled with the EXIT_AT_INTF_DOWN variable in the
fwknopd.conf file. If disabled, fwknopd will try to recover when a
downed interface comes back up.
2015-07-18 13:11:25 -07:00
Michael Rash
295a6a0d14 [server] fix is_digits() logic and add tests 2015-07-17 21:28:02 -07:00
Michael Rash
72f03ae99c [test suite] fix 'FORWARD_ALL SNAT translate IP' test 2015-07-14 21:50:11 -04:00
Michael Rash
43f38551c9 [test suite] add ASAN mode to fko-wrapper 2015-07-14 21:26:44 -04:00
Michael Rash
f1c3806dca [test suite] added tests for duplicate rule detection (issue #162) 2015-07-14 21:13:46 -04:00
Michael Rash
3de56f8f89 [test suite] add valgrind string to client command line for garbage collection test 2015-07-13 22:41:21 -04:00
Michael Rash
588cba6063 [test suite] validate iptables rule garbage collection (added in ef9498f7) 2015-07-13 21:59:58 -04:00
Michael Rash
41b137611f [test suite] validate multiple rules removed in a single check_firewall_rules() pass - validates f4f2ada1 2015-07-12 22:50:06 -04:00
Michael Rash
4874dc9c83 [test suite] add --gpg-exe invalid path test 2015-07-05 22:55:23 -04:00
Michael Rash
012d1cf888 [server] interim commit towards a fix for --no-ipt-check rule detection
This is a significant commit for issue #162 where fwknopd is not properly
detecting rules (particularly NAT rules) on systems running older versions
of iptables where -C support is not offered. A new capability of searching
the output of an external command and getting the first matching line was
added with the search_extcmd_getline() function.
2015-07-05 20:47:06 -04:00
Michael Rash
5a58390ab4 [test suite] add dupe rule server output check 2015-07-04 17:12:49 -04:00
Michael Rash
86bcf243e6 [test suite] bug fix for iptables vs. firewalld 2015-07-04 17:03:08 -04:00
Michael Rash
814d9e1050 [test suite] minor comment update 2015-06-30 17:47:01 -07:00
Michael Rash
ca54ec7a9b [test suite] integrate afl-cov with afl-fuzz wrapper scripts
Here is an example for the client-rc.sh wrapper script to have it also
generate code coverage results for afl-fuzz (afl-cov is enabled via two
environmental variables AFL_COV and CODE_DIR).

$ cd /tmp/afl-ramdisk/fwknop.git/test/afl/
$ AFL_COV=1 CODE_DIR=/home/mbr/git/fwknop.git ./fuzzing-wrappers/client-rc.sh
2015-06-29 19:06:50 -07:00
Michael Rash
5ba88e7b83 [test suite] support afl-fuzz on Mac OS X which uses afl-clang 2015-06-26 08:39:48 -07:00
Michael Rash
2b5c38dc2b [test suite] default to not zeroing profile coverage counters
The typical work flow when generating gcov coverage results is:

- compile fwknop with coverage support
- run the test suite
- hack on fwknop
- re-run the test suite to see what coverage has been added

This work flow is much more common than collecting coverage results
for a complete test suite run. Therefore, this commit switches the
default behavior in --enable-complete mode (which enables coverage
support) to not zero-out coverage counters. A new argument
--enable-profile-coverage-init zeros the counters in preparation
for a global coverage run.
2015-06-23 16:56:25 -07:00
Michael Rash
bc6118e19f [test suite] added missing test/asan/Makefile 2015-06-18 06:16:10 -07:00
Michael Rash
5c4f7dac9b [test suite] add fwknoprc2 file to AFL client rc test cases 2015-06-16 19:16:36 -07:00
Michael Rash
4d3c472116 [test suite] add Rijndael+HMAC test for F-Droid Fwknop2 client written by Jonathan Bennett 2015-06-16 18:32:19 -07:00
Michael Rash
e0778a2d37 [test suite] disable fault injection 'tag' tests with the fko wrapper does not compile against libfiu 2015-06-15 13:53:13 -07:00
Michael Rash
7da6b9e787 [test suite] produce include/exclude stats 2015-06-15 13:48:39 -07:00
Michael Rash
7e6ec092f6 [test suite] consolidate crash detection into a single function 2015-06-15 13:12:59 -07:00
Michael Rash
e20c09d572 [test suite] add ASAN verification if fwknop is compiled with ASAN support 2015-06-14 19:15:34 -07:00
Michael Rash
e8cc2845fa [test suite] minor formatting update 2015-06-14 05:59:30 -07:00
Michael Rash
9ce5ad47c0 [test suite] disable python tests if Python.h is missing 2015-06-13 06:31:11 -07:00
Michael Rash
c8cdc91974 [test suite] added test for Rijndael-only SPA packet from the Android Fwknop2-v1.0-RC.2 binary 2015-06-12 17:46:22 -07:00
Michael Rash
404c34a0db [test suite] allow for missing makeinfo binary in recompliation tests 2015-06-12 08:47:56 -07:00
Michael Rash
b11217dc07 [test suite] better integration with Google's Address Sanitizer and AFL 2015-06-11 18:28:41 -07:00
Michael Rash
5616c7ba6d [test suite] removed deprecated AFL compile script 2015-06-09 17:01:16 -07:00
Michael Rash
e3bf862238 [test suite] removed deprecated AFL compile script 2015-06-09 16:59:20 -07:00
Michael Rash
1fb9747b2b [test suite] added Rijndael+HMAC test for Fwknop2 Beta1 2015-06-07 13:44:00 -04:00