Closed cbiedl closed 2 years ago
@cbiedl I had tested on armhf QEMU image but maybe my setup is different. I am running wheezy with libpcap 0.9.8. Can you help me understand your setup so I can reproduce?
The issue with reverting this commit, tests will fail on Apple M1.
root@debian-armhf:/home/user/tcpreplay-4.4.0# uname -a
Linux debian-armhf 3.2.0-4-vexpress #1 SMP Debian 3.2.51-1 armv7l GNU/Linux
root@debian-armhf:/home/user/tcpreplay-4.4.0# make test
echo Making test in ./test
Making test in ./test
cd ./test && make test
make[1]: Entering directory `/home/user/tcpreplay-4.4.0/test'
NOTICE: Tests must be run as root
Sending traffic on 'eth0' and 'eth0'
[tcpprep] Auto/Router mode test: OK
[tcpprep] Auto/Bridge mode test: OK
[tcpprep] Auto/Client mode test: OK
[tcpprep] Auto/Server mode test: OK
[tcpprep] Auto/First mode test: OK
[tcpprep] CIDR mode test: OK
[tcpprep] Regex mode test: OK
[tcpprep] Port mode test: OK
[tcpprep] MAC mode test: OK
[tcpprep] Comment mode test: OK
[tcpprep] Print info mode test: OK
[tcpprep] Print comment mode test: OK
[tcpprep] Config mode test: OK
[tcpprep] MAC reverse mode test: OK
[tcpprep] CIDR reverse mode test: OK
[tcpprep] Regex reverse mode test: OK
[tcpprep] exclude packets test: OK
[tcpprep] include packets test: OK
[tcpprep] include source test: OK
[tcpprep] include destination test: OK
[tcpreplay] Basic test: OK
[tcpreplay] Cache test: OK
[tcpreplay] Packets/sec test: OK
[tcpreplay] Mbps test: OK
[tcpreplay] Topspeed test: OK
[tcpreplay] Config file/VLAN add test: OK
[tcpreplay] Multiplier test: OK
[tcpreplay] Packets/sec Multiplier test: OK
[tcpreplay] Precache test: OK
[tcpreplay] Statistics test: OK
[tcpreplay] Dual file test: OK
[tcpreplay] Maximum sleep test: OK
[tcprewrite] Portmap test: OK
[tcprewrite] Portmap range test: OK
[tcprewrite] Endpoint test: OK
[tcprewrite] Pseudo NAT test: OK
[tcprewrite] Truncate test: OK
[tcprewrite] Pad test: OK
[tcprewrite] Seed IP test: OK
[tcprewrite] Src/Dst MAC test: OK
[tcprewrite] Layer2 test: OK
[tcprewrite] Config/VLAN Add test: OK
[tcprewrite] Skip bcast test: OK
[tcprewrite] DLT User test: OK
[tcprewrite] DLT Cisco HDLC test: OK
[tcprewrite] VLAN 802.1ad test: OK
[tcprewrite] VLAN Delete test: OK
[tcprewrite] Remove EFCS: OK
[tcprewrite] Force TTL: OK
[tcprewrite] Increase TTL: OK
[tcprewrite] Reduce TTL: OK
[tcprewrite] TOS test: OK
[tcprewrite] MTU Truncate test: OK
[tcprewrite] Substitute Src/Dst MAC test: OK
[tcprewrite] Seeded MAC test: OK
[tcprewrite] Seeded Keep MAC test: OK
[tcprewrite] L7 fuzzing test: OK
[tcprewrite] TCP sequence test: OK
[tcprewrite] Fix checksum test: OK
[tcprewrite] Fix length and pad test: OK
[tcprewrite] Fix length and truncate test: OK
[tcprewrite] Fix length and delete test: OK
make[1]: Leaving directory `/home/user/tcpreplay-4.4.0/test'
Although I could not reproduce this on my armhf, I believe this will fix the issue on all Linux ARM devices
Main fix is to revert FORCE_ALIGN code, and improve the test for whether or not it is required. Also made some fixes around FORCED_ALIGN.
Don't do test for Apple devices - not required. Also do the test for other ARM devices.
Fixed in PR #707
The Debian buildd daemons report "Bus error" in the test suite when building on armhf https://buildd.debian.org/status/fetch.php?pkg=tcpreplay&arch=armhf&ver=4.4.0-1&stamp=1644098099&raw=0:
On my local boxes, I can confirm this behaviour.
Bisect led to
Backtrace, command was:
So I'd ask you to re-visit this issue and find a better solution for it.
Reverting that commit doesn't look like a good idea, and also introduces another issue, I haven't checked further: