Repository: secdev/scapy

Issue:
Contrib tests in regression.uts
Some contrib tests are in regression.uts and need to be moved.


Discussion:
will work on it. (kind of compensation for the FUD I left over in LLDP)
Is there anything else beside the MPLS tests?
I would like to move scapy/contrib/*.uts to test/contrib.
> I would like to move...

or

I would *also* like to move...

as moving scapy/contrib/*.uts is somehow different from extracting contrib tests from regression.uts.

I can do it - new ticket or new issue title?
Btw: nice trick to make me read the 10K lines of tests. Learned a lot.  :smile: 
Sorry =/
did I miss something? open PR and refine there?
@guedou can we close this one?
I would like to move them to either scapy/contribs/ or tests/contribs. I prefer the last solution as it would be a good opportunity to move all tests under tests/

> I would like to move them to either scapy/contribs/ or tests/contribs. I prefer the last solution as it would be a good opportunity to move all tests under tests/

Any decision/opinion/ideas/comments on that?




I do agree with guedou, it would be a good idea to relocate the tests.

It was very handy to have the tests next to the files at the time some contrib modules were missing tests, but we now have added tests for all of them so It isn’t necessary anymore

Resolving patch:
diff --git a/scapy/tools/UTscapy.py b/scapy/tools/UTscapy.py
--- a/scapy/tools/UTscapy.py
+++ b/scapy/tools/UTscapy.py
@@ -865,7 +865,11 @@ def main():
                     raise getopt.GetoptError("Unknown output format %s" % msg)
                 TESTFILES = resolve_testfiles(TESTFILES)
                 for testfile in resolve_testfiles(data.remove_testfiles):
-                    TESTFILES.remove(testfile)
+                    try:
+                        TESTFILES.remove(testfile)
+                    except ValueError:
+                        error_m = "Cannot remove %s from test files" % testfile
+                        raise getopt.GetoptError(error_m)
             elif opt == "-o":
                 OUTPUTFILE = optarg
                 if not os.access(os.path.dirname(os.path.abspath(OUTPUTFILE)), os.W_OK):


Test patch:
diff --git a/test/configs/bsd.utsc b/test/configs/bsd.utsc
--- a/test/configs/bsd.utsc
+++ b/test/configs/bsd.utsc
@@ -1,17 +1,17 @@
 {
   "testfiles": [
     "test/*.uts",
-    "scapy/contrib/*.uts"
+    "test/contrib/*.uts"
   ],
   "remove_testfiles": [
     "test/linux.uts",
     "test/windows.uts",
-    "scapy/contrib/cansocket_native.uts",
-    "scapy/contrib/cansocket_python_can.uts"
+    "test/contrib/cansocket_native.uts",
+    "test/contrib/cansocket_python_can.uts"
   ],
   "onlyfailed": true,
   "preexec": {
-    "scapy/contrib/*.uts": "load_contrib(\"%name%\")",
+    "test/contrib/*.uts": "load_contrib(\"%name%\")",
     "test/cert.uts": "load_layer(\"tls\")",
     "test/sslv2.uts": "load_layer(\"tls\")",
     "test/tls*.uts": "load_layer(\"tls\")"
diff --git a/test/configs/linux.utsc b/test/configs/linux.utsc
--- a/test/configs/linux.utsc
+++ b/test/configs/linux.utsc
@@ -1,7 +1,7 @@
 {
   "testfiles": [
     "test/*.uts",
-    "scapy/contrib/*.uts",
+    "test/contrib/*.uts",
     "test/tls/tests_tls_netaccess.uts"
   ],
   "remove_testfiles": [
@@ -11,7 +11,7 @@
   "breakfailed": true,
   "onlyfailed": true,
   "preexec": {
-    "scapy/contrib/*.uts": "load_contrib(\"%name%\")",
+    "test/contrib/*.uts": "load_contrib(\"%name%\")",
     "test/cert.uts": "load_layer(\"tls\")",
     "test/sslv2.uts": "load_layer(\"tls\")",
     "test/tls*.uts": "load_layer(\"tls\")"
diff --git a/test/configs/windows.utsc b/test/configs/windows.utsc
--- a/test/configs/windows.utsc
+++ b/test/configs/windows.utsc
@@ -2,18 +2,18 @@
   "testfiles": [
     "test\\*.uts",
     "test\\tls\\tests_tls_netaccess.uts",
-    "scapy\\contrib\\*.uts"
+    "test\\contrib\\*.uts"
   ],
   "remove_testfiles": [
-    "scapy\\contrib\\cansocket_native.uts",
-    "scapy\\contrib\\cansocket_python_can.uts",
+    "test\\contrib\\cansocket_native.uts",
+    "test\\contrib\\cansocket_python_can.uts",
     "test\\bpf.uts",
     "test\\linux.uts"
   ],
   "breakfailed": true,
   "onlyfailed": true,
   "preexec": {
-    "scapy\\contrib\\*.uts": "load_contrib(\"%name%\")",
+    "test\\contrib\\*.uts": "load_contrib(\"%name%\")",
     "test\\cert.uts": "load_layer(\"tls\")",
     "test\\sslv2.uts": "load_layer(\"tls\")",
     "test\\tls*.uts": "load_layer(\"tls\")"
diff --git a/test/configs/windows2.utsc b/test/configs/windows2.utsc
--- a/test/configs/windows2.utsc
+++ b/test/configs/windows2.utsc
@@ -2,18 +2,18 @@
   "testfiles": [
     "*.uts",
     "tls\\tests_tls_netaccess.uts",
-    "..\\scapy\\contrib\\*.uts"
+    "contrib\\*.uts"
   ],
   "remove_testfiles": [
-    "..\\scapy\\contrib\\cansocket_native.uts",
-    "..\\scapy\\contrib\\cansocket_python_can.uts",
+    "contrib\\cansocket_native.uts",
+    "contrib\\cansocket_python_can.uts",
     "bpf.uts",
     "linux.uts"
   ],
   "breakfailed": true,
   "onlyfailed": true,
   "preexec": {
-    "..\\scapy\\contrib\\*.uts": "load_contrib(\"%name%\")",
+    "contrib\\*.uts": "load_contrib(\"%name%\")",
     "cert.uts": "load_layer(\"tls\")",
     "sslv2.uts": "load_layer(\"tls\")",
     "tls*.uts": "load_layer(\"tls\")"
diff --git a/scapy/contrib/altbeacon.uts b/test/contrib/altbeacon.uts
similarity index 96%
rename from scapy/contrib/altbeacon.uts
rename to test/contrib/altbeacon.uts
--- a/scapy/contrib/altbeacon.uts
+++ b/test/contrib/altbeacon.uts
@@ -1,7 +1,7 @@
 % AltBeacon unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('altbeacon')" -t scapy/contrib/altbeacon.uts
+# $ test/run_tests -P "load_contrib('altbeacon')" -t test/contrib/altbeacon.uts
 #
 # AltBeaconParser tests adapted from:
 # https://github.com/AltBeacon/android-beacon-library/blob/master/lib/src/test/java/org/altbeacon/beacon/AltBeaconParserTest.java
diff --git a/scapy/contrib/aoe.uts b/test/contrib/aoe.uts
similarity index 100%
rename from scapy/contrib/aoe.uts
rename to test/contrib/aoe.uts
diff --git a/scapy/contrib/automotive/bmw/enet.uts b/test/contrib/automotive/bmw/enet.uts
similarity index 100%
rename from scapy/contrib/automotive/bmw/enet.uts
rename to test/contrib/automotive/bmw/enet.uts
diff --git a/scapy/contrib/automotive/ccp.uts b/test/contrib/automotive/ccp.uts
similarity index 100%
rename from scapy/contrib/automotive/ccp.uts
rename to test/contrib/automotive/ccp.uts
diff --git a/scapy/contrib/automotive/gm/gmlan.uts b/test/contrib/automotive/gm/gmlan.uts
similarity index 100%
rename from scapy/contrib/automotive/gm/gmlan.uts
rename to test/contrib/automotive/gm/gmlan.uts
diff --git a/scapy/contrib/automotive/obd/obd.uts b/test/contrib/automotive/obd/obd.uts
similarity index 100%
rename from scapy/contrib/automotive/obd/obd.uts
rename to test/contrib/automotive/obd/obd.uts
diff --git a/scapy/contrib/automotive/someip.uts b/test/contrib/automotive/someip.uts
similarity index 100%
rename from scapy/contrib/automotive/someip.uts
rename to test/contrib/automotive/someip.uts
diff --git a/scapy/contrib/automotive/someip_sd.uts b/test/contrib/automotive/someip_sd.uts
similarity index 100%
rename from scapy/contrib/automotive/someip_sd.uts
rename to test/contrib/automotive/someip_sd.uts
diff --git a/scapy/contrib/automotive/uds.uts b/test/contrib/automotive/uds.uts
similarity index 100%
rename from scapy/contrib/automotive/uds.uts
rename to test/contrib/automotive/uds.uts
diff --git a/scapy/contrib/avs.uts b/test/contrib/avs.uts
similarity index 100%
rename from scapy/contrib/avs.uts
rename to test/contrib/avs.uts
diff --git a/scapy/contrib/bgp.uts b/test/contrib/bgp.uts
similarity index 100%
rename from scapy/contrib/bgp.uts
rename to test/contrib/bgp.uts
diff --git a/scapy/contrib/bier.uts b/test/contrib/bier.uts
similarity index 92%
rename from scapy/contrib/bier.uts
rename to test/contrib/bier.uts
--- a/scapy/contrib/bier.uts
+++ b/test/contrib/bier.uts
@@ -1,7 +1,7 @@
 # BIER unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('bier')"  -P "load_contrib('mpls')"  -t scapy/contrib/bier.uts
+# $ test/run_tests -P "load_contrib('bier')"  -P "load_contrib('mpls')"  -t test/contrib/bier.uts
 
 + BIER tests
 
diff --git a/scapy/contrib/bp.uts b/test/contrib/bp.uts
similarity index 100%
rename from scapy/contrib/bp.uts
rename to test/contrib/bp.uts
diff --git a/scapy/contrib/cansocket_native.uts b/test/contrib/cansocket_native.uts
similarity index 100%
rename from scapy/contrib/cansocket_native.uts
rename to test/contrib/cansocket_native.uts
diff --git a/scapy/contrib/cansocket_python_can.uts b/test/contrib/cansocket_python_can.uts
similarity index 100%
rename from scapy/contrib/cansocket_python_can.uts
rename to test/contrib/cansocket_python_can.uts
diff --git a/scapy/contrib/carp.uts b/test/contrib/carp.uts
similarity index 100%
rename from scapy/contrib/carp.uts
rename to test/contrib/carp.uts
diff --git a/scapy/contrib/cdp.uts b/test/contrib/cdp.uts
similarity index 100%
rename from scapy/contrib/cdp.uts
rename to test/contrib/cdp.uts
diff --git a/scapy/contrib/chdlc.uts b/test/contrib/chdlc.uts
similarity index 100%
rename from scapy/contrib/chdlc.uts
rename to test/contrib/chdlc.uts
diff --git a/scapy/contrib/coap.uts b/test/contrib/coap.uts
similarity index 100%
rename from scapy/contrib/coap.uts
rename to test/contrib/coap.uts
diff --git a/scapy/contrib/dce_rpc.uts b/test/contrib/dce_rpc.uts
similarity index 100%
rename from scapy/contrib/dce_rpc.uts
rename to test/contrib/dce_rpc.uts
diff --git a/scapy/contrib/diameter.uts b/test/contrib/diameter.uts
similarity index 100%
rename from scapy/contrib/diameter.uts
rename to test/contrib/diameter.uts
diff --git a/scapy/contrib/dtp.uts b/test/contrib/dtp.uts
similarity index 100%
rename from scapy/contrib/dtp.uts
rename to test/contrib/dtp.uts
diff --git a/scapy/contrib/eddystone.uts b/test/contrib/eddystone.uts
similarity index 94%
rename from scapy/contrib/eddystone.uts
rename to test/contrib/eddystone.uts
--- a/scapy/contrib/eddystone.uts
+++ b/test/contrib/eddystone.uts
@@ -1,7 +1,7 @@
 # Eddystone unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('eddystone')" -t scapy/contrib/eddystone.uts
+# $ test/run_tests -P "load_contrib('eddystone')" -t test/contrib/eddystone.uts
 
 + Eddystone tests
 
diff --git a/scapy/contrib/eigrp.uts b/test/contrib/eigrp.uts
similarity index 100%
rename from scapy/contrib/eigrp.uts
rename to test/contrib/eigrp.uts
diff --git a/scapy/contrib/enipTCP.uts b/test/contrib/enipTCP.uts
similarity index 100%
rename from scapy/contrib/enipTCP.uts
rename to test/contrib/enipTCP.uts
diff --git a/scapy/contrib/ethercat.uts b/test/contrib/ethercat.uts
similarity index 98%
rename from scapy/contrib/ethercat.uts
rename to test/contrib/ethercat.uts
--- a/scapy/contrib/ethercat.uts
+++ b/test/contrib/ethercat.uts
@@ -2,7 +2,7 @@
 
 #
 # execute test:
-# $ test/run_tests -P "load_contrib('ethercat')" -t scapy/contrib/ethercat.uts
+# $ test/run_tests -P "load_contrib('ethercat')" -t test/contrib/ethercat.uts
 #
 
 + LEBitFields
diff --git a/scapy/contrib/etherip.uts b/test/contrib/etherip.uts
similarity index 100%
rename from scapy/contrib/etherip.uts
rename to test/contrib/etherip.uts
diff --git a/scapy/contrib/geneve.uts b/test/contrib/geneve.uts
similarity index 97%
rename from scapy/contrib/geneve.uts
rename to test/contrib/geneve.uts
--- a/scapy/contrib/geneve.uts
+++ b/test/contrib/geneve.uts
@@ -1,7 +1,7 @@
 # GENEVE unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('geneve')" -t scapy/contrib/geneve.uts
+# $ test/run_tests -P "load_contrib('geneve')" -t test/contrib/geneve.uts
 
 + GENEVE
 
diff --git a/scapy/contrib/gtp.uts b/test/contrib/gtp.uts
similarity index 99%
rename from scapy/contrib/gtp.uts
rename to test/contrib/gtp.uts
--- a/scapy/contrib/gtp.uts
+++ b/test/contrib/gtp.uts
@@ -1,7 +1,7 @@
 # GTP unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('gtp')" -t scapy/contrib/gtp.uts
+# $ test/run_tests -P "load_contrib('gtp')" -t test/contrib/gtp.uts
 
 + GTPv1
 
diff --git a/scapy/contrib/gtp_v2.uts b/test/contrib/gtp_v2.uts
similarity index 99%
rename from scapy/contrib/gtp_v2.uts
rename to test/contrib/gtp_v2.uts
--- a/scapy/contrib/gtp_v2.uts
+++ b/test/contrib/gtp_v2.uts
@@ -1,7 +1,7 @@
 # GTPv2 unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('gtp_v2')" -t scapy/contrib/gtp_v2.uts
+# $ test/run_tests -P "load_contrib('gtp_v2')" -t test/contrib/gtp_v2.uts
 
 + GTPv2
 
diff --git a/scapy/contrib/homeplugav.uts b/test/contrib/homeplugav.uts
similarity index 100%
rename from scapy/contrib/homeplugav.uts
rename to test/contrib/homeplugav.uts
diff --git a/scapy/contrib/http2.uts b/test/contrib/http2.uts
similarity index 100%
rename from scapy/contrib/http2.uts
rename to test/contrib/http2.uts
diff --git a/scapy/contrib/ibeacon.uts b/test/contrib/ibeacon.uts
similarity index 96%
rename from scapy/contrib/ibeacon.uts
rename to test/contrib/ibeacon.uts
--- a/scapy/contrib/ibeacon.uts
+++ b/test/contrib/ibeacon.uts
@@ -1,7 +1,7 @@
 % iBeacon unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('ibeacon')" -t scapy/contrib/ibeacon.uts
+# $ test/run_tests -P "load_contrib('ibeacon')" -t test/contrib/ibeacon.uts
 
 + iBeacon tests
 
diff --git a/scapy/contrib/iec104.uts b/test/contrib/iec104.uts
similarity index 99%
rename from scapy/contrib/iec104.uts
rename to test/contrib/iec104.uts
--- a/scapy/contrib/iec104.uts
+++ b/test/contrib/iec104.uts
@@ -2,7 +2,7 @@
 
 #
 # execute test:
-# > test/run_tests -t scapy/contrib/iec104.uts
+# > test/run_tests -t test/contrib/iec104.uts
 #
 
 + iec104 infrastructure
diff --git a/scapy/contrib/igmp.uts b/test/contrib/igmp.uts
similarity index 100%
rename from scapy/contrib/igmp.uts
rename to test/contrib/igmp.uts
diff --git a/scapy/contrib/igmpv3.uts b/test/contrib/igmpv3.uts
similarity index 100%
rename from scapy/contrib/igmpv3.uts
rename to test/contrib/igmpv3.uts
diff --git a/scapy/contrib/ikev2.uts b/test/contrib/ikev2.uts
similarity index 100%
rename from scapy/contrib/ikev2.uts
rename to test/contrib/ikev2.uts
diff --git a/scapy/contrib/isis.uts b/test/contrib/isis.uts
similarity index 100%
rename from scapy/contrib/isis.uts
rename to test/contrib/isis.uts
diff --git a/scapy/contrib/isotp.uts b/test/contrib/isotp.uts
similarity index 100%
rename from scapy/contrib/isotp.uts
rename to test/contrib/isotp.uts
diff --git a/scapy/contrib/lacp.uts b/test/contrib/lacp.uts
similarity index 95%
rename from scapy/contrib/lacp.uts
rename to test/contrib/lacp.uts
--- a/scapy/contrib/lacp.uts
+++ b/test/contrib/lacp.uts
@@ -1,7 +1,7 @@
 % LACP unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('lacp')" -t scapy/contrib/lacp.uts
+# $ test/run_tests -P "load_contrib('lacp')" -t test/contrib/lacp.uts
 
 + LACP
 
diff --git a/scapy/contrib/ldp.uts b/test/contrib/ldp.uts
similarity index 100%
rename from scapy/contrib/ldp.uts
rename to test/contrib/ldp.uts
diff --git a/scapy/contrib/lldp.uts b/test/contrib/lldp.uts
similarity index 99%
rename from scapy/contrib/lldp.uts
rename to test/contrib/lldp.uts
--- a/scapy/contrib/lldp.uts
+++ b/test/contrib/lldp.uts
@@ -3,7 +3,7 @@ from enum import test
 
 #
 # execute test:
-# > test/run_tests -P "load_contrib('lldp')" -t scapy/contrib/lldp.uts
+# > test/run_tests -P "load_contrib('lldp')" -t test/contrib/lldp.uts
 #
 
 + Basic layer handling
diff --git a/scapy/contrib/ltp.uts b/test/contrib/ltp.uts
similarity index 100%
rename from scapy/contrib/ltp.uts
rename to test/contrib/ltp.uts
diff --git a/scapy/contrib/mac_control.uts b/test/contrib/mac_control.uts
similarity index 98%
rename from scapy/contrib/mac_control.uts
rename to test/contrib/mac_control.uts
--- a/scapy/contrib/mac_control.uts
+++ b/test/contrib/mac_control.uts
@@ -2,7 +2,7 @@
 
 #
 # execute test:
-# $ test/run_tests -P "load_contrib('mac_control')" -t scapy/contrib/mac_control.uts
+# $ test/run_tests -P "load_contrib('mac_control')" -t test/contrib/mac_control.uts
 #
 
 + Basic layer handling
diff --git a/scapy/contrib/macsec.uts b/test/contrib/macsec.uts
similarity index 99%
rename from scapy/contrib/macsec.uts
rename to test/contrib/macsec.uts
--- a/scapy/contrib/macsec.uts
+++ b/test/contrib/macsec.uts
@@ -1,6 +1,6 @@
 # MACsec unit tests
 # run with:
-#   test/run_tests  -P "load_contrib('macsec')" -t scapy/contrib/macsec.uts -F
+#   test/run_tests  -P "load_contrib('macsec')" -t test/contrib/macsec.uts -F
 
 + MACsec
 ~ crypto not_pypy
diff --git a/scapy/contrib/modbus.uts b/test/contrib/modbus.uts
similarity index 100%
rename from scapy/contrib/modbus.uts
rename to test/contrib/modbus.uts
diff --git a/scapy/contrib/mpls.uts b/test/contrib/mpls.uts
similarity index 93%
rename from scapy/contrib/mpls.uts
rename to test/contrib/mpls.uts
--- a/scapy/contrib/mpls.uts
+++ b/test/contrib/mpls.uts
@@ -1,7 +1,7 @@
 # MPLS unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('mpls')" -t scapy/contrib/mpls.uts
+# $ test/run_tests -P "load_contrib('mpls')" -t test/contrib/mpls.uts
 
 + MPLS
 
diff --git a/scapy/contrib/mqtt.uts b/test/contrib/mqtt.uts
similarity index 97%
rename from scapy/contrib/mqtt.uts
rename to test/contrib/mqtt.uts
--- a/scapy/contrib/mqtt.uts
+++ b/test/contrib/mqtt.uts
@@ -2,7 +2,7 @@
 # Copyright (C) Santiago Hernandez Ramos <shramos@protonmail.com>
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('mqtt')" -t scapy/contrib/mqtt.uts
+# $ test/run_tests -P "load_contrib('mqtt')" -t test/contrib/mqtt.uts
 
 + Syntax check
 = Import the MQTT layer
diff --git a/scapy/contrib/nsh.uts b/test/contrib/nsh.uts
similarity index 100%
rename from scapy/contrib/nsh.uts
rename to test/contrib/nsh.uts
diff --git a/scapy/contrib/opc_da.uts b/test/contrib/opc_da.uts
similarity index 100%
rename from scapy/contrib/opc_da.uts
rename to test/contrib/opc_da.uts
diff --git a/scapy/contrib/openflow.uts b/test/contrib/openflow.uts
similarity index 100%
rename from scapy/contrib/openflow.uts
rename to test/contrib/openflow.uts
diff --git a/scapy/contrib/openflow3.uts b/test/contrib/openflow3.uts
similarity index 100%
rename from scapy/contrib/openflow3.uts
rename to test/contrib/openflow3.uts
diff --git a/scapy/contrib/ospf.uts b/test/contrib/ospf.uts
similarity index 97%
rename from scapy/contrib/ospf.uts
rename to test/contrib/ospf.uts
--- a/scapy/contrib/ospf.uts
+++ b/test/contrib/ospf.uts
@@ -1,7 +1,7 @@
 # OSPF Related regression tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('ospf')" -t scapy/contrib/ospf.uts
+# $ test/run_tests -P "load_contrib('ospf')" -t test/contrib/ospf.uts
 
 + OSPF
 
diff --git a/scapy/contrib/pnio.uts b/test/contrib/pnio.uts
similarity index 100%
rename from scapy/contrib/pnio.uts
rename to test/contrib/pnio.uts
diff --git a/scapy/contrib/pnio_rpc.uts b/test/contrib/pnio_rpc.uts
similarity index 100%
rename from scapy/contrib/pnio_rpc.uts
rename to test/contrib/pnio_rpc.uts
diff --git a/scapy/contrib/ppi_cace.uts b/test/contrib/ppi_cace.uts
similarity index 100%
rename from scapy/contrib/ppi_cace.uts
rename to test/contrib/ppi_cace.uts
diff --git a/scapy/contrib/ppi_geotag.uts b/test/contrib/ppi_geotag.uts
similarity index 100%
rename from scapy/contrib/ppi_geotag.uts
rename to test/contrib/ppi_geotag.uts
diff --git a/scapy/contrib/ripng.uts b/test/contrib/ripng.uts
similarity index 100%
rename from scapy/contrib/ripng.uts
rename to test/contrib/ripng.uts
diff --git a/scapy/contrib/rsvp.uts b/test/contrib/rsvp.uts
similarity index 100%
rename from scapy/contrib/rsvp.uts
rename to test/contrib/rsvp.uts
diff --git a/scapy/contrib/rtr.uts b/test/contrib/rtr.uts
similarity index 100%
rename from scapy/contrib/rtr.uts
rename to test/contrib/rtr.uts
diff --git a/scapy/contrib/sdnv.uts b/test/contrib/sdnv.uts
similarity index 100%
rename from scapy/contrib/sdnv.uts
rename to test/contrib/sdnv.uts
diff --git a/scapy/contrib/sebek.uts b/test/contrib/sebek.uts
similarity index 96%
rename from scapy/contrib/sebek.uts
rename to test/contrib/sebek.uts
--- a/scapy/contrib/sebek.uts
+++ b/test/contrib/sebek.uts
@@ -1,7 +1,7 @@
 # Sebek layer unit tests
 #
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('sebek')" -t scapy/contrib/sebek.uts
+# $ test/run_tests -P "load_contrib('sebek')" -t test/contrib/sebek.uts
 
 + Sebek protocol
 
diff --git a/scapy/contrib/send.uts b/test/contrib/send.uts
similarity index 100%
rename from scapy/contrib/send.uts
rename to test/contrib/send.uts
diff --git a/scapy/contrib/socks.uts b/test/contrib/socks.uts
similarity index 100%
rename from scapy/contrib/socks.uts
rename to test/contrib/socks.uts
diff --git a/scapy/contrib/spbm.uts b/test/contrib/spbm.uts
similarity index 100%
rename from scapy/contrib/spbm.uts
rename to test/contrib/spbm.uts
diff --git a/scapy/contrib/tacacs.uts b/test/contrib/tacacs.uts
similarity index 100%
rename from scapy/contrib/tacacs.uts
rename to test/contrib/tacacs.uts
diff --git a/scapy/contrib/tzsp.uts b/test/contrib/tzsp.uts
similarity index 99%
rename from scapy/contrib/tzsp.uts
rename to test/contrib/tzsp.uts
--- a/scapy/contrib/tzsp.uts
+++ b/test/contrib/tzsp.uts
@@ -2,7 +2,7 @@
 
 #
 # execute test:
-# > test/run_tests -P "load_contrib('tzsp')" -t scapy/contrib/tzsp.uts
+# > test/run_tests -P "load_contrib('tzsp')" -t test/contrib/tzsp.uts
 #
 
 + Basic layer handling
diff --git a/scapy/contrib/wireguard.uts b/test/contrib/wireguard.uts
similarity index 98%
rename from scapy/contrib/wireguard.uts
rename to test/contrib/wireguard.uts
--- a/scapy/contrib/wireguard.uts
+++ b/test/contrib/wireguard.uts
@@ -1,7 +1,7 @@
 % WireGuard tests
 
 # Type the following command to launch start the tests:
-# $ test/run_tests -P "load_contrib('wireguard')" -t scapy/contrib/wireguard.uts
+# $ test/run_tests -P "load_contrib('wireguard')" -t test/contrib/wireguard.uts
 
 + Build packets & dissect