From: Zbigniew Jędrzejewski-Szmek Date: Sat, 2 Sep 2023 13:55:57 +0000 (+0300) Subject: test: shorten sample names, drop numerical prefixes X-Git-Tag: v255-rc1~579^2~1 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=37edb704f9c0a88ec22b3682bc3e9403c2fab842;p=systemd%2F.git test: shorten sample names, drop numerical prefixes We don't care about the ordering, so we may just as well drop the numerical prefixes that we normally use for sorting. Also rename some other samples to keep width of output down to reasonable width. --- diff --git a/test/fuzz/fuzz-manager-serialize/activation-details b/test/fuzz/fuzz-manager-serialize/activation-details new file mode 100644 index 0000000000..735b0e8f8b --- /dev/null +++ b/test/fuzz/fuzz-manager-serialize/activation-details @@ -0,0 +1,6 @@ + +y.service +job +activation-details-unit-type=path +activation-details-unit-name +activation-details-unit-name \ No newline at end of file diff --git a/test/fuzz/fuzz-manager-serialize/activation-details-path b/test/fuzz/fuzz-manager-serialize/activation-details-path deleted file mode 100644 index 735b0e8f8b..0000000000 --- a/test/fuzz/fuzz-manager-serialize/activation-details-path +++ /dev/null @@ -1,6 +0,0 @@ - -y.service -job -activation-details-unit-type=path -activation-details-unit-name -activation-details-unit-name \ No newline at end of file diff --git a/test/fuzz/fuzz-manager-serialize/activation-details-service b/test/fuzz/fuzz-manager-serialize/activation-details-service deleted file mode 100644 index b3f5c9bae3..0000000000 --- a/test/fuzz/fuzz-manager-serialize/activation-details-service +++ /dev/null @@ -1,4 +0,0 @@ - -d.socket -job -activation-details-unit-type=service \ No newline at end of file diff --git a/test/fuzz/fuzz-manager-serialize/bogus-unit-type b/test/fuzz/fuzz-manager-serialize/bogus-unit-type new file mode 100644 index 0000000000..b3f5c9bae3 --- /dev/null +++ b/test/fuzz/fuzz-manager-serialize/bogus-unit-type @@ -0,0 +1,4 @@ + +d.socket +job +activation-details-unit-type=service \ No newline at end of file diff --git a/test/fuzz/fuzz-netdev-parser/11-dummy.netdev b/test/fuzz/fuzz-netdev-parser/11-dummy.netdev deleted file mode 100644 index 6797eb4b09..0000000000 --- a/test/fuzz/fuzz-netdev-parser/11-dummy.netdev +++ /dev/null @@ -1,3 +0,0 @@ -[NetDev] -Name=test1 -Kind=dummy diff --git a/test/fuzz/fuzz-netdev-parser/12-dummy.netdev b/test/fuzz/fuzz-netdev-parser/12-dummy.netdev deleted file mode 100644 index a7fdc0f7e0..0000000000 --- a/test/fuzz/fuzz-netdev-parser/12-dummy.netdev +++ /dev/null @@ -1,3 +0,0 @@ -[NetDev] -Name=dummy98 -Kind=dummy diff --git a/test/fuzz/fuzz-netdev-parser/21-macvlan.netdev b/test/fuzz/fuzz-netdev-parser/21-macvlan.netdev deleted file mode 100644 index e9a3c5b347..0000000000 --- a/test/fuzz/fuzz-netdev-parser/21-macvlan.netdev +++ /dev/null @@ -1,3 +0,0 @@ -[NetDev] -Name=macvlan99 -Kind=macvlan diff --git a/test/fuzz/fuzz-netdev-parser/21-macvtap.netdev b/test/fuzz/fuzz-netdev-parser/21-macvtap.netdev deleted file mode 100644 index 2c23aacfb2..0000000000 --- a/test/fuzz/fuzz-netdev-parser/21-macvtap.netdev +++ /dev/null @@ -1,3 +0,0 @@ -[NetDev] -Name=macvtap99 -Kind=macvtap diff --git a/test/fuzz/fuzz-netdev-parser/21-vlan.netdev b/test/fuzz/fuzz-netdev-parser/21-vlan.netdev deleted file mode 100644 index fe9801c8a2..0000000000 --- a/test/fuzz/fuzz-netdev-parser/21-vlan.netdev +++ /dev/null @@ -1,10 +0,0 @@ -[NetDev] -Name=vlan99 -Kind=vlan - -[VLAN] -Id=99 -GVRP=true -MVRP=true -LooseBinding=true -ReorderHeader=true diff --git a/test/fuzz/fuzz-netdev-parser/25-6rd-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-6rd-tunnel.netdev deleted file mode 100644 index 252abf5278..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-6rd-tunnel.netdev +++ /dev/null @@ -1,8 +0,0 @@ -[NetDev] -Name=6rdtun99 -Kind=sit - -[Tunnel] -Local=10.65.223.238 -Remote=10.65.223.239 -IPv6RapidDeploymentPrefix=2602::/24 diff --git a/test/fuzz/fuzz-netdev-parser/25-bond-backup.netdev b/test/fuzz/fuzz-netdev-parser/25-bond-backup.netdev deleted file mode 100644 index 1bbbf75570..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-bond-backup.netdev +++ /dev/null @@ -1,6 +0,0 @@ -[NetDev] -Name=bond199 -Kind=bond - -[Bond] -Mode=active-backup diff --git a/test/fuzz/fuzz-netdev-parser/25-bond.netdev b/test/fuzz/fuzz-netdev-parser/25-bond.netdev deleted file mode 100644 index 4e4885c44c..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-bond.netdev +++ /dev/null @@ -1,18 +0,0 @@ -[NetDev] -Name=bond99 -Kind=bond - -[Bond] -Mode=802.3ad -TransmitHashPolicy=layer3+4 -MIIMonitorSec=1s -LACPTransmitRate=fast -UpDelaySec=2s -DownDelaySec=2s -ResendIGMP=4 -MinLinks=1 -AdActorSystemPriority=1218 -AdUserPortKey=811 -AdActorSystem=00:11:22:33:44:55 -# feed the sanitizer -AdActorSystem=00:11:22:33:44:55 diff --git a/test/fuzz/fuzz-netdev-parser/25-bridge.netdev b/test/fuzz/fuzz-netdev-parser/25-bridge.netdev deleted file mode 100644 index e23abd5368..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-bridge.netdev +++ /dev/null @@ -1,13 +0,0 @@ -[NetDev] -Name=bridge99 -Kind=bridge - -[Bridge] -HelloTimeSec=9 -MaxAgeSec=9 -ForwardDelaySec=9 -AgeingTimeSec=9 -Priority=9 -MulticastQuerier= true -MulticastSnooping=true -STP=true diff --git a/test/fuzz/fuzz-netdev-parser/25-erspan-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-erspan-tunnel.netdev deleted file mode 100644 index 0fd8b92b2f..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-erspan-tunnel.netdev +++ /dev/null @@ -1,11 +0,0 @@ -[NetDev] -Name=erspan-test -Kind=erspan - -[Tunnel] -Independent=true -ERSPANIndex=123 -Local=172.16.1.200 -Remote=172.16.1.100 -Key=101 -SerializeTunneledPackets=true diff --git a/test/fuzz/fuzz-netdev-parser/25-geneve.netdev b/test/fuzz/fuzz-netdev-parser/25-geneve.netdev deleted file mode 100644 index 279d71324e..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-geneve.netdev +++ /dev/null @@ -1,12 +0,0 @@ -[NetDev] -Name=geneve99 -Kind=geneve - -[GENEVE] -Id=99 -Remote=192.168.22.1 -TTL=1 -UDPChecksum=true -UDP6ZeroChecksumTx=true -UDP6ZeroChecksumRx=true -DestinationPort=6082 diff --git a/test/fuzz/fuzz-netdev-parser/25-gre-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-gre-tunnel.netdev deleted file mode 100644 index 94d9320cdb..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-gre-tunnel.netdev +++ /dev/null @@ -1,7 +0,0 @@ -[NetDev] -Name=gretun99 -Kind=gre - -[Tunnel] -Local=10.65.223.238 -Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-gretap-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-gretap-tunnel.netdev deleted file mode 100644 index 769e7653e4..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-gretap-tunnel.netdev +++ /dev/null @@ -1,7 +0,0 @@ -[NetDev] -Name=gretap99 -Kind=gretap - -[Tunnel] -Local=10.65.223.238 -Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-ip6gre-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-ip6gre-tunnel.netdev deleted file mode 100644 index b16e0b4969..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-ip6gre-tunnel.netdev +++ /dev/null @@ -1,7 +0,0 @@ -[NetDev] -Name=ip6gretap99 -Kind=ip6gretap - -[Tunnel] -Local=2a00:ffde:4567:edde::4987 -Remote=2001:473:fece:cafe::5179 diff --git a/test/fuzz/fuzz-netdev-parser/25-ip6tnl-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-ip6tnl-tunnel.netdev deleted file mode 100644 index 713e685ea1..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-ip6tnl-tunnel.netdev +++ /dev/null @@ -1,8 +0,0 @@ -[NetDev] -Name=ip6tnl99 -Kind=ip6tnl - -[Tunnel] -Mode=ip6ip6 -Local=2a00:ffde:4567:edde::4987 -Remote=2001:473:fece:cafe::5179 diff --git a/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel.netdev deleted file mode 100644 index 159ac72703..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel.netdev +++ /dev/null @@ -1,8 +0,0 @@ -[NetDev] -Name=ipiptun99 -Kind=ipip -MTUBytes=1480 - -[Tunnel] -Local=192.168.223.238 -Remote=192.169.224.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel2.netdev b/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel2.netdev deleted file mode 100644 index 36ff8d9429..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-ipip-tunnel2.netdev +++ /dev/null @@ -1,9 +0,0 @@ -[NetDev] -Name=ipiptun99 -Kind=ipip -MTUBytes=1480 - -[Tunnel] -Local=192.168.223.238 -Remote=192.169.224.239 -Independent=true diff --git a/test/fuzz/fuzz-netdev-parser/25-ipvlan.netdev b/test/fuzz/fuzz-netdev-parser/25-ipvlan.netdev deleted file mode 100644 index 9921b787a1..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-ipvlan.netdev +++ /dev/null @@ -1,6 +0,0 @@ -[NetDev] -Name=ipvlan99 -Kind=ipvlan - -[IPVLAN] -Mode=L2 diff --git a/test/fuzz/fuzz-netdev-parser/25-sit-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-sit-tunnel.netdev deleted file mode 100644 index 406d74bcf0..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-sit-tunnel.netdev +++ /dev/null @@ -1,7 +0,0 @@ -[NetDev] -Name=sittun99 -Kind=sit - -[Tunnel] -Local=10.65.223.238 -Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-tap.netdev b/test/fuzz/fuzz-netdev-parser/25-tap.netdev deleted file mode 100644 index bf5e7fe52c..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-tap.netdev +++ /dev/null @@ -1,7 +0,0 @@ -[NetDev] -Name=tap99 -Kind=tap - -[Tap] -MultiQueue=true -PacketInfo=true diff --git a/test/fuzz/fuzz-netdev-parser/25-tun.netdev b/test/fuzz/fuzz-netdev-parser/25-tun.netdev deleted file mode 100644 index 380ab21552..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-tun.netdev +++ /dev/null @@ -1,7 +0,0 @@ -[NetDev] -Name=tun99 -Kind=tun - -[Tun] -MultiQueue=true -PacketInfo=true diff --git a/test/fuzz/fuzz-netdev-parser/25-vcan.netdev b/test/fuzz/fuzz-netdev-parser/25-vcan.netdev deleted file mode 100644 index ff1979536a..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-vcan.netdev +++ /dev/null @@ -1,3 +0,0 @@ -[NetDev] -Name=vcan99 -Kind=vcan diff --git a/test/fuzz/fuzz-netdev-parser/25-veth.netdev b/test/fuzz/fuzz-netdev-parser/25-veth.netdev deleted file mode 100644 index 9ae4ad53b8..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-veth.netdev +++ /dev/null @@ -1,8 +0,0 @@ -[NetDev] -Name=veth99 -Kind=veth -MACAddress=12:34:56:78:9a:bc - -[Peer] -Name=veth-peer -MACAddress=12:34:56:78:9a:bd diff --git a/test/fuzz/fuzz-netdev-parser/25-vrf.netdev b/test/fuzz/fuzz-netdev-parser/25-vrf.netdev deleted file mode 100644 index bf949ec293..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-vrf.netdev +++ /dev/null @@ -1,6 +0,0 @@ -[NetDev] -Name=vrf99 -Kind=vrf - -[VRF] -TableId=42 diff --git a/test/fuzz/fuzz-netdev-parser/25-vti-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-vti-tunnel.netdev deleted file mode 100644 index cec6259781..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-vti-tunnel.netdev +++ /dev/null @@ -1,7 +0,0 @@ -[NetDev] -Name=vtitun99 -Kind=vti - -[Tunnel] -Local=10.65.223.238 -Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/25-vti6-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/25-vti6-tunnel.netdev deleted file mode 100644 index d150c9ce86..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-vti6-tunnel.netdev +++ /dev/null @@ -1,7 +0,0 @@ -[NetDev] -Name=vti6tun99 -Kind=vti6 - -[Tunnel] -Local=2a00:ffde:4567:edde::4987 -Remote=2001:473:fece:cafe::5179 diff --git a/test/fuzz/fuzz-netdev-parser/25-vxlan.netdev b/test/fuzz/fuzz-netdev-parser/25-vxlan.netdev deleted file mode 100644 index 819a58356f..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-vxlan.netdev +++ /dev/null @@ -1,16 +0,0 @@ -[NetDev] -Name=vxlan99 -Kind=vxlan - -[VXLAN] -Id=999 -L2MissNotification=true -L3MissNotification=true -RouteShortCircuit=true -UDPChecksum=true -UDP6ZeroChecksumTx=true -UDP6ZeroChecksumRx=true -RemoteChecksumTx=true -RemoteChecksumRx=true -GroupPolicyExtension=true -DestinationPort=5555 diff --git a/test/fuzz/fuzz-netdev-parser/25-wireguard.netdev b/test/fuzz/fuzz-netdev-parser/25-wireguard.netdev deleted file mode 100644 index e07d685129..0000000000 --- a/test/fuzz/fuzz-netdev-parser/25-wireguard.netdev +++ /dev/null @@ -1,12 +0,0 @@ -[NetDev] -Name=wg99 -Kind=wireguard - -[WireGuard] -PrivateKey=EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong= -ListenPort=51820 - -[WireGuardPeer] -PublicKey=RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA= -AllowedIPs=fd31:bf08:57cb::/48,192.168.26.0/24 -Endpoint=wireguard.example.com:51820 diff --git a/test/fuzz/fuzz-netdev-parser/26-bridge.netdev b/test/fuzz/fuzz-netdev-parser/26-bridge.netdev deleted file mode 100644 index 9b31e06b5b..0000000000 --- a/test/fuzz/fuzz-netdev-parser/26-bridge.netdev +++ /dev/null @@ -1,3 +0,0 @@ -[NetDev] -Name=bridge99 -Kind=bridge diff --git a/test/fuzz/fuzz-netdev-parser/27-xfrm.netdev b/test/fuzz/fuzz-netdev-parser/27-xfrm.netdev deleted file mode 100644 index cdcb2d22cd..0000000000 --- a/test/fuzz/fuzz-netdev-parser/27-xfrm.netdev +++ /dev/null @@ -1,7 +0,0 @@ -[NetDev] -Name=xfrm99 -Kind=xfrm - -[Xfrm] -InterfaceId=7 -Independent=false diff --git a/test/fuzz/fuzz-netdev-parser/28-batadv.netdev b/test/fuzz/fuzz-netdev-parser/28-batadv.netdev deleted file mode 100644 index 2de6cd29a3..0000000000 --- a/test/fuzz/fuzz-netdev-parser/28-batadv.netdev +++ /dev/null @@ -1,16 +0,0 @@ -[NetDev] -Name=bat0 -Kind=batadv -Description=Batman test - -[BatmanAdvanced] -GatewayMode=server -Aggregation=1 -BridgeLoopAvoidance=1 -DistributedArpTable=1 -Fragmentation=1 -HopPenalty=10 -OriginatorIntervalSec=1 -GatewayBandwidthDown=100K -GatewayBandwidthUp=12K -RoutingAlgorithm=batman-v diff --git a/test/fuzz/fuzz-netdev-parser/6rd-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/6rd-tunnel.netdev new file mode 100644 index 0000000000..252abf5278 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/6rd-tunnel.netdev @@ -0,0 +1,8 @@ +[NetDev] +Name=6rdtun99 +Kind=sit + +[Tunnel] +Local=10.65.223.238 +Remote=10.65.223.239 +IPv6RapidDeploymentPrefix=2602::/24 diff --git a/test/fuzz/fuzz-netdev-parser/batadv.netdev b/test/fuzz/fuzz-netdev-parser/batadv.netdev new file mode 100644 index 0000000000..2de6cd29a3 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/batadv.netdev @@ -0,0 +1,16 @@ +[NetDev] +Name=bat0 +Kind=batadv +Description=Batman test + +[BatmanAdvanced] +GatewayMode=server +Aggregation=1 +BridgeLoopAvoidance=1 +DistributedArpTable=1 +Fragmentation=1 +HopPenalty=10 +OriginatorIntervalSec=1 +GatewayBandwidthDown=100K +GatewayBandwidthUp=12K +RoutingAlgorithm=batman-v diff --git a/test/fuzz/fuzz-netdev-parser/bond-backup.netdev b/test/fuzz/fuzz-netdev-parser/bond-backup.netdev new file mode 100644 index 0000000000..1bbbf75570 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/bond-backup.netdev @@ -0,0 +1,6 @@ +[NetDev] +Name=bond199 +Kind=bond + +[Bond] +Mode=active-backup diff --git a/test/fuzz/fuzz-netdev-parser/bond.netdev b/test/fuzz/fuzz-netdev-parser/bond.netdev new file mode 100644 index 0000000000..4e4885c44c --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/bond.netdev @@ -0,0 +1,18 @@ +[NetDev] +Name=bond99 +Kind=bond + +[Bond] +Mode=802.3ad +TransmitHashPolicy=layer3+4 +MIIMonitorSec=1s +LACPTransmitRate=fast +UpDelaySec=2s +DownDelaySec=2s +ResendIGMP=4 +MinLinks=1 +AdActorSystemPriority=1218 +AdUserPortKey=811 +AdActorSystem=00:11:22:33:44:55 +# feed the sanitizer +AdActorSystem=00:11:22:33:44:55 diff --git a/test/fuzz/fuzz-netdev-parser/bridge-2.netdev b/test/fuzz/fuzz-netdev-parser/bridge-2.netdev new file mode 100644 index 0000000000..9b31e06b5b --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/bridge-2.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=bridge99 +Kind=bridge diff --git a/test/fuzz/fuzz-netdev-parser/bridge.netdev b/test/fuzz/fuzz-netdev-parser/bridge.netdev new file mode 100644 index 0000000000..e23abd5368 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/bridge.netdev @@ -0,0 +1,13 @@ +[NetDev] +Name=bridge99 +Kind=bridge + +[Bridge] +HelloTimeSec=9 +MaxAgeSec=9 +ForwardDelaySec=9 +AgeingTimeSec=9 +Priority=9 +MulticastQuerier= true +MulticastSnooping=true +STP=true diff --git a/test/fuzz/fuzz-netdev-parser/dummy-2.netdev b/test/fuzz/fuzz-netdev-parser/dummy-2.netdev new file mode 100644 index 0000000000..a7fdc0f7e0 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/dummy-2.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=dummy98 +Kind=dummy diff --git a/test/fuzz/fuzz-netdev-parser/dummy.netdev b/test/fuzz/fuzz-netdev-parser/dummy.netdev new file mode 100644 index 0000000000..6797eb4b09 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/dummy.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=test1 +Kind=dummy diff --git a/test/fuzz/fuzz-netdev-parser/erspan-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/erspan-tunnel.netdev new file mode 100644 index 0000000000..0fd8b92b2f --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/erspan-tunnel.netdev @@ -0,0 +1,11 @@ +[NetDev] +Name=erspan-test +Kind=erspan + +[Tunnel] +Independent=true +ERSPANIndex=123 +Local=172.16.1.200 +Remote=172.16.1.100 +Key=101 +SerializeTunneledPackets=true diff --git a/test/fuzz/fuzz-netdev-parser/geneve.netdev b/test/fuzz/fuzz-netdev-parser/geneve.netdev new file mode 100644 index 0000000000..279d71324e --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/geneve.netdev @@ -0,0 +1,12 @@ +[NetDev] +Name=geneve99 +Kind=geneve + +[GENEVE] +Id=99 +Remote=192.168.22.1 +TTL=1 +UDPChecksum=true +UDP6ZeroChecksumTx=true +UDP6ZeroChecksumRx=true +DestinationPort=6082 diff --git a/test/fuzz/fuzz-netdev-parser/gre-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/gre-tunnel.netdev new file mode 100644 index 0000000000..94d9320cdb --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/gre-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=gretun99 +Kind=gre + +[Tunnel] +Local=10.65.223.238 +Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/gretap-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/gretap-tunnel.netdev new file mode 100644 index 0000000000..769e7653e4 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/gretap-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=gretap99 +Kind=gretap + +[Tunnel] +Local=10.65.223.238 +Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/ip6gre-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/ip6gre-tunnel.netdev new file mode 100644 index 0000000000..b16e0b4969 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/ip6gre-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=ip6gretap99 +Kind=ip6gretap + +[Tunnel] +Local=2a00:ffde:4567:edde::4987 +Remote=2001:473:fece:cafe::5179 diff --git a/test/fuzz/fuzz-netdev-parser/ip6tnl-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/ip6tnl-tunnel.netdev new file mode 100644 index 0000000000..713e685ea1 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/ip6tnl-tunnel.netdev @@ -0,0 +1,8 @@ +[NetDev] +Name=ip6tnl99 +Kind=ip6tnl + +[Tunnel] +Mode=ip6ip6 +Local=2a00:ffde:4567:edde::4987 +Remote=2001:473:fece:cafe::5179 diff --git a/test/fuzz/fuzz-netdev-parser/ipip-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/ipip-tunnel.netdev new file mode 100644 index 0000000000..159ac72703 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/ipip-tunnel.netdev @@ -0,0 +1,8 @@ +[NetDev] +Name=ipiptun99 +Kind=ipip +MTUBytes=1480 + +[Tunnel] +Local=192.168.223.238 +Remote=192.169.224.239 diff --git a/test/fuzz/fuzz-netdev-parser/ipip-tunnel2.netdev b/test/fuzz/fuzz-netdev-parser/ipip-tunnel2.netdev new file mode 100644 index 0000000000..36ff8d9429 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/ipip-tunnel2.netdev @@ -0,0 +1,9 @@ +[NetDev] +Name=ipiptun99 +Kind=ipip +MTUBytes=1480 + +[Tunnel] +Local=192.168.223.238 +Remote=192.169.224.239 +Independent=true diff --git a/test/fuzz/fuzz-netdev-parser/ipvlan.netdev b/test/fuzz/fuzz-netdev-parser/ipvlan.netdev new file mode 100644 index 0000000000..9921b787a1 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/ipvlan.netdev @@ -0,0 +1,6 @@ +[NetDev] +Name=ipvlan99 +Kind=ipvlan + +[IPVLAN] +Mode=L2 diff --git a/test/fuzz/fuzz-netdev-parser/macvlan.netdev b/test/fuzz/fuzz-netdev-parser/macvlan.netdev new file mode 100644 index 0000000000..e9a3c5b347 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/macvlan.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=macvlan99 +Kind=macvlan diff --git a/test/fuzz/fuzz-netdev-parser/macvtap.netdev b/test/fuzz/fuzz-netdev-parser/macvtap.netdev new file mode 100644 index 0000000000..2c23aacfb2 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/macvtap.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=macvtap99 +Kind=macvtap diff --git a/test/fuzz/fuzz-netdev-parser/sit-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/sit-tunnel.netdev new file mode 100644 index 0000000000..406d74bcf0 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/sit-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=sittun99 +Kind=sit + +[Tunnel] +Local=10.65.223.238 +Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/tap.netdev b/test/fuzz/fuzz-netdev-parser/tap.netdev new file mode 100644 index 0000000000..bf5e7fe52c --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/tap.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=tap99 +Kind=tap + +[Tap] +MultiQueue=true +PacketInfo=true diff --git a/test/fuzz/fuzz-netdev-parser/tun.netdev b/test/fuzz/fuzz-netdev-parser/tun.netdev new file mode 100644 index 0000000000..380ab21552 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/tun.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=tun99 +Kind=tun + +[Tun] +MultiQueue=true +PacketInfo=true diff --git a/test/fuzz/fuzz-netdev-parser/vcan.netdev b/test/fuzz/fuzz-netdev-parser/vcan.netdev new file mode 100644 index 0000000000..ff1979536a --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/vcan.netdev @@ -0,0 +1,3 @@ +[NetDev] +Name=vcan99 +Kind=vcan diff --git a/test/fuzz/fuzz-netdev-parser/veth.netdev b/test/fuzz/fuzz-netdev-parser/veth.netdev new file mode 100644 index 0000000000..9ae4ad53b8 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/veth.netdev @@ -0,0 +1,8 @@ +[NetDev] +Name=veth99 +Kind=veth +MACAddress=12:34:56:78:9a:bc + +[Peer] +Name=veth-peer +MACAddress=12:34:56:78:9a:bd diff --git a/test/fuzz/fuzz-netdev-parser/vlan.netdev b/test/fuzz/fuzz-netdev-parser/vlan.netdev new file mode 100644 index 0000000000..fe9801c8a2 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/vlan.netdev @@ -0,0 +1,10 @@ +[NetDev] +Name=vlan99 +Kind=vlan + +[VLAN] +Id=99 +GVRP=true +MVRP=true +LooseBinding=true +ReorderHeader=true diff --git a/test/fuzz/fuzz-netdev-parser/vrf.netdev b/test/fuzz/fuzz-netdev-parser/vrf.netdev new file mode 100644 index 0000000000..bf949ec293 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/vrf.netdev @@ -0,0 +1,6 @@ +[NetDev] +Name=vrf99 +Kind=vrf + +[VRF] +TableId=42 diff --git a/test/fuzz/fuzz-netdev-parser/vti-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/vti-tunnel.netdev new file mode 100644 index 0000000000..cec6259781 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/vti-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=vtitun99 +Kind=vti + +[Tunnel] +Local=10.65.223.238 +Remote=10.65.223.239 diff --git a/test/fuzz/fuzz-netdev-parser/vti6-tunnel.netdev b/test/fuzz/fuzz-netdev-parser/vti6-tunnel.netdev new file mode 100644 index 0000000000..d150c9ce86 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/vti6-tunnel.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=vti6tun99 +Kind=vti6 + +[Tunnel] +Local=2a00:ffde:4567:edde::4987 +Remote=2001:473:fece:cafe::5179 diff --git a/test/fuzz/fuzz-netdev-parser/vxlan.netdev b/test/fuzz/fuzz-netdev-parser/vxlan.netdev new file mode 100644 index 0000000000..819a58356f --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/vxlan.netdev @@ -0,0 +1,16 @@ +[NetDev] +Name=vxlan99 +Kind=vxlan + +[VXLAN] +Id=999 +L2MissNotification=true +L3MissNotification=true +RouteShortCircuit=true +UDPChecksum=true +UDP6ZeroChecksumTx=true +UDP6ZeroChecksumRx=true +RemoteChecksumTx=true +RemoteChecksumRx=true +GroupPolicyExtension=true +DestinationPort=5555 diff --git a/test/fuzz/fuzz-netdev-parser/wg-dup-endpoint b/test/fuzz/fuzz-netdev-parser/wg-dup-endpoint new file mode 100644 index 0000000000..adff4c186b --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/wg-dup-endpoint @@ -0,0 +1,6 @@ +[NetDev] +Name=w +Kind=wireguard +[WireGuardPeer] +Endpoint=:0 +Endpoint=:8 \ No newline at end of file diff --git a/test/fuzz/fuzz-netdev-parser/wireguard-duplicated-endpoint b/test/fuzz/fuzz-netdev-parser/wireguard-duplicated-endpoint deleted file mode 100644 index adff4c186b..0000000000 --- a/test/fuzz/fuzz-netdev-parser/wireguard-duplicated-endpoint +++ /dev/null @@ -1,6 +0,0 @@ -[NetDev] -Name=w -Kind=wireguard -[WireGuardPeer] -Endpoint=:0 -Endpoint=:8 \ No newline at end of file diff --git a/test/fuzz/fuzz-netdev-parser/wireguard.netdev b/test/fuzz/fuzz-netdev-parser/wireguard.netdev new file mode 100644 index 0000000000..e07d685129 --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/wireguard.netdev @@ -0,0 +1,12 @@ +[NetDev] +Name=wg99 +Kind=wireguard + +[WireGuard] +PrivateKey=EEGlnEPYJV//kbvvIqxKkQwOiS+UENyPncC4bF46ong= +ListenPort=51820 + +[WireGuardPeer] +PublicKey=RDf+LSpeEre7YEIKaxg+wbpsNV7du+ktR99uBEtIiCA= +AllowedIPs=fd31:bf08:57cb::/48,192.168.26.0/24 +Endpoint=wireguard.example.com:51820 diff --git a/test/fuzz/fuzz-netdev-parser/xfrm.netdev b/test/fuzz/fuzz-netdev-parser/xfrm.netdev new file mode 100644 index 0000000000..cdcb2d22cd --- /dev/null +++ b/test/fuzz/fuzz-netdev-parser/xfrm.netdev @@ -0,0 +1,7 @@ +[NetDev] +Name=xfrm99 +Kind=xfrm + +[Xfrm] +InterfaceId=7 +Independent=false diff --git a/test/fuzz/fuzz-network-parser/21-vlan b/test/fuzz/fuzz-network-parser/21-vlan deleted file mode 100644 index a4fa1decde..0000000000 --- a/test/fuzz/fuzz-network-parser/21-vlan +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Name=test1 - -[Network] -VLAN=vlan99 diff --git a/test/fuzz/fuzz-network-parser/23-active-slave b/test/fuzz/fuzz-network-parser/23-active-slave deleted file mode 100644 index 59a65960e9..0000000000 --- a/test/fuzz/fuzz-network-parser/23-active-slave +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Name=dummy98 - -[Network] -Bond=bond199 -ActiveSlave=true diff --git a/test/fuzz/fuzz-network-parser/23-bond199 b/test/fuzz/fuzz-network-parser/23-bond199 deleted file mode 100644 index 31e5d12f75..0000000000 --- a/test/fuzz/fuzz-network-parser/23-bond199 +++ /dev/null @@ -1,2 +0,0 @@ -[Match] -Name=bond199 diff --git a/test/fuzz/fuzz-network-parser/23-emit-lldp b/test/fuzz/fuzz-network-parser/23-emit-lldp deleted file mode 100644 index de35045388..0000000000 --- a/test/fuzz/fuzz-network-parser/23-emit-lldp +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Name=veth-peer - -[Network] -EmitLLDP=yes diff --git a/test/fuzz/fuzz-network-parser/23-primary-slave b/test/fuzz/fuzz-network-parser/23-primary-slave deleted file mode 100644 index 380ae267a2..0000000000 --- a/test/fuzz/fuzz-network-parser/23-primary-slave +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Name=dummy98 - -[Network] -Bond=bond199 -PrimarySlave=true diff --git a/test/fuzz/fuzz-network-parser/23-test1-bond199 b/test/fuzz/fuzz-network-parser/23-test1-bond199 deleted file mode 100644 index 6e7c28dfe7..0000000000 --- a/test/fuzz/fuzz-network-parser/23-test1-bond199 +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Name=test1 - -[Network] -Bond=bond199 -PrimarySlave=true diff --git a/test/fuzz/fuzz-network-parser/24-lldp b/test/fuzz/fuzz-network-parser/24-lldp deleted file mode 100644 index fbdfb1b672..0000000000 --- a/test/fuzz/fuzz-network-parser/24-lldp +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Name=veth99 - -[Network] -LLDP=yes diff --git a/test/fuzz/fuzz-network-parser/24-search-domain b/test/fuzz/fuzz-network-parser/24-search-domain deleted file mode 100644 index 970b130ab0..0000000000 --- a/test/fuzz/fuzz-network-parser/24-search-domain +++ /dev/null @@ -1,7 +0,0 @@ -[Match] -Name=dummy98 - -[Network] -Address=192.168.42.100 -DNS=192.168.42.1 -Domains= one two three four five six seven eight nine ten diff --git a/test/fuzz/fuzz-network-parser/25-address-link-section b/test/fuzz/fuzz-network-parser/25-address-link-section deleted file mode 100644 index 759e83c325..0000000000 --- a/test/fuzz/fuzz-network-parser/25-address-link-section +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Name=dummy98 - -[Link] -MACAddress=00:01:02:aa:bb:cc diff --git a/test/fuzz/fuzz-network-parser/25-address-section b/test/fuzz/fuzz-network-parser/25-address-section deleted file mode 100644 index d0fae69361..0000000000 --- a/test/fuzz/fuzz-network-parser/25-address-section +++ /dev/null @@ -1,11 +0,0 @@ -[Match] -Name=dummy98 - -[Address] -Address=10.2.3.4/16 -Peer=10.2.3.5/16 -Label=32 - -[Address] -Address=10.6.7.8/16 -Label=33 diff --git a/test/fuzz/fuzz-network-parser/25-address-section-misc b/test/fuzz/fuzz-network-parser/25-address-section-misc deleted file mode 100644 index 3a37d036ce..0000000000 --- a/test/fuzz/fuzz-network-parser/25-address-section-misc +++ /dev/null @@ -1,10 +0,0 @@ -[Match] -Name=dummy98 - -[Address] -Address=10.2.3.4/16 -PreferredLifetime=0 -Scope=link - -[Address] -Address=2001:0db8:0:f101::1/64 diff --git a/test/fuzz/fuzz-network-parser/25-fibrule-port-range b/test/fuzz/fuzz-network-parser/25-fibrule-port-range deleted file mode 100644 index 36646ec0ff..0000000000 --- a/test/fuzz/fuzz-network-parser/25-fibrule-port-range +++ /dev/null @@ -1,11 +0,0 @@ -[Match] -Name=test1 - -[RoutingPolicyRule] -TypeOfService=0x08 -Table=7 -From= 192.168.100.18 -Priority=111 -SourcePort = 1123-1150 -DestinationPort = 3224-3290 -IPProtocol = tcp diff --git a/test/fuzz/fuzz-network-parser/25-link-section-unmanaged b/test/fuzz/fuzz-network-parser/25-link-section-unmanaged deleted file mode 100644 index 4fe4916031..0000000000 --- a/test/fuzz/fuzz-network-parser/25-link-section-unmanaged +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Name=dummy98 - -[Link] -MACAddress=00:01:02:aa:bb:cc -Unmanaged=true diff --git a/test/fuzz/fuzz-network-parser/25-neighbor-section b/test/fuzz/fuzz-network-parser/25-neighbor-section deleted file mode 100644 index dd750dd566..0000000000 --- a/test/fuzz/fuzz-network-parser/25-neighbor-section +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Name=dummy98 - -[Neighbor] -Address=2004:da8:1:0:: -MACAddress=00:00:5e:00:02:00 diff --git a/test/fuzz/fuzz-network-parser/25-route-section b/test/fuzz/fuzz-network-parser/25-route-section deleted file mode 100644 index c9c7a722c5..0000000000 --- a/test/fuzz/fuzz-network-parser/25-route-section +++ /dev/null @@ -1,8 +0,0 @@ -[Match] -Name=dummy98 - -[Network] -Address=192.168.0.15/24 - -[Route] -Gateway=192.168.0.1 diff --git a/test/fuzz/fuzz-network-parser/25-route-tcp-window-settings b/test/fuzz/fuzz-network-parser/25-route-tcp-window-settings deleted file mode 100644 index e77a721740..0000000000 --- a/test/fuzz/fuzz-network-parser/25-route-tcp-window-settings +++ /dev/null @@ -1,10 +0,0 @@ -[Match] -Name=test1 - -[Route] -Destination=192.168.1.1 -InitialCongestionWindow=20 - -[Route] -Destination=192.168.1.2 -InitialAdvertisedReceiveWindow=30 diff --git a/test/fuzz/fuzz-network-parser/25-route-type b/test/fuzz/fuzz-network-parser/25-route-type deleted file mode 100644 index 9a104137de..0000000000 --- a/test/fuzz/fuzz-network-parser/25-route-type +++ /dev/null @@ -1,14 +0,0 @@ -[Match] -Name=dummy98 - -[Route] -Type=blackhole -Destination=202.54.1.2 - -[Route] -Type=unreachable -Destination=202.54.1.3 - -[Route] -Type=prohibit -Destination=202.54.1.4 diff --git a/test/fuzz/fuzz-network-parser/25-sysctl b/test/fuzz/fuzz-network-parser/25-sysctl deleted file mode 100644 index 2452fb7e85..0000000000 --- a/test/fuzz/fuzz-network-parser/25-sysctl +++ /dev/null @@ -1,10 +0,0 @@ -[Match] -Name=dummy98 - -[Network] -IPForward=true -IPv6PrivacyExtensions=true -IPv6DuplicateAddressDetection=3 -IPv6HopLimit=5 -IPv4ProxyARP=true -IPv6ProxyNDP=true diff --git a/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1 b/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1 deleted file mode 100644 index 854ac5f44c..0000000000 --- a/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-1 +++ /dev/null @@ -1,13 +0,0 @@ -[Match] -Name=dummy98 - -[Network] -Bridge=bridge99 - -[Bridge] -Cost=400 -HairPin = true -Isolated = true -FastLeave = true -UnicastFlood = true -MulticastToUnicast = true diff --git a/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2 b/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2 deleted file mode 100644 index 45ec2de999..0000000000 --- a/test/fuzz/fuzz-network-parser/26-bridge-slave-interface-2 +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Name=test1 - -[Network] -Bridge=bridge99 diff --git a/test/fuzz/fuzz-network-parser/27-xfrm b/test/fuzz/fuzz-network-parser/27-xfrm deleted file mode 100644 index fa26c84e53..0000000000 --- a/test/fuzz/fuzz-network-parser/27-xfrm +++ /dev/null @@ -1,5 +0,0 @@ -[Match] -Name=eth0 - -[Network] -Xfrm=xfrm99 diff --git a/test/fuzz/fuzz-network-parser/active-slave b/test/fuzz/fuzz-network-parser/active-slave new file mode 100644 index 0000000000..59a65960e9 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/active-slave @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[Network] +Bond=bond199 +ActiveSlave=true diff --git a/test/fuzz/fuzz-network-parser/address-link-section b/test/fuzz/fuzz-network-parser/address-link-section new file mode 100644 index 0000000000..759e83c325 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/address-link-section @@ -0,0 +1,5 @@ +[Match] +Name=dummy98 + +[Link] +MACAddress=00:01:02:aa:bb:cc diff --git a/test/fuzz/fuzz-network-parser/address-section b/test/fuzz/fuzz-network-parser/address-section new file mode 100644 index 0000000000..d0fae69361 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/address-section @@ -0,0 +1,11 @@ +[Match] +Name=dummy98 + +[Address] +Address=10.2.3.4/16 +Peer=10.2.3.5/16 +Label=32 + +[Address] +Address=10.6.7.8/16 +Label=33 diff --git a/test/fuzz/fuzz-network-parser/address-section-misc b/test/fuzz/fuzz-network-parser/address-section-misc new file mode 100644 index 0000000000..3a37d036ce --- /dev/null +++ b/test/fuzz/fuzz-network-parser/address-section-misc @@ -0,0 +1,10 @@ +[Match] +Name=dummy98 + +[Address] +Address=10.2.3.4/16 +PreferredLifetime=0 +Scope=link + +[Address] +Address=2001:0db8:0:f101::1/64 diff --git a/test/fuzz/fuzz-network-parser/bond199 b/test/fuzz/fuzz-network-parser/bond199 new file mode 100644 index 0000000000..31e5d12f75 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/bond199 @@ -0,0 +1,2 @@ +[Match] +Name=bond199 diff --git a/test/fuzz/fuzz-network-parser/bridge-slave-interface-1 b/test/fuzz/fuzz-network-parser/bridge-slave-interface-1 new file mode 100644 index 0000000000..854ac5f44c --- /dev/null +++ b/test/fuzz/fuzz-network-parser/bridge-slave-interface-1 @@ -0,0 +1,13 @@ +[Match] +Name=dummy98 + +[Network] +Bridge=bridge99 + +[Bridge] +Cost=400 +HairPin = true +Isolated = true +FastLeave = true +UnicastFlood = true +MulticastToUnicast = true diff --git a/test/fuzz/fuzz-network-parser/bridge-slave-interface-2 b/test/fuzz/fuzz-network-parser/bridge-slave-interface-2 new file mode 100644 index 0000000000..45ec2de999 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/bridge-slave-interface-2 @@ -0,0 +1,5 @@ +[Match] +Name=test1 + +[Network] +Bridge=bridge99 diff --git a/test/fuzz/fuzz-network-parser/configure-no-carrier b/test/fuzz/fuzz-network-parser/configure-no-carrier new file mode 100644 index 0000000000..5bd9d7e84a --- /dev/null +++ b/test/fuzz/fuzz-network-parser/configure-no-carrier @@ -0,0 +1,7 @@ +[Match] +Name=test1 + +[Network] +Address=192.168.0.15/24 +Gateway=192.168.0.1 +ConfigureWithoutCarrier=true diff --git a/test/fuzz/fuzz-network-parser/configure-without-carrier b/test/fuzz/fuzz-network-parser/configure-without-carrier deleted file mode 100644 index 5bd9d7e84a..0000000000 --- a/test/fuzz/fuzz-network-parser/configure-without-carrier +++ /dev/null @@ -1,7 +0,0 @@ -[Match] -Name=test1 - -[Network] -Address=192.168.0.15/24 -Gateway=192.168.0.1 -ConfigureWithoutCarrier=true diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-timezone-router b/test/fuzz/fuzz-network-parser/dhcp-client-timezone-router deleted file mode 100644 index 6316f9cf59..0000000000 --- a/test/fuzz/fuzz-network-parser/dhcp-client-timezone-router +++ /dev/null @@ -1,8 +0,0 @@ -[Match] -Name=veth99 - -[Network] -IPv6AcceptRA=false -DHCP=ipv4 -UseRoutes=true -UseTimezone=true diff --git a/test/fuzz/fuzz-network-parser/dhcp-client-tz-router b/test/fuzz/fuzz-network-parser/dhcp-client-tz-router new file mode 100644 index 0000000000..6316f9cf59 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-client-tz-router @@ -0,0 +1,8 @@ +[Match] +Name=veth99 + +[Network] +IPv6AcceptRA=false +DHCP=ipv4 +UseRoutes=true +UseTimezone=true diff --git a/test/fuzz/fuzz-network-parser/dhcp-server-timezone-router b/test/fuzz/fuzz-network-parser/dhcp-server-timezone-router deleted file mode 100644 index 3ebbf05d3e..0000000000 --- a/test/fuzz/fuzz-network-parser/dhcp-server-timezone-router +++ /dev/null @@ -1,13 +0,0 @@ -[Match] -Name=veth-peer - -[Network] -IPv6AcceptRA=false -Address=192.168.5.1/24 -DHCPServer=yes - -[DHCPServer] -PoolOffset=10 -PoolSize=50 -EmitRouter=yes -Timezone=Europe/Berlin diff --git a/test/fuzz/fuzz-network-parser/dhcp-server-tz-router b/test/fuzz/fuzz-network-parser/dhcp-server-tz-router new file mode 100644 index 0000000000..3ebbf05d3e --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcp-server-tz-router @@ -0,0 +1,13 @@ +[Match] +Name=veth-peer + +[Network] +IPv6AcceptRA=false +Address=192.168.5.1/24 +DHCPServer=yes + +[DHCPServer] +PoolOffset=10 +PoolSize=50 +EmitRouter=yes +Timezone=Europe/Berlin diff --git a/test/fuzz/fuzz-network-parser/dhcpv6-client-rapid-commit b/test/fuzz/fuzz-network-parser/dhcpv6-client-rapid-commit deleted file mode 100644 index 52fa58729e..0000000000 --- a/test/fuzz/fuzz-network-parser/dhcpv6-client-rapid-commit +++ /dev/null @@ -1,8 +0,0 @@ -[Match] -Name=veth99 - -[Network] -DHCP=ipv6 - -[DHCP] -RapidCommit=false diff --git a/test/fuzz/fuzz-network-parser/dhcpv6-rapid-commit b/test/fuzz/fuzz-network-parser/dhcpv6-rapid-commit new file mode 100644 index 0000000000..52fa58729e --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dhcpv6-rapid-commit @@ -0,0 +1,8 @@ +[Match] +Name=veth99 + +[Network] +DHCP=ipv6 + +[DHCP] +RapidCommit=false diff --git a/test/fuzz/fuzz-network-parser/dns-trust-anchor-duplicate b/test/fuzz/fuzz-network-parser/dns-trust-anchor-duplicate deleted file mode 100644 index ed7bdabfd1..0000000000 --- a/test/fuzz/fuzz-network-parser/dns-trust-anchor-duplicate +++ /dev/null @@ -1,2 +0,0 @@ -[Network] -DNSSECNegativeTrustAnchors=i i \ No newline at end of file diff --git a/test/fuzz/fuzz-network-parser/dns-trust-dup-anchor b/test/fuzz/fuzz-network-parser/dns-trust-dup-anchor new file mode 100644 index 0000000000..ed7bdabfd1 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/dns-trust-dup-anchor @@ -0,0 +1,2 @@ +[Network] +DNSSECNegativeTrustAnchors=i i \ No newline at end of file diff --git a/test/fuzz/fuzz-network-parser/emit-lldp b/test/fuzz/fuzz-network-parser/emit-lldp new file mode 100644 index 0000000000..de35045388 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/emit-lldp @@ -0,0 +1,5 @@ +[Match] +Name=veth-peer + +[Network] +EmitLLDP=yes diff --git a/test/fuzz/fuzz-network-parser/fibrule-port-range b/test/fuzz/fuzz-network-parser/fibrule-port-range new file mode 100644 index 0000000000..36646ec0ff --- /dev/null +++ b/test/fuzz/fuzz-network-parser/fibrule-port-range @@ -0,0 +1,11 @@ +[Match] +Name=test1 + +[RoutingPolicyRule] +TypeOfService=0x08 +Table=7 +From= 192.168.100.18 +Priority=111 +SourcePort = 1123-1150 +DestinationPort = 3224-3290 +IPProtocol = tcp diff --git a/test/fuzz/fuzz-network-parser/ipv6-address-label b/test/fuzz/fuzz-network-parser/ipv6-address-label new file mode 100644 index 0000000000..945b7dcc45 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/ipv6-address-label @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[IPv6AddressLabel] +Label=4444 +Prefix=2004:da8:1:0::/64 diff --git a/test/fuzz/fuzz-network-parser/ipv6-address-label-section b/test/fuzz/fuzz-network-parser/ipv6-address-label-section deleted file mode 100644 index 945b7dcc45..0000000000 --- a/test/fuzz/fuzz-network-parser/ipv6-address-label-section +++ /dev/null @@ -1,6 +0,0 @@ -[Match] -Name=dummy98 - -[IPv6AddressLabel] -Label=4444 -Prefix=2004:da8:1:0::/64 diff --git a/test/fuzz/fuzz-network-parser/link-section-unmanaged b/test/fuzz/fuzz-network-parser/link-section-unmanaged new file mode 100644 index 0000000000..4fe4916031 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/link-section-unmanaged @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[Link] +MACAddress=00:01:02:aa:bb:cc +Unmanaged=true diff --git a/test/fuzz/fuzz-network-parser/lldp b/test/fuzz/fuzz-network-parser/lldp new file mode 100644 index 0000000000..fbdfb1b672 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/lldp @@ -0,0 +1,5 @@ +[Match] +Name=veth99 + +[Network] +LLDP=yes diff --git a/test/fuzz/fuzz-network-parser/neighbor-section b/test/fuzz/fuzz-network-parser/neighbor-section new file mode 100644 index 0000000000..dd750dd566 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/neighbor-section @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[Neighbor] +Address=2004:da8:1:0:: +MACAddress=00:00:5e:00:02:00 diff --git a/test/fuzz/fuzz-network-parser/primary-slave b/test/fuzz/fuzz-network-parser/primary-slave new file mode 100644 index 0000000000..380ae267a2 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/primary-slave @@ -0,0 +1,6 @@ +[Match] +Name=dummy98 + +[Network] +Bond=bond199 +PrimarySlave=true diff --git a/test/fuzz/fuzz-network-parser/route-section b/test/fuzz/fuzz-network-parser/route-section new file mode 100644 index 0000000000..c9c7a722c5 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/route-section @@ -0,0 +1,8 @@ +[Match] +Name=dummy98 + +[Network] +Address=192.168.0.15/24 + +[Route] +Gateway=192.168.0.1 diff --git a/test/fuzz/fuzz-network-parser/route-type b/test/fuzz/fuzz-network-parser/route-type new file mode 100644 index 0000000000..9a104137de --- /dev/null +++ b/test/fuzz/fuzz-network-parser/route-type @@ -0,0 +1,14 @@ +[Match] +Name=dummy98 + +[Route] +Type=blackhole +Destination=202.54.1.2 + +[Route] +Type=unreachable +Destination=202.54.1.3 + +[Route] +Type=prohibit +Destination=202.54.1.4 diff --git a/test/fuzz/fuzz-network-parser/search-domain b/test/fuzz/fuzz-network-parser/search-domain new file mode 100644 index 0000000000..970b130ab0 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/search-domain @@ -0,0 +1,7 @@ +[Match] +Name=dummy98 + +[Network] +Address=192.168.42.100 +DNS=192.168.42.1 +Domains= one two three four five six seven eight nine ten diff --git a/test/fuzz/fuzz-network-parser/sysctl b/test/fuzz/fuzz-network-parser/sysctl new file mode 100644 index 0000000000..2452fb7e85 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/sysctl @@ -0,0 +1,10 @@ +[Match] +Name=dummy98 + +[Network] +IPForward=true +IPv6PrivacyExtensions=true +IPv6DuplicateAddressDetection=3 +IPv6HopLimit=5 +IPv4ProxyARP=true +IPv6ProxyNDP=true diff --git a/test/fuzz/fuzz-network-parser/tcp-window-settings b/test/fuzz/fuzz-network-parser/tcp-window-settings new file mode 100644 index 0000000000..e77a721740 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/tcp-window-settings @@ -0,0 +1,10 @@ +[Match] +Name=test1 + +[Route] +Destination=192.168.1.1 +InitialCongestionWindow=20 + +[Route] +Destination=192.168.1.2 +InitialAdvertisedReceiveWindow=30 diff --git a/test/fuzz/fuzz-network-parser/test1-bond199 b/test/fuzz/fuzz-network-parser/test1-bond199 new file mode 100644 index 0000000000..6e7c28dfe7 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/test1-bond199 @@ -0,0 +1,6 @@ +[Match] +Name=test1 + +[Network] +Bond=bond199 +PrimarySlave=true diff --git a/test/fuzz/fuzz-network-parser/vlan b/test/fuzz/fuzz-network-parser/vlan new file mode 100644 index 0000000000..a4fa1decde --- /dev/null +++ b/test/fuzz/fuzz-network-parser/vlan @@ -0,0 +1,5 @@ +[Match] +Name=test1 + +[Network] +VLAN=vlan99 diff --git a/test/fuzz/fuzz-network-parser/xfrm b/test/fuzz/fuzz-network-parser/xfrm new file mode 100644 index 0000000000..fa26c84e53 --- /dev/null +++ b/test/fuzz/fuzz-network-parser/xfrm @@ -0,0 +1,5 @@ +[Match] +Name=eth0 + +[Network] +Xfrm=xfrm99 diff --git a/test/fuzz/fuzz-resource-record/crash-type-bitmap-to-json b/test/fuzz/fuzz-resource-record/crash-type-bitmap-to-json deleted file mode 100644 index a7d5b430dd..0000000000 Binary files a/test/fuzz/fuzz-resource-record/crash-type-bitmap-to-json and /dev/null differ diff --git a/test/fuzz/fuzz-resource-record/just-slash b/test/fuzz/fuzz-resource-record/just-slash new file mode 100644 index 0000000000..a7d5b430dd Binary files /dev/null and b/test/fuzz/fuzz-resource-record/just-slash differ diff --git a/test/fuzz/fuzz-udev-rules/50-udev-default.rules b/test/fuzz/fuzz-udev-rules/50-udev-default.rules deleted file mode 100644 index 8e06c13388..0000000000 --- a/test/fuzz/fuzz-udev-rules/50-udev-default.rules +++ /dev/null @@ -1,86 +0,0 @@ -# do not edit this file, it will be overwritten on update - -# run a command on remove events -ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" -ACTION=="remove", GOTO="default_end" - -SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" - -# select "system RTC" or just use the first one -SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc" -SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100" - -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" -ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}" - -ACTION!="add", GOTO="default_end" - -SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666" -SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666" -SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620" -SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620" -SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620" -SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620" -SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty" -KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" - -SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" - -SUBSYSTEM=="input", GROUP="input" -SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0664" - -SUBSYSTEM=="video4linux", GROUP="video" -SUBSYSTEM=="graphics", GROUP="video" -SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video" -SUBSYSTEM=="dvb", GROUP="video" -SUBSYSTEM=="media", GROUP="video" -SUBSYSTEM=="cec", GROUP="video" - -SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="0666" -SUBSYSTEM=="kfd", GROUP="render", MODE="0666" - -SUBSYSTEM=="sound", GROUP="audio", \ - OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer" - -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664" - -SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", GROUP="video" -SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", GROUP="video" -SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video" -SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video" - -KERNEL=="parport[0-9]*", GROUP="lp" -SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" -SUBSYSTEM=="ppdev", GROUP="lp" -KERNEL=="lp[0-9]*", GROUP="lp" -KERNEL=="irlpt[0-9]*", GROUP="lp" -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp" - -SUBSYSTEM=="block", GROUP="disk" -SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom" -SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" -KERNEL=="sch[0-9]*", GROUP="cdrom" -KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" -KERNEL=="pktcdvd", GROUP="cdrom" - -SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape" -SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk" -KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" -KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control" -KERNEL=="btrfs-control", GROUP="disk" -KERNEL=="rawctl", GROUP="disk" -SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", GROUP="disk" -SUBSYSTEM=="aoe", GROUP="disk", MODE="0220" -SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" - -KERNEL=="rfkill", MODE="0664" -KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun" - -KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse" - -# The static_node is required on s390x and ppc (they are using MODULE_ALIAS) -KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm" - -SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm" - -LABEL="default_end" diff --git a/test/fuzz/fuzz-udev-rules/60-block.rules b/test/fuzz/fuzz-udev-rules/60-block.rules deleted file mode 100644 index 343fc06f85..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-block.rules +++ /dev/null @@ -1,11 +0,0 @@ -# do not edit this file, it will be overwritten on update - -# enable in-kernel media-presence polling -ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_poll_msecs}=="0", \ - ATTR{parameters/events_dfl_poll_msecs}="2000" - -# forward scsi device event to corresponding block device -ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" - -# watch metadata changes, caused by tools closing the device node which was opened for writing -ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*", OPTIONS+="watch" diff --git a/test/fuzz/fuzz-udev-rules/60-cdrom_id.rules b/test/fuzz/fuzz-udev-rules/60-cdrom_id.rules deleted file mode 100644 index 288f8ce2f9..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-cdrom_id.rules +++ /dev/null @@ -1,29 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="cdrom_end" -SUBSYSTEM!="block", GOTO="cdrom_end" -KERNEL!="sr[0-9]*|vdisk*|xvd*", GOTO="cdrom_end" -ENV{DEVTYPE}!="disk", GOTO="cdrom_end" - -# unconditionally tag device as CDROM -KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1" - -# stop automatically any mount units bound to the device if the media eject -# button is pressed. -ENV{ID_CDROM}=="1", ENV{SYSTEMD_MOUNT_DEVICE_BOUND}="1" - -# media eject button pressed -ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end" - -# import device and media properties and lock tray to -# enable the receiving of media eject button events -IMPORT{program}="cdrom_id --lock-media $devnode" - -# ejecting a CD does not remove the device node, so mark the systemd device -# unit as inactive while there is no medium; this automatically cleans up of -# stale mounts after ejecting -ENV{DISK_MEDIA_CHANGE}=="?*", ENV{ID_CDROM_MEDIA}!="?*", ENV{SYSTEMD_READY}="0" - -KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100" - -LABEL="cdrom_end" diff --git a/test/fuzz/fuzz-udev-rules/60-drm.rules b/test/fuzz/fuzz-udev-rules/60-drm.rules deleted file mode 100644 index f7f3435d50..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-drm.rules +++ /dev/null @@ -1,8 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id" - -# by-path -ENV{ID_PATH}=="?*", KERNEL=="card*", SYMLINK+="dri/by-path/$env{ID_PATH}-card" -ENV{ID_PATH}=="?*", KERNEL=="controlD*", SYMLINK+="dri/by-path/$env{ID_PATH}-control" -ENV{ID_PATH}=="?*", KERNEL=="renderD*", SYMLINK+="dri/by-path/$env{ID_PATH}-render" diff --git a/test/fuzz/fuzz-udev-rules/60-evdev.rules b/test/fuzz/fuzz-udev-rules/60-evdev.rules deleted file mode 100644 index e5e608acd3..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-evdev.rules +++ /dev/null @@ -1,23 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="evdev_end" -KERNEL!="event*", GOTO="evdev_end" - -# skip later rules when we find something for this input device -IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=evdev:", \ - RUN{builtin}+="keyboard", GOTO="evdev_end" - -# AT keyboard matching by the machine's DMI data -DRIVERS=="atkbd", \ - IMPORT{builtin}="hwdb 'evdev:atkbd:$attr{[dmi/id]modalias}'", \ - RUN{builtin}+="keyboard", GOTO="evdev_end" - -# device matching the input device name + properties + the machine's DMI data -KERNELS=="input*", IMPORT{builtin}="hwdb 'evdev:name:$attr{name}:phys:$attr{phys}:ev:$attr{capabilities/ev}:$attr{[dmi/id]modalias}'", \ - RUN{builtin}+="keyboard", GOTO="evdev_end" - -# device matching the input device name and the machine's DMI data -KERNELS=="input*", IMPORT{builtin}="hwdb 'evdev:name:$attr{name}:$attr{[dmi/id]modalias}'", \ - RUN{builtin}+="keyboard", GOTO="evdev_end" - -LABEL="evdev_end" diff --git a/test/fuzz/fuzz-udev-rules/60-input-id.rules b/test/fuzz/fuzz-udev-rules/60-input-id.rules deleted file mode 100644 index bb8a812d1b..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-input-id.rules +++ /dev/null @@ -1,8 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="id_input_end" - -SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id" -SUBSYSTEM=="input", IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=id-input:modalias:" - -LABEL="id_input_end" diff --git a/test/fuzz/fuzz-udev-rules/60-persistent-alsa.rules b/test/fuzz/fuzz-udev-rules/60-persistent-alsa.rules deleted file mode 100644 index 8154e2dbb5..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-persistent-alsa.rules +++ /dev/null @@ -1,14 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="persistent_alsa_end" -SUBSYSTEM!="sound", GOTO="persistent_alsa_end" -KERNEL!="controlC[0-9]*", GOTO="persistent_alsa_end" - -SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{builtin}="usb_id" -ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", SYMLINK+="snd/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}" -ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", SYMLINK+="snd/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - -IMPORT{builtin}="path_id" -ENV{ID_PATH}=="?*", SYMLINK+="snd/by-path/$env{ID_PATH}" - -LABEL="persistent_alsa_end" diff --git a/test/fuzz/fuzz-udev-rules/60-persistent-input.rules b/test/fuzz/fuzz-udev-rules/60-persistent-input.rules deleted file mode 100644 index 255547d906..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-persistent-input.rules +++ /dev/null @@ -1,42 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="persistent_input_end" -SUBSYSTEM!="input", GOTO="persistent_input_end" -SUBSYSTEMS=="bluetooth", ENV{ID_BUS}="bluetooth", GOTO="persistent_input_end" -# Bluetooth devices don't always have the bluetooth subsystem -ATTRS{id/bustype}=="0005", ENV{ID_BUS}="bluetooth", GOTO="persistent_input_end" -SUBSYSTEMS=="rmi4", ENV{ID_BUS}="rmi" -SUBSYSTEMS=="serio", ENV{ID_BUS}="i8042" - -SUBSYSTEMS=="usb", ENV{ID_BUS}=="", IMPORT{builtin}="usb_id" - -# determine class name for persistent symlinks -ENV{ID_INPUT_KEYBOARD}=="?*", ENV{.INPUT_CLASS}="kbd" -ENV{ID_INPUT_MOUSE}=="?*", ENV{.INPUT_CLASS}="mouse" -ENV{ID_INPUT_TOUCHPAD}=="?*", ENV{.INPUT_CLASS}="mouse" -ENV{ID_INPUT_TABLET}=="?*", ENV{.INPUT_CLASS}="mouse" -ENV{ID_INPUT_JOYSTICK}=="?*", ENV{.INPUT_CLASS}="joystick" -DRIVERS=="pcspkr", ENV{.INPUT_CLASS}="spkr" -ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{.INPUT_CLASS}="ir" - -# fill empty serial number -ENV{.INPUT_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" - -# by-id links -KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="|00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{.INPUT_CLASS}" -KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-$env{.INPUT_CLASS}" -KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="|00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{.INPUT_CLASS}" -KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-event-$env{.INPUT_CLASS}" -# allow empty class for USB devices, by appending the interface number -SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", ATTRS{bInterfaceNumber}=="?*", \ - SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-if$attr{bInterfaceNumber}" - -# by-path -SUBSYSTEMS=="pci|usb|platform|acpi", IMPORT{builtin}="path_id" -ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{.INPUT_CLASS}" -ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{.INPUT_CLASS}" -# allow empty class for platform and usb devices; platform supports only a single interface that way -SUBSYSTEMS=="usb|platform", ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", \ - SYMLINK+="input/by-path/$env{ID_PATH}-event" - -LABEL="persistent_input_end" diff --git a/test/fuzz/fuzz-udev-rules/60-persistent-storage-tape.rules b/test/fuzz/fuzz-udev-rules/60-persistent-storage-tape.rules deleted file mode 100644 index 40d6261c6e..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-persistent-storage-tape.rules +++ /dev/null @@ -1,36 +0,0 @@ -# do not edit this file, it will be overwritten on update - -# persistent storage links: /dev/tape/{by-id,by-path} - -ACTION=="remove", GOTO="persistent_storage_tape_end" -ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_tape_end" - -# type 8 devices are "Medium Changers" -SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --sg-version=3 --export --allowlisted -d $devnode", \ - SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}" - -# iSCSI devices from the same host have all the same ID_SERIAL, -# but additionally a property named ID_SCSI_SERIAL. -SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SCSI_SERIAL}=="?*", \ - SYMLINK+="tape/by-id/scsi-$env{ID_SCSI_SERIAL}" - -SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{builtin}="path_id", \ - SYMLINK+="tape/by-path/$env{ID_PATH}-changer" - -SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end" - -KERNEL=="st*[0-9]|nst*[0-9]", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" -KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id" -KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", KERNELS=="[0-9]*:*[0-9]", ENV{.BSG_DEV}="$root/bsg/$id" -KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --allowlisted --export --device=$env{.BSG_DEV}", ENV{ID_BUS}="scsi" -KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -KERNEL=="st*[0-9]", ENV{ID_SCSI_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SCSI_SERIAL}" -KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" -KERNEL=="nst*[0-9]", ENV{ID_SCSI_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SCSI_SERIAL}-nst" - -# by-path (parent device path) -KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{builtin}="path_id" -KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" -KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst" - -LABEL="persistent_storage_tape_end" diff --git a/test/fuzz/fuzz-udev-rules/60-persistent-storage.rules b/test/fuzz/fuzz-udev-rules/60-persistent-storage.rules deleted file mode 100644 index b63225875b..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-persistent-storage.rules +++ /dev/null @@ -1,106 +0,0 @@ -# do not edit this file, it will be overwritten on update - -# persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} -# scheme based on "Linux persistent device names", 2004, Hannes Reinecke - -ACTION=="remove", GOTO="persistent_storage_end" -ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end" - -SUBSYSTEM!="block", GOTO="persistent_storage_end" -KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end" - -# ignore partitions that span the entire disk -TEST=="whole_disk", GOTO="persistent_storage_end" - -# for partitions import parent information -ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*" - -# NVMe -KERNEL=="nvme*[0-9]n*[0-9]", ATTR{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}" -KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}-part%n" - -KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{serial}=="?*", ENV{ID_SERIAL_SHORT}="$attr{serial}" -KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{wwid}=="?*", ENV{ID_WWN}="$attr{wwid}" -KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{model}=="?*", ENV{ID_MODEL}="$attr{model}" -KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{firmware_rev}=="?*", ENV{ID_REVISION}="$attr{firmware_rev}" -KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", \ - ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}" - -KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{serial}=="?*", ENV{ID_SERIAL_SHORT}="$attr{serial}" -KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{model}=="?*", ENV{ID_MODEL}="$attr{model}" -KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{firmware_rev}=="?*", ENV{ID_REVISION}="$attr{firmware_rev}" -KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", \ - ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}-part%n" - -# virtio-blk -KERNEL=="vd*[!0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}" -KERNEL=="vd*[0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}-part%n" - -# ATA -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", IMPORT{program}="ata_id --export $devnode" - -# ATAPI devices (SPC-3 or later) -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", ATTRS{scsi_level}=="[6-9]*", IMPORT{program}="ata_id --export $devnode" - -# Run ata_id on non-removable USB Mass Storage (SATA/PATA disks in enclosures) -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", ATTR{removable}=="0", SUBSYSTEMS=="usb", IMPORT{program}="ata_id --export $devnode" - -# Fall back usb_id for USB devices -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id" - -# SCSI devices -KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --allowlisted -d $devnode", ENV{ID_BUS}="scsi" -KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --allowlisted -d $devnode", ENV{ID_BUS}="cciss" -KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" - -# PMEM devices -KERNEL=="pmem*", ENV{DEVTYPE}=="disk", ATTRS{uuid}=="?*", SYMLINK+="disk/by-id/pmem-$attr{uuid}" - -# FireWire -KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" -KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" - -# MMC -KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ATTRS{name}=="?*", ATTRS{serial}=="?*", \ - ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}" -KERNEL=="mmcblk[0-9]p[0-9]*", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n" - -# Memstick -KERNEL=="msblk[0-9]|mspblk[0-9]", SUBSYSTEMS=="memstick", ATTRS{name}=="?*", ATTRS{serial}=="?*", \ - ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}" -KERNEL=="msblk[0-9]p[0-9]|mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}-part%n" - -# by-path -ENV{DEVTYPE}=="disk", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id" -KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-boot%n" -KERNEL!="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" -ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" - -# legacy virtio-pci by-path links (deprecated) -KERNEL=="vd*[!0-9]", ENV{ID_PATH}=="pci-*", SYMLINK+="disk/by-path/virtio-$env{ID_PATH}" -KERNEL=="vd*[0-9]", ENV{ID_PATH}=="pci-*", SYMLINK+="disk/by-path/virtio-$env{ID_PATH}-part%n" - -# probe filesystem metadata of optical drives which have a media inserted -KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \ - IMPORT{builtin}="blkid --hint=session_offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}" -# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET -KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \ - IMPORT{builtin}="blkid --noraid" - -# probe filesystem metadata of disks -KERNEL!="sr*", IMPORT{builtin}="blkid" - -# by-label/by-uuid links (filesystem metadata) -ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" -ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" - -# by-id (World Wide Name) -ENV{DEVTYPE}=="disk", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}" -ENV{DEVTYPE}=="partition", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}-part%n" - -# by-partlabel/by-partuuid links (partition metadata) -ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}" -ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/by-partlabel/$env{ID_PART_ENTRY_NAME}" - -LABEL="persistent_storage_end" diff --git a/test/fuzz/fuzz-udev-rules/60-persistent-v4l.rules b/test/fuzz/fuzz-udev-rules/60-persistent-v4l.rules deleted file mode 100644 index 93c5ee8c27..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-persistent-v4l.rules +++ /dev/null @@ -1,20 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="persistent_v4l_end" -SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end" -ENV{MAJOR}=="", GOTO="persistent_v4l_end" - -IMPORT{program}="v4l_id $devnode" - -SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id" -KERNEL=="video*", ENV{ID_SERIAL}=="?*", SYMLINK+="v4l/by-id/$env{ID_BUS}-$env{ID_SERIAL}-video-index$attr{index}" - -# check for valid "index" number -TEST!="index", GOTO="persistent_v4l_end" -ATTR{index}!="?*", GOTO="persistent_v4l_end" - -IMPORT{builtin}="path_id" -ENV{ID_PATH}=="?*", KERNEL=="video*|vbi*", SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}" -ENV{ID_PATH}=="?*", KERNEL=="audio*", SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}" - -LABEL="persistent_v4l_end" diff --git a/test/fuzz/fuzz-udev-rules/60-sensor.rules b/test/fuzz/fuzz-udev-rules/60-sensor.rules deleted file mode 100644 index 7ad2c36be3..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-sensor.rules +++ /dev/null @@ -1,18 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="sensor_end" - -# device matching the sensor's name and the machine's DMI data for IIO devices -SUBSYSTEM=="iio", KERNEL=="iio*", SUBSYSTEMS=="usb|i2c", \ - IMPORT{builtin}="hwdb 'sensor:modalias:$attr{modalias}:$attr{[dmi/id]modalias}'", \ - GOTO="sensor_end" - -SUBSYSTEM=="input", ENV{ID_INPUT_ACCELEROMETER}=="1", SUBSYSTEMS=="acpi", \ - IMPORT{builtin}="hwdb 'sensor:modalias:acpi:$attr{hid}:$attr{[dmi/id]modalias}'", \ - GOTO="sensor_end" - -SUBSYSTEM=="input", ENV{ID_INPUT_ACCELEROMETER}=="1", SUBSYSTEMS=="platform", \ - IMPORT{builtin}="hwdb 'sensor:modalias:platform:$id:$attr{[dmi/id]modalias}'", \ - GOTO="sensor_end" - -LABEL="sensor_end" diff --git a/test/fuzz/fuzz-udev-rules/60-serial.rules b/test/fuzz/fuzz-udev-rules/60-serial.rules deleted file mode 100644 index f303e27fd5..0000000000 --- a/test/fuzz/fuzz-udev-rules/60-serial.rules +++ /dev/null @@ -1,26 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="serial_end" -SUBSYSTEM!="tty", GOTO="serial_end" - -SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}" -SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci" -SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" - -# /dev/serial/by-path/, /dev/serial/by-id/ for USB devices -KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end" - -SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}" - -IMPORT{builtin}="path_id" -ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", SYMLINK+="serial/by-path/$env{ID_PATH}" -ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-path/$env{ID_PATH}-port$env{.ID_PORT}" - -IMPORT{builtin}="usb_id" -ENV{ID_SERIAL}=="", GOTO="serial_end" -SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}" -ENV{ID_USB_INTERFACE_NUM}=="", GOTO="serial_end" -ENV{.ID_PORT}=="", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}" -ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}-port$env{.ID_PORT}" - -LABEL="serial_end" diff --git a/test/fuzz/fuzz-udev-rules/64-btrfs.rules b/test/fuzz/fuzz-udev-rules/64-btrfs.rules deleted file mode 100644 index 0fa79df840..0000000000 --- a/test/fuzz/fuzz-udev-rules/64-btrfs.rules +++ /dev/null @@ -1,17 +0,0 @@ -# do not edit this file, it will be overwritten on update - -SUBSYSTEM!="block", GOTO="btrfs_end" -ACTION=="remove", GOTO="btrfs_end" -ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end" -ENV{SYSTEMD_READY}=="0", GOTO="btrfs_end" - -# let the kernel know about this btrfs filesystem, and check if it is complete -IMPORT{builtin}="btrfs ready $devnode" - -# mark the device as not ready to be used by the system -ENV{ID_BTRFS_READY}=="0", ENV{SYSTEMD_READY}="0" - -# reconsider pending devices in case when multidevice volume awaits -ENV{ID_BTRFS_READY}=="1", RUN+="/usr/bin/udevadm trigger -s block -p ID_BTRFS_READY=0" - -LABEL="btrfs_end" diff --git a/test/fuzz/fuzz-udev-rules/70-joystick.rules b/test/fuzz/fuzz-udev-rules/70-joystick.rules deleted file mode 100644 index b80d203670..0000000000 --- a/test/fuzz/fuzz-udev-rules/70-joystick.rules +++ /dev/null @@ -1,12 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="joystick_end" -ENV{ID_INPUT_JOYSTICK}=="", GOTO="joystick_end" -KERNEL!="event*", GOTO="joystick_end" - -# joystick::vp:name::* -KERNELS=="input*", ENV{ID_BUS}!="", \ - IMPORT{builtin}="hwdb 'joystick:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \ - GOTO="joystick_end" - -LABEL="joystick_end" diff --git a/test/fuzz/fuzz-udev-rules/70-mouse.rules b/test/fuzz/fuzz-udev-rules/70-mouse.rules deleted file mode 100644 index 3ea743aff9..0000000000 --- a/test/fuzz/fuzz-udev-rules/70-mouse.rules +++ /dev/null @@ -1,18 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="mouse_end" -KERNEL!="event*", GOTO="mouse_end" -ENV{ID_INPUT_MOUSE}=="", GOTO="mouse_end" - -# mouse::vp:name::* -KERNELS=="input*", ENV{ID_BUS}=="usb", \ - IMPORT{builtin}="hwdb 'mouse:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \ - GOTO="mouse_end" -KERNELS=="input*", ENV{ID_BUS}=="bluetooth", \ - IMPORT{builtin}="hwdb 'mouse:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \ - GOTO="mouse_end" -DRIVERS=="psmouse", SUBSYSTEMS=="serio", \ - IMPORT{builtin}="hwdb 'mouse:ps2::name:$attr{device/name}:'", \ - GOTO="mouse_end" - -LABEL="mouse_end" diff --git a/test/fuzz/fuzz-udev-rules/70-touchpad.rules b/test/fuzz/fuzz-udev-rules/70-touchpad.rules deleted file mode 100644 index 7bede02dec..0000000000 --- a/test/fuzz/fuzz-udev-rules/70-touchpad.rules +++ /dev/null @@ -1,13 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="touchpad_end" -ENV{ID_INPUT}=="", GOTO="touchpad_end" -ENV{ID_INPUT_TOUCHPAD}=="", GOTO="touchpad_end" -KERNEL!="event*", GOTO="touchpad_end" - -# touchpad::vp:name::* -KERNELS=="input*", ENV{ID_BUS}!="", \ - IMPORT{builtin}="hwdb 'touchpad:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \ - GOTO="touchpad_end" - -LABEL="touchpad_end" diff --git a/test/fuzz/fuzz-udev-rules/75-net-description.rules b/test/fuzz/fuzz-udev-rules/75-net-description.rules deleted file mode 100644 index 7e62f8b26b..0000000000 --- a/test/fuzz/fuzz-udev-rules/75-net-description.rules +++ /dev/null @@ -1,14 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION=="remove", GOTO="net_end" -SUBSYSTEM!="net", GOTO="net_end" - -IMPORT{builtin}="net_id" - -SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" -SUBSYSTEMS=="usb", GOTO="net_end" - -SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}" -SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci" - -LABEL="net_end" diff --git a/test/fuzz/fuzz-udev-rules/75-probe_mtd.rules b/test/fuzz/fuzz-udev-rules/75-probe_mtd.rules deleted file mode 100644 index 8848aeeaed..0000000000 --- a/test/fuzz/fuzz-udev-rules/75-probe_mtd.rules +++ /dev/null @@ -1,7 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION!="add", GOTO="mtd_probe_end" - -KERNEL=="mtd*ro", IMPORT{program}="mtd_probe $devnode" - -LABEL="mtd_probe_end" diff --git a/test/fuzz/fuzz-udev-rules/78-sound-card.rules b/test/fuzz/fuzz-udev-rules/78-sound-card.rules deleted file mode 100644 index f2fc277396..0000000000 --- a/test/fuzz/fuzz-udev-rules/78-sound-card.rules +++ /dev/null @@ -1,96 +0,0 @@ -# do not edit this file, it will be overwritten on update - -SUBSYSTEM!="sound", GOTO="sound_end" - -ACTION=="add|change", KERNEL=="controlC*", ATTR{../uevent}="change" -ACTION!="change", GOTO="sound_end" - -# Ok, we probably need a little explanation here for what the two lines above -# are good for. -# -# The story goes like this: when ALSA registers a new sound card it emits a -# series of 'add' events to userspace, for the main card device and for all the -# child device nodes that belong to it. udev relays those to applications, -# however only maintains the order between father and child, but not between -# the siblings. The control device node creation can be used as synchronization -# point. All other devices that belong to a card are created in the kernel -# before it. However unfortunately due to the fact that siblings are forwarded -# out of order by udev this fact is lost to applications. -# -# OTOH before an application can open a device it needs to make sure that all -# its device nodes are completely created and set up. -# -# As a workaround for this issue we have added the udev rule above which will -# generate a 'change' event on the main card device from the 'add' event of the -# card's control device. Due to the ordering semantics of udev this event will -# only be relayed after all child devices have finished processing properly. -# When an application needs to listen for appearing devices it can hence look -# for 'change' events only, and ignore the actual 'add' events. -# -# When the application is initialized at the same time as a device is plugged -# in it may need to figure out if the 'change' event has already been triggered -# or not for a card. To find that out we store the flag environment variable -# SOUND_INITIALIZED on the device which simply tells us if the card 'change' -# event has already been processed. - -KERNEL!="card*", GOTO="sound_end" - -ENV{SOUND_INITIALIZED}="1" - -IMPORT{builtin}="hwdb" -SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id" -SUBSYSTEMS=="usb", GOTO="skip_pci" - -SUBSYSTEMS=="firewire", ATTRS{guid}=="?*", \ - ENV{ID_BUS}="firewire", ENV{ID_SERIAL}="$attr{guid}", ENV{ID_SERIAL_SHORT}="$attr{guid}", \ - ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{model}", \ - ENV{ID_VENDOR}="$attr{vendor_name}", ENV{ID_MODEL}="$attr{model_name}" -SUBSYSTEMS=="firewire", GOTO="skip_pci" - -SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}" -SUBSYSTEMS=="pci", GOTO="skip_pci" - -# If we reach here, the device nor any of its parents are USB/PCI/firewire bus devices. -# If we now find a parent that is a platform device, assume that we're working with -# an internal sound card. -SUBSYSTEMS=="platform", ENV{SOUND_FORM_FACTOR}="internal", GOTO="sound_end" - -LABEL="skip_pci" - -# Define ID_ID if ID_BUS and ID_SERIAL are set. This will work for both -# USB and firewire. -ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}" -ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}" - -IMPORT{builtin}="path_id" - -# The values used here for $SOUND_FORM_FACTOR and $SOUND_CLASS should be kept -# in sync with those defined for PulseAudio's src/pulse/proplist.h -# PA_PROP_DEVICE_FORM_FACTOR, PA_PROP_DEVICE_CLASS properties. - -# If the first PCM device of this card has the pcm class 'modem', then the card is a modem -ATTR{pcmC%nD0p/pcm_class}=="modem", ENV{SOUND_CLASS}="modem", GOTO="sound_end" - -# Identify cards on the internal PCI bus as internal -SUBSYSTEMS=="pci", DEVPATH=="*/0000:00:??.?/sound/*", ENV{SOUND_FORM_FACTOR}="internal", GOTO="sound_end" - -# Devices that also support Image/Video interfaces are most likely webcams -SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACES}=="*:0e????:*", ENV{SOUND_FORM_FACTOR}="webcam", GOTO="sound_end" - -# Matching on the model strings is a bit ugly, I admit -ENV{ID_MODEL}=="*[Ss]peaker*", ENV{SOUND_FORM_FACTOR}="speaker", GOTO="sound_end" -ENV{ID_MODEL_FROM_DATABASE}=="*[Ss]peaker*", ENV{SOUND_FORM_FACTOR}="speaker", GOTO="sound_end" - -ENV{ID_MODEL}=="*[Hh]eadphone*", ENV{SOUND_FORM_FACTOR}="headphone", GOTO="sound_end" -ENV{ID_MODEL_FROM_DATABASE}=="*[Hh]eadphone*", ENV{SOUND_FORM_FACTOR}="headphone", GOTO="sound_end" - -ENV{ID_MODEL}=="*[Hh]eadset*", ENV{SOUND_FORM_FACTOR}="headset", GOTO="sound_end" -ENV{ID_MODEL_FROM_DATABASE}=="*[Hh]eadset*", ENV{SOUND_FORM_FACTOR}="headset", GOTO="sound_end" - -ENV{ID_MODEL}=="*[Hh]andset*", ENV{SOUND_FORM_FACTOR}="handset", GOTO="sound_end" -ENV{ID_MODEL_FROM_DATABASE}=="*[Hh]andset*", ENV{SOUND_FORM_FACTOR}="handset", GOTO="sound_end" - -ENV{ID_MODEL}=="*[Mm]icrophone*", ENV{SOUND_FORM_FACTOR}="microphone", GOTO="sound_end" -ENV{ID_MODEL_FROM_DATABASE}=="*[Mm]icrophone*", ENV{SOUND_FORM_FACTOR}="microphone", GOTO="sound_end" - -LABEL="sound_end" diff --git a/test/fuzz/fuzz-udev-rules/80-drivers.rules b/test/fuzz/fuzz-udev-rules/80-drivers.rules deleted file mode 100644 index 57d69b8232..0000000000 --- a/test/fuzz/fuzz-udev-rules/80-drivers.rules +++ /dev/null @@ -1,13 +0,0 @@ -# do not edit this file, it will be overwritten on update - -ACTION!="add", GOTO="drivers_end" - -ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load '$env{MODALIAS}'" -SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}+="kmod load tifm_sd" -SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}+="kmod load tifm_ms" -SUBSYSTEM=="memstick", RUN{builtin}+="kmod load ms_block mspro_block" -SUBSYSTEM=="i2o", RUN{builtin}+="kmod load i2o_block" -SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}+="kmod load ppdev" -KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}+="kmod load sm_ftl" - -LABEL="drivers_end" diff --git a/test/fuzz/fuzz-udev-rules/80-net-setup-link.rules b/test/fuzz/fuzz-udev-rules/80-net-setup-link.rules deleted file mode 100644 index 6e411a91f0..0000000000 --- a/test/fuzz/fuzz-udev-rules/80-net-setup-link.rules +++ /dev/null @@ -1,13 +0,0 @@ -# do not edit this file, it will be overwritten on update - -SUBSYSTEM!="net", GOTO="net_setup_link_end" - -IMPORT{builtin}="path_id" - -ACTION!="add", GOTO="net_setup_link_end" - -IMPORT{builtin}="net_setup_link" - -NAME=="", ENV{ID_NET_NAME}!="", NAME="$env{ID_NET_NAME}" - -LABEL="net_setup_link_end" diff --git a/test/fuzz/fuzz-udev-rules/99-systemd.rules b/test/fuzz/fuzz-udev-rules/99-systemd.rules deleted file mode 100644 index 278383b02c..0000000000 --- a/test/fuzz/fuzz-udev-rules/99-systemd.rules +++ /dev/null @@ -1,80 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -ACTION=="remove", GOTO="systemd_end" - -SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd" -KERNEL=="vport*", TAG+="systemd" - -SUBSYSTEM=="ubi", TAG+="systemd" - -SUBSYSTEM=="block", TAG+="systemd" - -# We can't make any conclusions about suspended DM devices so let's just import previous SYSTEMD_READY state and skip other rules -SUBSYSTEM=="block", ENV{DM_SUSPENDED}=="1", IMPORT{db}="SYSTEMD_READY", GOTO="systemd_end" -SUBSYSTEM=="block", ACTION=="add", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0" - -# Ignore encrypted devices with no identified superblock on it, since -# we are probably still calling mke2fs or mkswap on it. -SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0" - -# Explicitly set SYSTEMD_READY=1 for DM devices that don't have it set yet, so that we always have something to import above -SUBSYSTEM=="block", ENV{DM_UUID}=="?*", ENV{SYSTEMD_READY}=="", ENV{SYSTEMD_READY}="1" - -# add symlink to GPT root disk -SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}!="crypto_LUKS", SYMLINK+="gpt-auto-root" -SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}=="crypto_LUKS", SYMLINK+="gpt-auto-root-luks" -SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{DM_NAME}=="root", SYMLINK+="gpt-auto-root" - -# Ignore raid devices that are not yet assembled and started -SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0" -SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0" - -# Ignore loop devices that don't have any file attached -SUBSYSTEM=="block", KERNEL=="loop[0-9]*", ENV{DEVTYPE}=="disk", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0" - -# Ignore nbd devices until the PID file exists (which signals a connected device) -SUBSYSTEM=="block", KERNEL=="nbd*", ENV{DEVTYPE}=="disk", TEST!="pid", ENV{SYSTEMD_READY}="0" - -# We need a hardware independent way to identify network devices. We -# use the /sys/subsystem/ path for this. Kernel "bus" and "class" names -# should be treated as one namespace, like udev handles it. This is mostly -# just an identification string for systemd, so whether the path actually is -# accessible or not does not matter as long as it is unique and in the -# filesystem namespace. - -SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/net/devices/$name" -SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k" - -SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target" -ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target" -SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target" - -SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" -SUBSYSTEM=="usb", KERNEL=="lp*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" -SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" - -# Apply sysctl variables to network devices (and only to those) as they appear. -ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name" - -# Pull in backlight save/restore for all backlight devices and -# keyboard backlights -SUBSYSTEM=="backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@backlight:$name.service" -SUBSYSTEM=="leds", KERNEL=="*kbd_backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@leds:$name.service" - -# Pull in rfkill save/restore for all rfkill devices -SUBSYSTEM=="rfkill", ENV{SYSTEMD_RFKILL}="1" -SUBSYSTEM=="rfkill", IMPORT{builtin}="path_id" -SUBSYSTEM=="misc", KERNEL=="rfkill", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-rfkill.socket" - -# Asynchronously mount file systems implemented by these modules as soon as they are loaded. -SUBSYSTEM=="module", KERNEL=="fuse", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-fs-fuse-connections.mount" -SUBSYSTEM=="module", KERNEL=="configfs", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-kernel-config.mount" - -LABEL="systemd_end" diff --git a/test/fuzz/fuzz-udev-rules/block.rules b/test/fuzz/fuzz-udev-rules/block.rules new file mode 100644 index 0000000000..343fc06f85 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/block.rules @@ -0,0 +1,11 @@ +# do not edit this file, it will be overwritten on update + +# enable in-kernel media-presence polling +ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_poll_msecs}=="0", \ + ATTR{parameters/events_dfl_poll_msecs}="2000" + +# forward scsi device event to corresponding block device +ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" + +# watch metadata changes, caused by tools closing the device node which was opened for writing +ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*|mmcblk*", OPTIONS+="watch" diff --git a/test/fuzz/fuzz-udev-rules/btrfs.rules b/test/fuzz/fuzz-udev-rules/btrfs.rules new file mode 100644 index 0000000000..0fa79df840 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/btrfs.rules @@ -0,0 +1,17 @@ +# do not edit this file, it will be overwritten on update + +SUBSYSTEM!="block", GOTO="btrfs_end" +ACTION=="remove", GOTO="btrfs_end" +ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end" +ENV{SYSTEMD_READY}=="0", GOTO="btrfs_end" + +# let the kernel know about this btrfs filesystem, and check if it is complete +IMPORT{builtin}="btrfs ready $devnode" + +# mark the device as not ready to be used by the system +ENV{ID_BTRFS_READY}=="0", ENV{SYSTEMD_READY}="0" + +# reconsider pending devices in case when multidevice volume awaits +ENV{ID_BTRFS_READY}=="1", RUN+="/usr/bin/udevadm trigger -s block -p ID_BTRFS_READY=0" + +LABEL="btrfs_end" diff --git a/test/fuzz/fuzz-udev-rules/cdrom_id.rules b/test/fuzz/fuzz-udev-rules/cdrom_id.rules new file mode 100644 index 0000000000..288f8ce2f9 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/cdrom_id.rules @@ -0,0 +1,29 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="cdrom_end" +SUBSYSTEM!="block", GOTO="cdrom_end" +KERNEL!="sr[0-9]*|vdisk*|xvd*", GOTO="cdrom_end" +ENV{DEVTYPE}!="disk", GOTO="cdrom_end" + +# unconditionally tag device as CDROM +KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1" + +# stop automatically any mount units bound to the device if the media eject +# button is pressed. +ENV{ID_CDROM}=="1", ENV{SYSTEMD_MOUNT_DEVICE_BOUND}="1" + +# media eject button pressed +ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdrom_end" + +# import device and media properties and lock tray to +# enable the receiving of media eject button events +IMPORT{program}="cdrom_id --lock-media $devnode" + +# ejecting a CD does not remove the device node, so mark the systemd device +# unit as inactive while there is no medium; this automatically cleans up of +# stale mounts after ejecting +ENV{DISK_MEDIA_CHANGE}=="?*", ENV{ID_CDROM_MEDIA}!="?*", ENV{SYSTEMD_READY}="0" + +KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100" + +LABEL="cdrom_end" diff --git a/test/fuzz/fuzz-udev-rules/drivers.rules b/test/fuzz/fuzz-udev-rules/drivers.rules new file mode 100644 index 0000000000..57d69b8232 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/drivers.rules @@ -0,0 +1,13 @@ +# do not edit this file, it will be overwritten on update + +ACTION!="add", GOTO="drivers_end" + +ENV{MODALIAS}=="?*", RUN{builtin}+="kmod load '$env{MODALIAS}'" +SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}+="kmod load tifm_sd" +SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}+="kmod load tifm_ms" +SUBSYSTEM=="memstick", RUN{builtin}+="kmod load ms_block mspro_block" +SUBSYSTEM=="i2o", RUN{builtin}+="kmod load i2o_block" +SUBSYSTEM=="module", KERNEL=="parport_pc", RUN{builtin}+="kmod load ppdev" +KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN{builtin}+="kmod load sm_ftl" + +LABEL="drivers_end" diff --git a/test/fuzz/fuzz-udev-rules/drm.rules b/test/fuzz/fuzz-udev-rules/drm.rules new file mode 100644 index 0000000000..f7f3435d50 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/drm.rules @@ -0,0 +1,8 @@ +# do not edit this file, it will be overwritten on update + +ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id" + +# by-path +ENV{ID_PATH}=="?*", KERNEL=="card*", SYMLINK+="dri/by-path/$env{ID_PATH}-card" +ENV{ID_PATH}=="?*", KERNEL=="controlD*", SYMLINK+="dri/by-path/$env{ID_PATH}-control" +ENV{ID_PATH}=="?*", KERNEL=="renderD*", SYMLINK+="dri/by-path/$env{ID_PATH}-render" diff --git a/test/fuzz/fuzz-udev-rules/evdev.rules b/test/fuzz/fuzz-udev-rules/evdev.rules new file mode 100644 index 0000000000..e5e608acd3 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/evdev.rules @@ -0,0 +1,23 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="evdev_end" +KERNEL!="event*", GOTO="evdev_end" + +# skip later rules when we find something for this input device +IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=evdev:", \ + RUN{builtin}+="keyboard", GOTO="evdev_end" + +# AT keyboard matching by the machine's DMI data +DRIVERS=="atkbd", \ + IMPORT{builtin}="hwdb 'evdev:atkbd:$attr{[dmi/id]modalias}'", \ + RUN{builtin}+="keyboard", GOTO="evdev_end" + +# device matching the input device name + properties + the machine's DMI data +KERNELS=="input*", IMPORT{builtin}="hwdb 'evdev:name:$attr{name}:phys:$attr{phys}:ev:$attr{capabilities/ev}:$attr{[dmi/id]modalias}'", \ + RUN{builtin}+="keyboard", GOTO="evdev_end" + +# device matching the input device name and the machine's DMI data +KERNELS=="input*", IMPORT{builtin}="hwdb 'evdev:name:$attr{name}:$attr{[dmi/id]modalias}'", \ + RUN{builtin}+="keyboard", GOTO="evdev_end" + +LABEL="evdev_end" diff --git a/test/fuzz/fuzz-udev-rules/input-id.rules b/test/fuzz/fuzz-udev-rules/input-id.rules new file mode 100644 index 0000000000..bb8a812d1b --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/input-id.rules @@ -0,0 +1,8 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="id_input_end" + +SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id" +SUBSYSTEM=="input", IMPORT{builtin}="hwdb --subsystem=input --lookup-prefix=id-input:modalias:" + +LABEL="id_input_end" diff --git a/test/fuzz/fuzz-udev-rules/joystick.rules b/test/fuzz/fuzz-udev-rules/joystick.rules new file mode 100644 index 0000000000..b80d203670 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/joystick.rules @@ -0,0 +1,12 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="joystick_end" +ENV{ID_INPUT_JOYSTICK}=="", GOTO="joystick_end" +KERNEL!="event*", GOTO="joystick_end" + +# joystick::vp:name::* +KERNELS=="input*", ENV{ID_BUS}!="", \ + IMPORT{builtin}="hwdb 'joystick:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \ + GOTO="joystick_end" + +LABEL="joystick_end" diff --git a/test/fuzz/fuzz-udev-rules/mouse.rules b/test/fuzz/fuzz-udev-rules/mouse.rules new file mode 100644 index 0000000000..3ea743aff9 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/mouse.rules @@ -0,0 +1,18 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="mouse_end" +KERNEL!="event*", GOTO="mouse_end" +ENV{ID_INPUT_MOUSE}=="", GOTO="mouse_end" + +# mouse::vp:name::* +KERNELS=="input*", ENV{ID_BUS}=="usb", \ + IMPORT{builtin}="hwdb 'mouse:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \ + GOTO="mouse_end" +KERNELS=="input*", ENV{ID_BUS}=="bluetooth", \ + IMPORT{builtin}="hwdb 'mouse:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \ + GOTO="mouse_end" +DRIVERS=="psmouse", SUBSYSTEMS=="serio", \ + IMPORT{builtin}="hwdb 'mouse:ps2::name:$attr{device/name}:'", \ + GOTO="mouse_end" + +LABEL="mouse_end" diff --git a/test/fuzz/fuzz-udev-rules/net-description.rules b/test/fuzz/fuzz-udev-rules/net-description.rules new file mode 100644 index 0000000000..7e62f8b26b --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/net-description.rules @@ -0,0 +1,14 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="net_end" +SUBSYSTEM!="net", GOTO="net_end" + +IMPORT{builtin}="net_id" + +SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" +SUBSYSTEMS=="usb", GOTO="net_end" + +SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}" +SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci" + +LABEL="net_end" diff --git a/test/fuzz/fuzz-udev-rules/net-setup-link.rules b/test/fuzz/fuzz-udev-rules/net-setup-link.rules new file mode 100644 index 0000000000..6e411a91f0 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/net-setup-link.rules @@ -0,0 +1,13 @@ +# do not edit this file, it will be overwritten on update + +SUBSYSTEM!="net", GOTO="net_setup_link_end" + +IMPORT{builtin}="path_id" + +ACTION!="add", GOTO="net_setup_link_end" + +IMPORT{builtin}="net_setup_link" + +NAME=="", ENV{ID_NET_NAME}!="", NAME="$env{ID_NET_NAME}" + +LABEL="net_setup_link_end" diff --git a/test/fuzz/fuzz-udev-rules/persistent-alsa.rules b/test/fuzz/fuzz-udev-rules/persistent-alsa.rules new file mode 100644 index 0000000000..8154e2dbb5 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/persistent-alsa.rules @@ -0,0 +1,14 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="persistent_alsa_end" +SUBSYSTEM!="sound", GOTO="persistent_alsa_end" +KERNEL!="controlC[0-9]*", GOTO="persistent_alsa_end" + +SUBSYSTEMS=="usb", ENV{ID_MODEL}=="", IMPORT{builtin}="usb_id" +ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", SYMLINK+="snd/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}" +ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", SYMLINK+="snd/by-id/$env{ID_BUS}-$env{ID_SERIAL}" + +IMPORT{builtin}="path_id" +ENV{ID_PATH}=="?*", SYMLINK+="snd/by-path/$env{ID_PATH}" + +LABEL="persistent_alsa_end" diff --git a/test/fuzz/fuzz-udev-rules/persistent-input.rules b/test/fuzz/fuzz-udev-rules/persistent-input.rules new file mode 100644 index 0000000000..255547d906 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/persistent-input.rules @@ -0,0 +1,42 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="persistent_input_end" +SUBSYSTEM!="input", GOTO="persistent_input_end" +SUBSYSTEMS=="bluetooth", ENV{ID_BUS}="bluetooth", GOTO="persistent_input_end" +# Bluetooth devices don't always have the bluetooth subsystem +ATTRS{id/bustype}=="0005", ENV{ID_BUS}="bluetooth", GOTO="persistent_input_end" +SUBSYSTEMS=="rmi4", ENV{ID_BUS}="rmi" +SUBSYSTEMS=="serio", ENV{ID_BUS}="i8042" + +SUBSYSTEMS=="usb", ENV{ID_BUS}=="", IMPORT{builtin}="usb_id" + +# determine class name for persistent symlinks +ENV{ID_INPUT_KEYBOARD}=="?*", ENV{.INPUT_CLASS}="kbd" +ENV{ID_INPUT_MOUSE}=="?*", ENV{.INPUT_CLASS}="mouse" +ENV{ID_INPUT_TOUCHPAD}=="?*", ENV{.INPUT_CLASS}="mouse" +ENV{ID_INPUT_TABLET}=="?*", ENV{.INPUT_CLASS}="mouse" +ENV{ID_INPUT_JOYSTICK}=="?*", ENV{.INPUT_CLASS}="joystick" +DRIVERS=="pcspkr", ENV{.INPUT_CLASS}="spkr" +ATTRS{name}=="*dvb*|*DVB*|* IR *", ENV{.INPUT_CLASS}="ir" + +# fill empty serial number +ENV{.INPUT_CLASS}=="?*", ENV{ID_SERIAL}=="", ENV{ID_SERIAL}="noserial" + +# by-id links +KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="|00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-$env{.INPUT_CLASS}" +KERNEL=="mouse*|js*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-$env{.INPUT_CLASS}" +KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="|00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-$env{.INPUT_CLASS}" +KERNEL=="event*", ENV{ID_BUS}=="?*", ENV{.INPUT_CLASS}=="?*", ATTRS{bInterfaceNumber}=="?*", ATTRS{bInterfaceNumber}!="00", SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$attr{bInterfaceNumber}-event-$env{.INPUT_CLASS}" +# allow empty class for USB devices, by appending the interface number +SUBSYSTEMS=="usb", ENV{ID_BUS}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", ATTRS{bInterfaceNumber}=="?*", \ + SYMLINK+="input/by-id/$env{ID_BUS}-$env{ID_SERIAL}-event-if$attr{bInterfaceNumber}" + +# by-path +SUBSYSTEMS=="pci|usb|platform|acpi", IMPORT{builtin}="path_id" +ENV{ID_PATH}=="?*", KERNEL=="mouse*|js*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-$env{.INPUT_CLASS}" +ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="?*", SYMLINK+="input/by-path/$env{ID_PATH}-event-$env{.INPUT_CLASS}" +# allow empty class for platform and usb devices; platform supports only a single interface that way +SUBSYSTEMS=="usb|platform", ENV{ID_PATH}=="?*", KERNEL=="event*", ENV{.INPUT_CLASS}=="", \ + SYMLINK+="input/by-path/$env{ID_PATH}-event" + +LABEL="persistent_input_end" diff --git a/test/fuzz/fuzz-udev-rules/persistent-storage.rules b/test/fuzz/fuzz-udev-rules/persistent-storage.rules new file mode 100644 index 0000000000..b63225875b --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/persistent-storage.rules @@ -0,0 +1,106 @@ +# do not edit this file, it will be overwritten on update + +# persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} +# scheme based on "Linux persistent device names", 2004, Hannes Reinecke + +ACTION=="remove", GOTO="persistent_storage_end" +ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_end" + +SUBSYSTEM!="block", GOTO="persistent_storage_end" +KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|scm*|pmem*|nbd*|zd*", GOTO="persistent_storage_end" + +# ignore partitions that span the entire disk +TEST=="whole_disk", GOTO="persistent_storage_end" + +# for partitions import parent information +ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*" + +# NVMe +KERNEL=="nvme*[0-9]n*[0-9]", ATTR{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}" +KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}-part%n" + +KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{serial}=="?*", ENV{ID_SERIAL_SHORT}="$attr{serial}" +KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{wwid}=="?*", ENV{ID_WWN}="$attr{wwid}" +KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{model}=="?*", ENV{ID_MODEL}="$attr{model}" +KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ATTRS{firmware_rev}=="?*", ENV{ID_REVISION}="$attr{firmware_rev}" +KERNEL=="nvme*[0-9]n*[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", \ + ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}" + +KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{serial}=="?*", ENV{ID_SERIAL_SHORT}="$attr{serial}" +KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{model}=="?*", ENV{ID_MODEL}="$attr{model}" +KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{firmware_rev}=="?*", ENV{ID_REVISION}="$attr{firmware_rev}" +KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", \ + ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}-part%n" + +# virtio-blk +KERNEL=="vd*[!0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}" +KERNEL=="vd*[0-9]", ATTRS{serial}=="?*", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/virtio-$env{ID_SERIAL}-part%n" + +# ATA +KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{vendor}=="ATA", IMPORT{program}="ata_id --export $devnode" + +# ATAPI devices (SPC-3 or later) +KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", ATTRS{type}=="5", ATTRS{scsi_level}=="[6-9]*", IMPORT{program}="ata_id --export $devnode" + +# Run ata_id on non-removable USB Mass Storage (SATA/PATA disks in enclosures) +KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", ATTR{removable}=="0", SUBSYSTEMS=="usb", IMPORT{program}="ata_id --export $devnode" + +# Fall back usb_id for USB devices +KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id" + +# SCSI devices +KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --allowlisted -d $devnode", ENV{ID_BUS}="scsi" +KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --allowlisted -d $devnode", ENV{ID_BUS}="cciss" +KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" +KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" + +# PMEM devices +KERNEL=="pmem*", ENV{DEVTYPE}=="disk", ATTRS{uuid}=="?*", SYMLINK+="disk/by-id/pmem-$attr{uuid}" + +# FireWire +KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" +KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" + +# MMC +KERNEL=="mmcblk[0-9]", SUBSYSTEMS=="mmc", ATTRS{name}=="?*", ATTRS{serial}=="?*", \ + ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}" +KERNEL=="mmcblk[0-9]p[0-9]*", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n" + +# Memstick +KERNEL=="msblk[0-9]|mspblk[0-9]", SUBSYSTEMS=="memstick", ATTRS{name}=="?*", ATTRS{serial}=="?*", \ + ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}" +KERNEL=="msblk[0-9]p[0-9]|mspblk[0-9]p[0-9]", ENV{ID_NAME}=="?*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/memstick-$env{ID_NAME}_$env{ID_SERIAL}-part%n" + +# by-path +ENV{DEVTYPE}=="disk", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id" +KERNEL=="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-boot%n" +KERNEL!="mmcblk[0-9]boot[0-9]", ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" +ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" + +# legacy virtio-pci by-path links (deprecated) +KERNEL=="vd*[!0-9]", ENV{ID_PATH}=="pci-*", SYMLINK+="disk/by-path/virtio-$env{ID_PATH}" +KERNEL=="vd*[0-9]", ENV{ID_PATH}=="pci-*", SYMLINK+="disk/by-path/virtio-$env{ID_PATH}-part%n" + +# probe filesystem metadata of optical drives which have a media inserted +KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \ + IMPORT{builtin}="blkid --hint=session_offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}" +# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET +KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \ + IMPORT{builtin}="blkid --noraid" + +# probe filesystem metadata of disks +KERNEL!="sr*", IMPORT{builtin}="blkid" + +# by-label/by-uuid links (filesystem metadata) +ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" +ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" + +# by-id (World Wide Name) +ENV{DEVTYPE}=="disk", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}" +ENV{DEVTYPE}=="partition", ENV{ID_WWN_WITH_EXTENSION}=="?*", SYMLINK+="disk/by-id/wwn-$env{ID_WWN_WITH_EXTENSION}-part%n" + +# by-partlabel/by-partuuid links (partition metadata) +ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}" +ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/by-partlabel/$env{ID_PART_ENTRY_NAME}" + +LABEL="persistent_storage_end" diff --git a/test/fuzz/fuzz-udev-rules/persistent-v4l.rules b/test/fuzz/fuzz-udev-rules/persistent-v4l.rules new file mode 100644 index 0000000000..93c5ee8c27 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/persistent-v4l.rules @@ -0,0 +1,20 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="persistent_v4l_end" +SUBSYSTEM!="video4linux", GOTO="persistent_v4l_end" +ENV{MAJOR}=="", GOTO="persistent_v4l_end" + +IMPORT{program}="v4l_id $devnode" + +SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id" +KERNEL=="video*", ENV{ID_SERIAL}=="?*", SYMLINK+="v4l/by-id/$env{ID_BUS}-$env{ID_SERIAL}-video-index$attr{index}" + +# check for valid "index" number +TEST!="index", GOTO="persistent_v4l_end" +ATTR{index}!="?*", GOTO="persistent_v4l_end" + +IMPORT{builtin}="path_id" +ENV{ID_PATH}=="?*", KERNEL=="video*|vbi*", SYMLINK+="v4l/by-path/$env{ID_PATH}-video-index$attr{index}" +ENV{ID_PATH}=="?*", KERNEL=="audio*", SYMLINK+="v4l/by-path/$env{ID_PATH}-audio-index$attr{index}" + +LABEL="persistent_v4l_end" diff --git a/test/fuzz/fuzz-udev-rules/probe_mtd.rules b/test/fuzz/fuzz-udev-rules/probe_mtd.rules new file mode 100644 index 0000000000..8848aeeaed --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/probe_mtd.rules @@ -0,0 +1,7 @@ +# do not edit this file, it will be overwritten on update + +ACTION!="add", GOTO="mtd_probe_end" + +KERNEL=="mtd*ro", IMPORT{program}="mtd_probe $devnode" + +LABEL="mtd_probe_end" diff --git a/test/fuzz/fuzz-udev-rules/sensor.rules b/test/fuzz/fuzz-udev-rules/sensor.rules new file mode 100644 index 0000000000..7ad2c36be3 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/sensor.rules @@ -0,0 +1,18 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="sensor_end" + +# device matching the sensor's name and the machine's DMI data for IIO devices +SUBSYSTEM=="iio", KERNEL=="iio*", SUBSYSTEMS=="usb|i2c", \ + IMPORT{builtin}="hwdb 'sensor:modalias:$attr{modalias}:$attr{[dmi/id]modalias}'", \ + GOTO="sensor_end" + +SUBSYSTEM=="input", ENV{ID_INPUT_ACCELEROMETER}=="1", SUBSYSTEMS=="acpi", \ + IMPORT{builtin}="hwdb 'sensor:modalias:acpi:$attr{hid}:$attr{[dmi/id]modalias}'", \ + GOTO="sensor_end" + +SUBSYSTEM=="input", ENV{ID_INPUT_ACCELEROMETER}=="1", SUBSYSTEMS=="platform", \ + IMPORT{builtin}="hwdb 'sensor:modalias:platform:$id:$attr{[dmi/id]modalias}'", \ + GOTO="sensor_end" + +LABEL="sensor_end" diff --git a/test/fuzz/fuzz-udev-rules/serial.rules b/test/fuzz/fuzz-udev-rules/serial.rules new file mode 100644 index 0000000000..f303e27fd5 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/serial.rules @@ -0,0 +1,26 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="serial_end" +SUBSYSTEM!="tty", GOTO="serial_end" + +SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}" +SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci" +SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" + +# /dev/serial/by-path/, /dev/serial/by-id/ for USB devices +KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end" + +SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}" + +IMPORT{builtin}="path_id" +ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", SYMLINK+="serial/by-path/$env{ID_PATH}" +ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-path/$env{ID_PATH}-port$env{.ID_PORT}" + +IMPORT{builtin}="usb_id" +ENV{ID_SERIAL}=="", GOTO="serial_end" +SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACE_NUM}="$attr{bInterfaceNumber}" +ENV{ID_USB_INTERFACE_NUM}=="", GOTO="serial_end" +ENV{.ID_PORT}=="", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}" +ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}-port$env{.ID_PORT}" + +LABEL="serial_end" diff --git a/test/fuzz/fuzz-udev-rules/sound-card.rules b/test/fuzz/fuzz-udev-rules/sound-card.rules new file mode 100644 index 0000000000..f2fc277396 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/sound-card.rules @@ -0,0 +1,96 @@ +# do not edit this file, it will be overwritten on update + +SUBSYSTEM!="sound", GOTO="sound_end" + +ACTION=="add|change", KERNEL=="controlC*", ATTR{../uevent}="change" +ACTION!="change", GOTO="sound_end" + +# Ok, we probably need a little explanation here for what the two lines above +# are good for. +# +# The story goes like this: when ALSA registers a new sound card it emits a +# series of 'add' events to userspace, for the main card device and for all the +# child device nodes that belong to it. udev relays those to applications, +# however only maintains the order between father and child, but not between +# the siblings. The control device node creation can be used as synchronization +# point. All other devices that belong to a card are created in the kernel +# before it. However unfortunately due to the fact that siblings are forwarded +# out of order by udev this fact is lost to applications. +# +# OTOH before an application can open a device it needs to make sure that all +# its device nodes are completely created and set up. +# +# As a workaround for this issue we have added the udev rule above which will +# generate a 'change' event on the main card device from the 'add' event of the +# card's control device. Due to the ordering semantics of udev this event will +# only be relayed after all child devices have finished processing properly. +# When an application needs to listen for appearing devices it can hence look +# for 'change' events only, and ignore the actual 'add' events. +# +# When the application is initialized at the same time as a device is plugged +# in it may need to figure out if the 'change' event has already been triggered +# or not for a card. To find that out we store the flag environment variable +# SOUND_INITIALIZED on the device which simply tells us if the card 'change' +# event has already been processed. + +KERNEL!="card*", GOTO="sound_end" + +ENV{SOUND_INITIALIZED}="1" + +IMPORT{builtin}="hwdb" +SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id" +SUBSYSTEMS=="usb", GOTO="skip_pci" + +SUBSYSTEMS=="firewire", ATTRS{guid}=="?*", \ + ENV{ID_BUS}="firewire", ENV{ID_SERIAL}="$attr{guid}", ENV{ID_SERIAL_SHORT}="$attr{guid}", \ + ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{model}", \ + ENV{ID_VENDOR}="$attr{vendor_name}", ENV{ID_MODEL}="$attr{model_name}" +SUBSYSTEMS=="firewire", GOTO="skip_pci" + +SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}" +SUBSYSTEMS=="pci", GOTO="skip_pci" + +# If we reach here, the device nor any of its parents are USB/PCI/firewire bus devices. +# If we now find a parent that is a platform device, assume that we're working with +# an internal sound card. +SUBSYSTEMS=="platform", ENV{SOUND_FORM_FACTOR}="internal", GOTO="sound_end" + +LABEL="skip_pci" + +# Define ID_ID if ID_BUS and ID_SERIAL are set. This will work for both +# USB and firewire. +ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="?*", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}-$env{ID_USB_INTERFACE_NUM}" +ENV{ID_SERIAL}=="?*", ENV{ID_USB_INTERFACE_NUM}=="", ENV{ID_ID}="$env{ID_BUS}-$env{ID_SERIAL}" + +IMPORT{builtin}="path_id" + +# The values used here for $SOUND_FORM_FACTOR and $SOUND_CLASS should be kept +# in sync with those defined for PulseAudio's src/pulse/proplist.h +# PA_PROP_DEVICE_FORM_FACTOR, PA_PROP_DEVICE_CLASS properties. + +# If the first PCM device of this card has the pcm class 'modem', then the card is a modem +ATTR{pcmC%nD0p/pcm_class}=="modem", ENV{SOUND_CLASS}="modem", GOTO="sound_end" + +# Identify cards on the internal PCI bus as internal +SUBSYSTEMS=="pci", DEVPATH=="*/0000:00:??.?/sound/*", ENV{SOUND_FORM_FACTOR}="internal", GOTO="sound_end" + +# Devices that also support Image/Video interfaces are most likely webcams +SUBSYSTEMS=="usb", ENV{ID_USB_INTERFACES}=="*:0e????:*", ENV{SOUND_FORM_FACTOR}="webcam", GOTO="sound_end" + +# Matching on the model strings is a bit ugly, I admit +ENV{ID_MODEL}=="*[Ss]peaker*", ENV{SOUND_FORM_FACTOR}="speaker", GOTO="sound_end" +ENV{ID_MODEL_FROM_DATABASE}=="*[Ss]peaker*", ENV{SOUND_FORM_FACTOR}="speaker", GOTO="sound_end" + +ENV{ID_MODEL}=="*[Hh]eadphone*", ENV{SOUND_FORM_FACTOR}="headphone", GOTO="sound_end" +ENV{ID_MODEL_FROM_DATABASE}=="*[Hh]eadphone*", ENV{SOUND_FORM_FACTOR}="headphone", GOTO="sound_end" + +ENV{ID_MODEL}=="*[Hh]eadset*", ENV{SOUND_FORM_FACTOR}="headset", GOTO="sound_end" +ENV{ID_MODEL_FROM_DATABASE}=="*[Hh]eadset*", ENV{SOUND_FORM_FACTOR}="headset", GOTO="sound_end" + +ENV{ID_MODEL}=="*[Hh]andset*", ENV{SOUND_FORM_FACTOR}="handset", GOTO="sound_end" +ENV{ID_MODEL_FROM_DATABASE}=="*[Hh]andset*", ENV{SOUND_FORM_FACTOR}="handset", GOTO="sound_end" + +ENV{ID_MODEL}=="*[Mm]icrophone*", ENV{SOUND_FORM_FACTOR}="microphone", GOTO="sound_end" +ENV{ID_MODEL_FROM_DATABASE}=="*[Mm]icrophone*", ENV{SOUND_FORM_FACTOR}="microphone", GOTO="sound_end" + +LABEL="sound_end" diff --git a/test/fuzz/fuzz-udev-rules/storage-tape.rules b/test/fuzz/fuzz-udev-rules/storage-tape.rules new file mode 100644 index 0000000000..40d6261c6e --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/storage-tape.rules @@ -0,0 +1,36 @@ +# do not edit this file, it will be overwritten on update + +# persistent storage links: /dev/tape/{by-id,by-path} + +ACTION=="remove", GOTO="persistent_storage_tape_end" +ENV{UDEV_DISABLE_PERSISTENT_STORAGE_RULES_FLAG}=="1", GOTO="persistent_storage_tape_end" + +# type 8 devices are "Medium Changers" +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="scsi_id --sg-version=3 --export --allowlisted -d $devnode", \ + SYMLINK+="tape/by-id/scsi-$env{ID_SERIAL}" + +# iSCSI devices from the same host have all the same ID_SERIAL, +# but additionally a property named ID_SCSI_SERIAL. +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SCSI_SERIAL}=="?*", \ + SYMLINK+="tape/by-id/scsi-$env{ID_SCSI_SERIAL}" + +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{builtin}="path_id", \ + SYMLINK+="tape/by-path/$env{ID_PATH}-changer" + +SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end" + +KERNEL=="st*[0-9]|nst*[0-9]", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394" +KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id" +KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", KERNELS=="[0-9]*:*[0-9]", ENV{.BSG_DEV}="$root/bsg/$id" +KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --allowlisted --export --device=$env{.BSG_DEV}", ENV{ID_BUS}="scsi" +KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}" +KERNEL=="st*[0-9]", ENV{ID_SCSI_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SCSI_SERIAL}" +KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst" +KERNEL=="nst*[0-9]", ENV{ID_SCSI_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SCSI_SERIAL}-nst" + +# by-path (parent device path) +KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{builtin}="path_id" +KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}" +KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst" + +LABEL="persistent_storage_tape_end" diff --git a/test/fuzz/fuzz-udev-rules/systemd.rules b/test/fuzz/fuzz-udev-rules/systemd.rules new file mode 100644 index 0000000000..278383b02c --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/systemd.rules @@ -0,0 +1,80 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +ACTION=="remove", GOTO="systemd_end" + +SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd" +KERNEL=="vport*", TAG+="systemd" + +SUBSYSTEM=="ubi", TAG+="systemd" + +SUBSYSTEM=="block", TAG+="systemd" + +# We can't make any conclusions about suspended DM devices so let's just import previous SYSTEMD_READY state and skip other rules +SUBSYSTEM=="block", ENV{DM_SUSPENDED}=="1", IMPORT{db}="SYSTEMD_READY", GOTO="systemd_end" +SUBSYSTEM=="block", ACTION=="add", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0" + +# Ignore encrypted devices with no identified superblock on it, since +# we are probably still calling mke2fs or mkswap on it. +SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="0" + +# Explicitly set SYSTEMD_READY=1 for DM devices that don't have it set yet, so that we always have something to import above +SUBSYSTEM=="block", ENV{DM_UUID}=="?*", ENV{SYSTEMD_READY}=="", ENV{SYSTEMD_READY}="1" + +# add symlink to GPT root disk +SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}!="crypto_LUKS", SYMLINK+="gpt-auto-root" +SUBSYSTEM=="block", ENV{ID_PART_GPT_AUTO_ROOT}=="1", ENV{ID_FS_TYPE}=="crypto_LUKS", SYMLINK+="gpt-auto-root-luks" +SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{DM_NAME}=="root", SYMLINK+="gpt-auto-root" + +# Ignore raid devices that are not yet assembled and started +SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0" +SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0" + +# Ignore loop devices that don't have any file attached +SUBSYSTEM=="block", KERNEL=="loop[0-9]*", ENV{DEVTYPE}=="disk", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0" + +# Ignore nbd devices until the PID file exists (which signals a connected device) +SUBSYSTEM=="block", KERNEL=="nbd*", ENV{DEVTYPE}=="disk", TEST!="pid", ENV{SYSTEMD_READY}="0" + +# We need a hardware independent way to identify network devices. We +# use the /sys/subsystem/ path for this. Kernel "bus" and "class" names +# should be treated as one namespace, like udev handles it. This is mostly +# just an identification string for systemd, so whether the path actually is +# accessible or not does not matter as long as it is unique and in the +# filesystem namespace. + +SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/net/devices/$name" +SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k" + +SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target" +ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target" +SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target" + +SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" +SUBSYSTEM=="usb", KERNEL=="lp*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" + +# Apply sysctl variables to network devices (and only to those) as they appear. +ACTION=="add", SUBSYSTEM=="net", KERNEL!="lo", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/net/ipv4/conf/$name --prefix=/net/ipv4/neigh/$name --prefix=/net/ipv6/conf/$name --prefix=/net/ipv6/neigh/$name" + +# Pull in backlight save/restore for all backlight devices and +# keyboard backlights +SUBSYSTEM=="backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@backlight:$name.service" +SUBSYSTEM=="leds", KERNEL=="*kbd_backlight", TAG+="systemd", IMPORT{builtin}="path_id", ENV{SYSTEMD_WANTS}+="systemd-backlight@leds:$name.service" + +# Pull in rfkill save/restore for all rfkill devices +SUBSYSTEM=="rfkill", ENV{SYSTEMD_RFKILL}="1" +SUBSYSTEM=="rfkill", IMPORT{builtin}="path_id" +SUBSYSTEM=="misc", KERNEL=="rfkill", TAG+="systemd", ENV{SYSTEMD_WANTS}+="systemd-rfkill.socket" + +# Asynchronously mount file systems implemented by these modules as soon as they are loaded. +SUBSYSTEM=="module", KERNEL=="fuse", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-fs-fuse-connections.mount" +SUBSYSTEM=="module", KERNEL=="configfs", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sys-kernel-config.mount" + +LABEL="systemd_end" diff --git a/test/fuzz/fuzz-udev-rules/touchpad.rules b/test/fuzz/fuzz-udev-rules/touchpad.rules new file mode 100644 index 0000000000..7bede02dec --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/touchpad.rules @@ -0,0 +1,13 @@ +# do not edit this file, it will be overwritten on update + +ACTION=="remove", GOTO="touchpad_end" +ENV{ID_INPUT}=="", GOTO="touchpad_end" +ENV{ID_INPUT_TOUCHPAD}=="", GOTO="touchpad_end" +KERNEL!="event*", GOTO="touchpad_end" + +# touchpad::vp:name::* +KERNELS=="input*", ENV{ID_BUS}!="", \ + IMPORT{builtin}="hwdb 'touchpad:$env{ID_BUS}:v$attr{id/vendor}p$attr{id/product}:name:$attr{name}:'", \ + GOTO="touchpad_end" + +LABEL="touchpad_end" diff --git a/test/fuzz/fuzz-udev-rules/udev-default.rules b/test/fuzz/fuzz-udev-rules/udev-default.rules new file mode 100644 index 0000000000..8e06c13388 --- /dev/null +++ b/test/fuzz/fuzz-udev-rules/udev-default.rules @@ -0,0 +1,86 @@ +# do not edit this file, it will be overwritten on update + +# run a command on remove events +ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" +ACTION=="remove", GOTO="default_end" + +SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" + +# select "system RTC" or just use the first one +SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc" +SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100" + +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb" +ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}" + +ACTION!="add", GOTO="default_end" + +SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666" +SUBSYSTEM=="tty", KERNEL=="tty", GROUP="tty", MODE="0666" +SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620" +SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620" +SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620" +SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620" +SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty" +KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" + +SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" + +SUBSYSTEM=="input", GROUP="input" +SUBSYSTEM=="input", KERNEL=="js[0-9]*", MODE="0664" + +SUBSYSTEM=="video4linux", GROUP="video" +SUBSYSTEM=="graphics", GROUP="video" +SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video" +SUBSYSTEM=="dvb", GROUP="video" +SUBSYSTEM=="media", GROUP="video" +SUBSYSTEM=="cec", GROUP="video" + +SUBSYSTEM=="drm", KERNEL=="renderD*", GROUP="render", MODE="0666" +SUBSYSTEM=="kfd", GROUP="render", MODE="0666" + +SUBSYSTEM=="sound", GROUP="audio", \ + OPTIONS+="static_node=snd/seq", OPTIONS+="static_node=snd/timer" + +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664" + +SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", GROUP="video" +SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", GROUP="video" +SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video" +SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video" + +KERNEL=="parport[0-9]*", GROUP="lp" +SUBSYSTEM=="printer", KERNEL=="lp*", GROUP="lp" +SUBSYSTEM=="ppdev", GROUP="lp" +KERNEL=="lp[0-9]*", GROUP="lp" +KERNEL=="irlpt[0-9]*", GROUP="lp" +SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp" + +SUBSYSTEM=="block", GROUP="disk" +SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom" +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" +KERNEL=="sch[0-9]*", GROUP="cdrom" +KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" +KERNEL=="pktcdvd", GROUP="cdrom" + +SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape" +SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk" +KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" +KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control" +KERNEL=="btrfs-control", GROUP="disk" +KERNEL=="rawctl", GROUP="disk" +SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", GROUP="disk" +SUBSYSTEM=="aoe", GROUP="disk", MODE="0220" +SUBSYSTEM=="aoe", KERNEL=="err", MODE="0440" + +KERNEL=="rfkill", MODE="0664" +KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun" + +KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse" + +# The static_node is required on s390x and ppc (they are using MODULE_ALIAS) +KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm" + +SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm" + +LABEL="default_end" diff --git a/test/fuzz/fuzz-unit-file/ask-password-console.path b/test/fuzz/fuzz-unit-file/ask-password-console.path new file mode 100644 index 0000000000..7eca92d219 --- /dev/null +++ b/test/fuzz/fuzz-unit-file/ask-password-console.path @@ -0,0 +1,22 @@ +path +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Dispatch Password Requests to Console Directory Watch +Documentation=man:systemd-ask-password-console.service(8) +DefaultDependencies=no +Conflicts=shutdown.target +After=plymouth-start.service +Before=paths.target shutdown.target cryptsetup.target +ConditionPathExists=!/run/plymouth/pid + +[Path] +DirectoryNotEmpty=/run/systemd/ask-password +MakeDirectory=yes diff --git a/test/fuzz/fuzz-unit-file/binfmt_misc.automount b/test/fuzz/fuzz-unit-file/binfmt_misc.automount new file mode 100644 index 0000000000..8d761b01b6 --- /dev/null +++ b/test/fuzz/fuzz-unit-file/binfmt_misc.automount @@ -0,0 +1,21 @@ +automount +# SPDX-License-Identifier: LGPL-2.1-or-later +# +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Arbitrary Executable File Formats File System Automount Point +Documentation=https://docs.kernel.org/admin-guide/binfmt-misc.html +Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems +DefaultDependencies=no +Before=sysinit.target +ConditionPathExists=/proc/sys/fs/binfmt_misc/ +ConditionPathIsReadWrite=/proc/sys/ + +[Automount] +Where=/proc/sys/fs/binfmt_misc diff --git a/test/fuzz/fuzz-unit-file/proc-sys-fs-binfmt_misc.automount b/test/fuzz/fuzz-unit-file/proc-sys-fs-binfmt_misc.automount deleted file mode 100644 index 8d761b01b6..0000000000 --- a/test/fuzz/fuzz-unit-file/proc-sys-fs-binfmt_misc.automount +++ /dev/null @@ -1,21 +0,0 @@ -automount -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -[Unit] -Description=Arbitrary Executable File Formats File System Automount Point -Documentation=https://docs.kernel.org/admin-guide/binfmt-misc.html -Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems -DefaultDependencies=no -Before=sysinit.target -ConditionPathExists=/proc/sys/fs/binfmt_misc/ -ConditionPathIsReadWrite=/proc/sys/ - -[Automount] -Where=/proc/sys/fs/binfmt_misc diff --git a/test/fuzz/fuzz-unit-file/systemd-ask-password-console.path b/test/fuzz/fuzz-unit-file/systemd-ask-password-console.path deleted file mode 100644 index 7eca92d219..0000000000 --- a/test/fuzz/fuzz-unit-file/systemd-ask-password-console.path +++ /dev/null @@ -1,22 +0,0 @@ -path -# SPDX-License-Identifier: LGPL-2.1-or-later -# -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -[Unit] -Description=Dispatch Password Requests to Console Directory Watch -Documentation=man:systemd-ask-password-console.service(8) -DefaultDependencies=no -Conflicts=shutdown.target -After=plymouth-start.service -Before=paths.target shutdown.target cryptsetup.target -ConditionPathExists=!/run/plymouth/pid - -[Path] -DirectoryNotEmpty=/run/systemd/ask-password -MakeDirectory=yes diff --git a/test/fuzz/fuzz-unit-file/systemd-tmpfiles-clean.timer b/test/fuzz/fuzz-unit-file/systemd-tmpfiles-clean.timer deleted file mode 100644 index 5bf91b9f4c..0000000000 --- a/test/fuzz/fuzz-unit-file/systemd-tmpfiles-clean.timer +++ /dev/null @@ -1,41 +0,0 @@ -timer -# SPDX-License-Identifier: LGPL-2.1-or-later -[Unit] -Description=Daily Cleanup of Temporary Directories -Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) - -[Timer] -OnBootSec=15min -OnUnitActiveSec=1d -OnBootSec=1s -OnStartupSec=234 -OnUnitActiveSec=2y -OnUnitInactiveSec=23434 -OnCalendar=minutely -OnCalendar=*-*-* *:*:00 -OnCalendar=hourly -OnCalendar=*-*-* *:00:00 -OnCalendar=daily -OnCalendar=*-*-* 00:00:00 -OnCalendar=monthly -OnCalendar=*-*-01 00:00:00 -OnCalendar=weekly -OnCalendar=Mon *-*-* 00:00:00 -OnCalendar=yearly -OnCalendar=*-01-01 00:00:00 -OnCalendar=quarterly -OnCalendar=*-01,04,07,10-01 00:00:00 -OnCalendar=semiannually -OnCalendar=*-01,07-01 00:00:00 -OnCalendar=Fri 2012-11-23 11:12:13 - -Persistent=true -AccuracySec=24h -RandomizedDelaySec=234234234 -FixedRandomDelay=true - -Persistent=no -Unit=foo.service - -WakeSystem=false -RemainAfterElapse=true diff --git a/test/fuzz/fuzz-unit-file/tmpfiles-clean.timer b/test/fuzz/fuzz-unit-file/tmpfiles-clean.timer new file mode 100644 index 0000000000..5bf91b9f4c --- /dev/null +++ b/test/fuzz/fuzz-unit-file/tmpfiles-clean.timer @@ -0,0 +1,41 @@ +timer +# SPDX-License-Identifier: LGPL-2.1-or-later +[Unit] +Description=Daily Cleanup of Temporary Directories +Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) + +[Timer] +OnBootSec=15min +OnUnitActiveSec=1d +OnBootSec=1s +OnStartupSec=234 +OnUnitActiveSec=2y +OnUnitInactiveSec=23434 +OnCalendar=minutely +OnCalendar=*-*-* *:*:00 +OnCalendar=hourly +OnCalendar=*-*-* *:00:00 +OnCalendar=daily +OnCalendar=*-*-* 00:00:00 +OnCalendar=monthly +OnCalendar=*-*-01 00:00:00 +OnCalendar=weekly +OnCalendar=Mon *-*-* 00:00:00 +OnCalendar=yearly +OnCalendar=*-01-01 00:00:00 +OnCalendar=quarterly +OnCalendar=*-01,04,07,10-01 00:00:00 +OnCalendar=semiannually +OnCalendar=*-01,07-01 00:00:00 +OnCalendar=Fri 2012-11-23 11:12:13 + +Persistent=true +AccuracySec=24h +RandomizedDelaySec=234234234 +FixedRandomDelay=true + +Persistent=no +Unit=foo.service + +WakeSystem=false +RemainAfterElapse=true