| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The killstate:match test starts nc as a background process. There was no
guarantee that the nc process would have connected by the time we check
for states, so this test occasionally failed without good reason.
Teach the test to wait for at least some states to turn up before
executing the critical checks.
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 70dd30d49c29a27e1ef159660a7e3dbb84082674)
|
|
|
|
|
|
|
|
|
|
| |
See a26e895f3d803cc1f4ee1c2b33c61330998808b9. Silence these new tests as
well.
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 9d0bc96ef8c0288c05a627b3961edd2da046c5c9)
|
|
|
|
|
|
| |
Obtained from: Alexander Bluhm, OpenBSD
(cherry picked from commit d39d5ee2d67f61abc890b51973b5c4a0c81d6647)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rework the tests to check the correct layer in a single test. Factor
out tests for reuse in other modules. Extend the test suite for
libalias(3) to incoming connections. Test the various types of
redirections.
gettimeofday(3) is almost as expensive as the calls to libalias.
So the call frequency for this call is reduced by a factor of 1000 in
order to neglect it's influence.
Using NAT entries became more realistic: A communication of a random
length of up to 150 packets (10% outgoing, 90% incoming) is applied
for each entry.
Add port forwardings to the performance tests. This will cause random
incoming packets to match the random port forwardings opends beforehand.
After a long test run, a lot of ressouces have been allocated.
Measure the time tot free them.
Reviewed by: kp (partially)
Differential Revision: https://reviews.freebsd.org/D30412
Differential Revision: https://reviews.freebsd.org/D30408
Differential Revision: https://reviews.freebsd.org/D30405
Differential Revision: https://reviews.freebsd.org/D30443
(cherry picked from commit f1462ab0512c1a0e59f03a7a145df2889bed2997)
(cherry picked from commit 755bab6d55e6e2df168f352f3e2fbdea87002ed8)
(cherry picked from commit 6e87898a2c7e99937656a0c12d03333a43a10c5e)
(cherry picked from commit d62e1ecba07b2acee37e019778087f0f55d977d1)
(cherry picked from commit 5434ebd256a08e452dec376c1488abdf7ff02af8)
Fix various bugs:
(cherry picked from commit ccac04cae538a625cbce224e4005360fa85e1b9d)
(cherry picked from commit 7b8696bf128754712a24ba98ce2d88eed2ee68dc)
(cherry picked from commit fef99da69f983566de3cb8ad4a1b8decc31348ce)
(cherry picked from commit f4c460dacdda5c6e1896a0c51d6096c4f3417b32)
|
|
|
|
|
|
|
| |
Due to the new, external performance test utility, the regular test
suite can reduce the stress test to a fair amount of activity.
(cherry picked from commit a660948b7b2d875591aba3713620424c51330038)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to modify libalias for performance, the existing
functionality must not change. Enforce this.
Testing LibAliasOut functionality. This concentrates the typical use
case of initiating data transfers from the inside. Provide a
exhaustive test for the data structure in order to check for
performance improvements.
In order to compare upcoming changes for their effectivness, measure
performance by counting opertions and the runtime of each operation
over the time. Accumulate all tests in a single instance, so make it
complicated over the time. If you wait long enough, you will notice
the expiry of old flows.
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D30307
Differential Revision: https://reviews.freebsd.org/D30335
Differential Revision: https://reviews.freebsd.org/D30379
(cherry picked from commit 7fd8baee756efa18b6bbb17cbf3a652eb2058d87)
(cherry picked from commit c1fbb54f4b100d576da7ab065d1887a21f691936)
(cherry picked from commit 33c1bdfc3e098862100bab7a8dc729d8c78ffa7c)
|
|
|
|
|
|
|
|
|
| |
Reviewed by: eri
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30247
(cherry picked from commit 7bd7933f9a4f1757fdefeee2e1ac8b8c4d299fc3)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test the specific case reported in PR 255852. Clearing the skip flag
on groups was broken because pfctl couldn't work out if a kif was a
group or not, because the kernel no longer set the pfik_group pointer.
PR: 255852
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D30285
(cherry picked from commit 45db38554517c7e1b0cc0265113c22f92a0eb494)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since 2.4.5 scapy started issuing warnings about a few different
configurations during our tests. These are harmless, but they generate
stderr output, which upsets atf_check.
Configure scapy to only log critical errors (and thus not warnings) to
fix these tests.
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit a26e895f3d803cc1f4ee1c2b33c61330998808b9)
|
|
|
|
|
|
|
|
| |
PR: 254924
Reviewed by: donner
Differential Revision: https://reviews.freebsd.org/D29783
(cherry picked from commit 4ae3a97e127cea14277b904af31483af7e6e2891)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Python 3.8 warns about line 112:
'SyntaxWarning: "is" with a literal. Did you mean "=="?'
Use '==' as Python suggests.
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit 80430c15caac0c10832455f868fa01c912996982)
|
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30093
(cherry picked from commit ac200a9c3847d3a92c347de60e32a7af430dede6)
|
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30059
(cherry picked from commit c2e11d81d295f7d55ac8b6858b09d8fa123cbfe8)
|
|
|
|
|
|
|
|
| |
MFC after: 4 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29781
(cherry picked from commit e14d56f370184fdf7ef33ec57883a45f4a220cff)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MAP-E (RFC 7597) requires special care for selecting source ports
in NAT operation on the Customer Edge because a part of bits of the port
numbers are used by the Border Relay to distinguish another side of the
IPv4-over-IPv6 tunnel.
PR: 254577
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D29468
(cherry picked from commit 2aa21096c7349390f22aa5d06b373a575baed1b4)
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
(cherry picked from commit b59851e99c20f3a72c34bdf9919e3bf49b894e4e)
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we support having multiple labels on a rule ensure that we can
use each rule label to kill states.
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29938
(cherry picked from commit 5632f585355ad380cb9ef932c419e2efdb1fc46b)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a test case where the pfctl optimizer will generate a table
automatically. These tables have long names, which we accidentally broke
in the nvlist ADDRULE ioctl.
Reviewed by: melifaro
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29989
(cherry picked from commit 08d77308211f823b8532d27790e8fd29eaf75c77)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a problem with pf's reassembly code where it produces incorrect
checksums when reassembling across interfaces with different MTUs.
Test this.
PR: 255432
Reviewed by: donner
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D30013
(cherry picked from commit 388c0cde10293d9a3434e99146bf391aec6878a3)
|
|
|
|
|
|
|
|
|
|
|
| |
This was briefly broken, so ensure that we can read and clear rules
counters.
MFC after: 4 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29728
(cherry picked from commit 112f007e12818ba3d54869b331139090e69dbc74)
|
|
|
|
|
|
| |
MFC after: 1 week
(cherry picked from commit daa5350d0e0c5fbe42c5a057dd37b9d22df91bb7)
|
|
|
|
|
|
|
|
| |
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29719
(cherry picked from commit 3a248c84419d4f7d6617d30744ab56d0b456fe03)
|
|
|
|
|
|
|
|
|
| |
Reviewed by: donner
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29797
(cherry picked from commit 9af2317423f399b30ff028e078d01eef553efc7f)
|
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29796
(cherry picked from commit 065b5c7fb26eb4239e9bd513dde5a55ef78e45c4)
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the routing tests create per-test VNET, making
it harder to repeat the failure with CLI tools.
Provide an additional route/nexthop data on failure.
Differential Revision: https://reviews.freebsd.org/D29957
Reviewed by: kp
MFC after: 2 weeks
(cherry picked from commit bddae5c8a64dc6b292198945cbe676bb2158d438)
|
|
|
|
|
|
| |
MFC after: 3 days
(cherry picked from commit 37c0f4a2077739e735732374d67525cf6de36d21)
|
|
|
|
|
|
|
|
|
|
|
|
| |
I changed the Makefile to use SRCS instead of LDADD, but since there is
still and absolute path to the source the .o file was created inside the
source directory instead of the build directory.
It would be nice if this was an error/warning by default, but for now just
fix this issue by using .PATH and the base name of the file.
Reported by: cy, peterj
(cherry picked from commit 8b820df156e065f48857dca89a89462074659e14)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This avoids a SIGILL when running these tests on QEMU (which
defaults to a basic amd64 CPU without SSE4.2).
This commit also tests the table-based implementations in addition to
testing the hw-accelerated crc32 versions.
Reviewed By: cem, kib, markj
Differential Revision: https://reviews.freebsd.org/D28395
(cherry picked from commit 83c20b8a2da04937cf4af127366b3dc92c855784)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replicates an issue observed on pfSense: https://redmine.pfsense.org/issues/11436
In essence, reply-to is needed to ensure that connections always leave
the WAN interface they came in on, but this confused the state tracking.
MFC after: 2 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit f37667e2359245ad123fd775c072fd82c81bc476)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tests/sys/netfil/pf/synproxy fails if inetd has been running
outside of the jail because pidfile_open() fails with EEXIST.
tests/sys/netfil/pf/nat has the same problem but the test succeeds
because whether inetd is running is not so important.
Fix the problem by changing the pidfile path from the default
location.
Reviewed by: kp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29622
(cherry picked from commit 5a5623397c73e46b206289d32d1d6b9de420da9c)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They have been failing for 1.5 months and the patch to fix them is stuck
in review so mark them as XFAIL for now to get Jenkins back to green.
To be reverted when https://reviews.freebsd.org/D28886 (or similar) is
commited.
Reviewed By: kp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D29528
(cherry picked from commit 83532eb68cd06a3517bb7b5e5a34afcf798de914)
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should bring the number of Jenkins failures from 4 down to 3.
Locally kyua now prints `skipped: could not find a valid interface [0.115s]`
when I run it in QEMU without a network device.
Reviewed By: lwhsu
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D29414
(cherry picked from commit 6f30d1c851467d1f504f469a1b3a75a043ff070f)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was trying to debug why this test is working locally but failing in CI.
While doing so I made some small changes to allow running it with set -e.
It turns out the problem is that find_iface does not return anything in
Jenkins, so all following tests fail with obscure error messages.
To handle this case exit early if $eth is empty.
Reviewed By: lwhsu
Differential Revision: https://reviews.freebsd.org/D29340
(cherry picked from commit 7dd1f932c1f51bfe10da7bc8875879cdcdd40821)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSG_CMSG_CLOEXEC has not been working since 2015 (SVN r284380) because
_finstall expects O_CLOEXEC and not UF_EXCLOSE as the flags argument.
This was probably not noticed because we don't have a test for this flag
so this commit adds one. I found this problem because one of the
libwayland tests was failing.
Fixes: ea31808c3b07 ("fd: move out actual fp installation to _finstall")
MFC after: 3 days
Reviewed By: mjg, kib
Differential Revision: https://reviews.freebsd.org/D29328
(cherry picked from commit 6ceacebdf5221133943ab3b6b56751c8b51c3e2b)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) F_SETLKW (blocking) operations would be sent to the FUSE server as
F_SETLK (non-blocking).
2) Release operations, F_SETLK with lk_type = F_UNLCK, would simply
return EINVAL.
PR: 253500
Reported by: John Millikin <jmillikin@gmail.com>
(cherry picked from commit 929acdb19acb67cc0e6ee5439df98e28a84d4772)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test that pfsync works as expected with bulk updates. That is, create
some state before setting up the second firewall. Let that firewall
request a bulk update so it can catch up, and check that it got the
state which was created before it enable pfsync.
PR: 254236
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D29272
(cherry picked from commit 8ad7d25dfc808ca00300f7553a9b28dfc0e99c18)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows d_off to be used with lseek to position the file so that
getdirentries(2) will return the next entry. It is not used by
readdir(3).
PR: 253411
Reported by: John Millikin <jmillikin@gmail.com>
Reviewed by: cem
Differential Revision: https://reviews.freebsd.org/D28605
(cherry picked from commit 71befc35061b3c9d8cc07e34c5dce622c848fcdb)
|
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D29078
(cherry picked from commit 9d3b2bcf761041bbe79da3de25f2e4142d90b46a)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should allow the test to pass in Jenkins. Testing it locally now
reports "passed" instead of "invalid TAP data".
While touching this file also fix some shellcheck warnings that were
pointed out by my IDE.
Reviewed By: lwhsu, afedorov
Differential Revision: https://reviews.freebsd.org/D29054
(cherry picked from commit 65f4ff4e68afc3867781dfc8cd4faf2a8be1c74f)
|
|
|
|
|
|
|
|
|
|
|
|
| |
The argument has to be a single whitespace-separate value. While touching
all these lines also add ksh93, since `atf_set "require.progs"` overrides
the default value specified in the Kyuafile. This then results in tests
being executed despite ksh93 not being installed.
Reviewed By: asomers
Differential Revision: https://reviews.freebsd.org/D29066
(cherry picked from commit 0b86424c31ece31190c94d55feb5d190be4de5df)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of running tests one-by-one with the shell wrapper we now run
the full gtest testsuite twice (once as root, once as non root). This
significantly speeds up running tests despite running them twice.
This change also passes the missing -u flag to capsicum-test that caused
test failures (https://bugs.freebsd.org/250178)
Previously, running the testsuite with the wrapper script took ~3s per
test on aarch64 QEMU, i.e. a total of almost 5 minutes.
Now it takes 6 seconds to run all tests twice.
Before:
root@freebsd-aarch64:/usr/tests/sys/capsicum # /usr/bin/time kyua test functional
94/96 passed (2 failed)
309.97 real 58.46 user 244.31 sys
After:
root@freebsd-aarch64:/usr/tests/sys/capsicum # /usr/bin/time kyua test functional
functional:test_root -> passed [2.659s]
functional:test_unprivileged -> passed [2.391s]
2/2 passed (0 failed)
5.48 real 1.06 user 2.52 sys
This overhead is caused by kyua + atf-sh spawning lots of additional
processes and can be avoided by just running the googletest test binary.
syscall seconds calls errors
fork 39.810229456 1275 0
sigprocmask 13.546928736 572 0
i.e. 1275 processes spawned to run a single test.
Test Plan: All tests pass with D28907.
PR: 250178
Reviewed By: lwhsu
Differential Revision: https://reviews.freebsd.org/D29014
(cherry picked from commit 53a535c1d80a2e5ea33a4e8807647e600402b1d8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes various fixes that I submitted recently such as updating the
pdkill() tests for the actual implemented behaviour
(https://github.com/google/capsicum-test/pull/53) and lots of changes to
avoid calling sleep() and replacing it with reliable synchronization
(pull requests 49,51,52,53,54). This should make the testsuite more reliable
when running on Jenkins. Additionally, process status is now retrieved using
libprocstat instead of running `ps` and parsing the output
(https://github.com/google/capsicum-test/pull/50). This fixes one previously
failing test and speeds up execution.
Overall, this update reduces the total runtime from ~60s to about 4-5 seconds.
(cherry picked from commit 955a3f9ad586f38395e66127f9f2f4afbf3d5a94)
|
|
|
|
|
|
|
|
|
| |
Otherwise these tests fail with incomprehensible error messages.
Reviewed By: kp
Differential Revision: https://reviews.freebsd.org/D28894
(cherry picked from commit 3775ddcf5a12c8e23970e94b7b165bf23c92aeba)
|
|
|
|
|
|
|
|
|
|
|
| |
This also fixes a typo in the dup test that caused the head function to
not be called. On my test system without python3 the tests are now
skipped instead of failing.
Reviewed By: kp
Differential Revision: https://reviews.freebsd.org/D28903
(cherry picked from commit 98202829d1b3727a8706f45d052fc9e9507b562b)
|
|
|
|
|
|
|
|
|
|
| |
This makes the `kyua report --verbose` output a lot easier to parse when
looking at failed tests. It also fixes the closefrom() test since I
tested my changes with this commit but forgot to push it together with
fa32350347b4e351a144b5423f0fb2ca9d67f4ca.
Fixes: fa32350347b4 ("close_range: add audit support")
(cherry picked from commit c97304110a02f9c41b515e7b94d53229ab8f61af)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the closefrom test in sys/audit.
Includes cherry-picks of the following commits from openbsm:
https://github.com/openbsm/openbsm/commit/4dfc628aafe589d68848f7033f3d3488c4d979e0
https://github.com/openbsm/openbsm/commit/99ff6fe32aebc5a4b8d40d60062b8574697df557
https://github.com/openbsm/openbsm/commit/da48a0399e95448693d3fa2be48454ca564c1be8
Reviewed By: kevans
Differential Revision: https://reviews.freebsd.org/D28388
(cherry picked from commit fa32350347b4e351a144b5423f0fb2ca9d67f4ca)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the CheriBSD CI we reproducibly see the first test in sys/audit
(administrative:acct_failure) fail due to a missing startup message.
It appears this is caused by a race condition when starting auditd:
`service auditd onestart` returns as soon as the initial auditd() parent
exits (after the daemon(3) call).
We can avoid this problem by setting up the auditd infrastructure
in-process: libauditd contains audit_quick_{start,stop}() functions that
look like they are ideally suited to this task.
This patch also avoids forking lots of shell processes for each of the 418
tests by using `auditon(A_SENDTRIGGER, &trigger, sizeof(trigger))` to check
for a running auditd(8) instead of using `service auditd onestatus`.
With these two changes (and D28388 to fix the XFAIL'd test) I can now
boot and run `cd /usr/tests/sys/audit && kyua test` without any failures
in a single-core QEMU instance. Before there would always be at least one
failed test.
Besides making the tests more reliable in CI, a nice side-effect of this
change is that it also significantly speeds up running them by avoiding
lots of fork()/execve() caused by shell scripts:
Running kyua test on an AArch64 QEMU took 315s before and now takes 68s,
so it's roughly 3.5 times faster. This effect is even larger when running
on a CHERI-RISC-V QEMU since emulating CHERI instructions on an x86 host
is noticeably slower than emulating AArch64.
Test Plan: aarch64+amd64 QEMU no longer fail.
Reviewed By: asomers
Differential Revision: https://reviews.freebsd.org/D28451
(cherry picked from commit df093aa9463b2121d8307fb91c4ba7cf17f4ea64)
|
|
|
|
|
|
|
|
|
|
| |
It seems like GCC's -Wsign-compare is stricter and also warns for
constants. Appease GCC by adding the required casts.
Fixes: 96a9e50e63bfc ("ptrace_test: Add more debug output on test failures")
Reported by: Jenkins CI
(cherry picked from commit 1fcbddec14dd693acf6a4be579f8d9e10b6a06a4)
|
|
|
|
|
|
|
|
|
|
|
| |
ATF now opens the results file (without CLOEXEC), so the child actually
has a valid file descriptor 3. To fix this simply use a large number that
will definitely not be a valid file descriptor.
Reviewed by: jhb, cem, lwhsu
Differential Revision: https://reviews.freebsd.org/D28889
(cherry picked from commit 17cc20092cd7a45adb6d772e0f449617007a82d9)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've run these tests many times in a loop on multiple architectures and
it works reliably for me, maybe it's time to retire these skips?
This also adds an additional waitpid to one of the tests to avoid
a potential race condition (suggested by markj@).
PR: 239397, 244056, 239425, 240510, 220841, 243605
Reviewed By: markj
Differential Revision: https://reviews.freebsd.org/D28888
(cherry picked from commit 1032131464f1196ad674b30c14a9e611789a1061)
|