aports/community/tcpreplay/skip-tests-require-root.patch
2024-07-13 16:56:33 +00:00

114 lines
5.4 KiB
Diff

These tests require root to run. Disable them so that we can still run the other tests
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -833,10 +833,7 @@
if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
replay_basic:
- $(PRINTF) "%s" "[tcpreplay] Basic test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Basic test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t\t%s\n" "[tcpreplay] Basic test:" "[SKIP]"
replay_nano_timer:
$(PRINTF) "%s" "[tcpreplay] Nano timer test: "
@@ -845,10 +842,7 @@
if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
replay_cache:
- $(PRINTF) "%s" "[tcpreplay] Cache test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Cache test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -c $(srcdir)/test.cidr -i $(nic1) -I $(nic2) -t $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t\t%s\n" "[tcpreplay] Cache test:" "[SKIP]"
replay_accurate:
$(PRINTF) "%s" "[tcpreplay] Accurate test: "
@@ -857,10 +851,7 @@
if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
replay_stats:
- $(PRINTF) "%s" "[tcpreplay] Statistics test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Statistics test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) --stats=1 -i $(nic1) $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t%s\n" "[tcpreplay] Statistics test:" "[SKIP]"
rewrite_portmap:
$(PRINTF) "%s" "[tcprewrite] Portmap test: "
@@ -1144,40 +1135,22 @@
if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
replay_pps:
- $(PRINTF) "%s" "[tcpreplay] Packets/sec test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 25 $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t%s\n" "[tcpreplay] Packets/sec test:" "[SKIP]"
replay_rate:
- $(PRINTF) "%s" "[tcpreplay] Mbps test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Mbps test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -M 25.0 $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t\t%s\n" "[tcpreplay] Mbps test:" "[SKIP]"
replay_multi:
- $(PRINTF) "%s" "[tcpreplay] Multiplier test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Multiplier test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -x 25.0 $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t%s\n" "[tcpreplay] Multiplier test:" "[SKIP]"
replay_pps_multi:
- $(PRINTF) "%s" "[tcpreplay] Packets/sec Multiplier test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Packets/sec Multiplier test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -p 100 --pps-multi=5 $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t%s\n" "FAILED"; else $(PRINTF) "\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t%s\n" "[tcpreplay] Packets/sec Multiplier test:" "[SKIP]"
replay_top:
- $(PRINTF) "%s" "[tcpreplay] Topspeed test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Topspeed test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -t $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t%s\n" "[tcpreplay] Topspeed test:" "[SKIP]"
replay_precache:
- $(PRINTF) "%s" "[tcpreplay] Precache test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Precache test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) --preload-pcap $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t%s\n" "[tcpreplay] Precache test:" "[SKIP]"
datadump_mode:
$(PRINTF) "%s" "[tcpreplay] Data dump test: "
@@ -1186,22 +1159,13 @@
if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
replay_config:
- $(PRINTF) "%s" "[tcpreplay] Config file/VLAN add test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Config file/VLAN add test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) --load-opts=config $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t%s\n" "[tcpreplay] Config file/VLAN add test:" "[SKIP]"
replay_dualfile:
- $(PRINTF) "%s" "[tcpreplay] Dual file test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Dual file test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) -I $(nic2) --dualfile $(TEST_PCAP) $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t%s\n" "[tcpreplay] Dual file test:" "[SKIP]"
replay_maxsleep:
- $(PRINTF) "%s" "[tcpreplay] Maximum sleep test: "
- $(PRINTF) "%s\n" "*** [tcpreplay] Maximum sleep test: " >> test.log
- $(TCPREPLAY) $(ENABLE_DEBUG) -i $(nic1) --maxsleep=20 $(TEST_PCAP) $(TEST_PCAP) >> test.log 2>&1
- if [ $? ] ; then $(PRINTF) "\t\t%s\n" "FAILED"; else $(PRINTF) "\t\t%s\n" "OK"; fi
+ $(PRINTF) "%s\t\t\t%s\n" "[tcpreplay] Maximum sleep test:" "[SKIP]"
# the following write to a file
replay_include: