systemd/0232-meson-Generate-fuzzer-inputs-with-directives.patch
Jan Macku 2a07d74ee6 systemd-252-14
Resolves: #2176918,#2180120
2023-03-21 14:10:11 +01:00

2561 lines
50 KiB
Diff

From fd7d93a34d8ef8a194544dba9763e8d58a805641 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <mkoutny@suse.com>
Date: Thu, 6 Oct 2022 16:48:01 +0200
Subject: [PATCH] meson: Generate fuzzer inputs with directives
The lists of directives for fuzzer tests are maintained manually in the
repo. There is a tools/check-directives.sh script that runs during test
phase and reports stale directive lists.
Let's rework the script into a generator so that these directive files
are created on-the-flight and needn't be updated whenever a unit file
directives change. The scripts is rewritten in Python to get rid of gawk
dependency and each generated file is a separate meson target so that
incremental builds refresh what is just necessary (and parallelize
(negligible)).
Note: test/fuzz/fuzz-unit-file/directives-all.slice is kept since there
is not automated way to generate it (it is not covered by the check
script neither).
(cherry picked from commit 7e343b530e68c55f868a4a8261824ca543319a52)
Related: #2176918
---
meson.build | 31 +-
test/fuzz/fuzz-link-parser/directives.link | 97 ---
.../fuzz/fuzz-netdev-parser/directives.netdev | 258 --------
test/fuzz/fuzz-network-parser/directives | 595 ------------------
test/fuzz/fuzz-unit-file/directives.automount | 6 -
test/fuzz/fuzz-unit-file/directives.mount | 216 -------
test/fuzz/fuzz-unit-file/directives.path | 12 -
test/fuzz/fuzz-unit-file/directives.scope | 68 --
test/fuzz/fuzz-unit-file/directives.service | 370 -----------
test/fuzz/fuzz-unit-file/directives.slice | 58 --
test/fuzz/fuzz-unit-file/directives.socket | 266 --------
test/fuzz/fuzz-unit-file/directives.swap | 210 -------
test/fuzz/fuzz-unit-file/directives.timer | 17 -
test/fuzz/generate-directives.py | 26 +
test/fuzz/meson.build | 50 +-
tools/check-directives.sh | 72 ---
16 files changed, 87 insertions(+), 2265 deletions(-)
delete mode 100644 test/fuzz/fuzz-link-parser/directives.link
delete mode 100644 test/fuzz/fuzz-netdev-parser/directives.netdev
delete mode 100644 test/fuzz/fuzz-network-parser/directives
delete mode 100644 test/fuzz/fuzz-unit-file/directives.automount
delete mode 100644 test/fuzz/fuzz-unit-file/directives.mount
delete mode 100644 test/fuzz/fuzz-unit-file/directives.path
delete mode 100644 test/fuzz/fuzz-unit-file/directives.scope
delete mode 100644 test/fuzz/fuzz-unit-file/directives.service
delete mode 100644 test/fuzz/fuzz-unit-file/directives.slice
delete mode 100644 test/fuzz/fuzz-unit-file/directives.socket
delete mode 100644 test/fuzz/fuzz-unit-file/directives.swap
delete mode 100644 test/fuzz/fuzz-unit-file/directives.timer
create mode 100644 test/fuzz/generate-directives.py
delete mode 100755 tools/check-directives.sh
diff --git a/meson.build b/meson.build
index dc7388cfe3..5b2e7ca172 100644
--- a/meson.build
+++ b/meson.build
@@ -3997,6 +3997,7 @@ foreach tuple : fuzzers
else
sources += 'src/fuzz/fuzz-main.c'
endif
+ sources += fuzz_generated_directives
# FIXME: Use fs.stem() with meson >= 0.54.0
name = '@0@'.format(sources[0]).split('/')[-1].split('.')[0]
@@ -4016,11 +4017,14 @@ foreach tuple : fuzzers
if want_tests != 'false' and name in fuzz_regression_tests
# Run the fuzz regression tests without any sanitizers enabled.
# Additional invocations with sanitizers may be added below.
- foreach fuzz_in : fuzz_regression_tests[name]
+ foreach tuple : fuzz_regression_tests[name]
+ fuzz_dir = tuple[0]
+ fuzz_in = tuple[1]
test('@0@_@1@'.format(name, fuzz_in),
exe,
suite : 'fuzzers',
- args : [project_source_root / fuzz_testsdir / name / fuzz_in])
+ args : [fuzz_dir != '' ? project_source_root / fuzz_dir / name / fuzz_in
+ : fuzz_generated_in_dir / '@0@_@1@'.format(name, fuzz_in)])
endforeach
endif
endforeach
@@ -4109,19 +4113,6 @@ foreach exec : public_programs
endif
endforeach
-############################################################
-
-check_directives_sh = find_program('tools/check-directives.sh')
-
-if want_tests != 'false'
- test('check-directives',
- check_directives_sh,
- suite : 'dist-check',
- args : [project_source_root, project_build_root])
-endif
-
-############################################################
-
# Enable tests for all supported sanitizers
foreach tuple : fuzz_sanitizers
sanitizer = tuple[0]
@@ -4141,20 +4132,24 @@ foreach tuple : fuzz_sanitizers
exe = custom_target(
name,
output : name,
- depends : build,
+ depends : [build] + fuzz_generated_directives,
command : [ln, '-fs',
build.full_path() / fuzzer,
'@OUTPUT@'],
build_by_default : true)
- foreach fuzz_in : fuzz_ins
+ foreach tuple : fuzz_ins
+ fuzz_dir = tuple[0]
+ fuzz_in = tuple[1]
+
test('@0@_@1@_@2@'.format(fuzzer, fuzz_in, sanitizer),
env,
suite : 'fuzz+san',
env : ['UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1'],
timeout : 60,
args : [exe.full_path(),
- project_source_root / fuzz_testsdir / fuzzer / fuzz_in])
+ fuzz_dir != '' ? project_source_root / fuzz_dir / fuzzer / fuzz_in
+ : fuzz_generated_in_dir / '@0@_@1@'.format(fuzzer, fuzz_in)])
endforeach
endforeach
endif
diff --git a/test/fuzz/fuzz-link-parser/directives.link b/test/fuzz/fuzz-link-parser/directives.link
deleted file mode 100644
index a1c797a297..0000000000
--- a/test/fuzz/fuzz-link-parser/directives.link
+++ /dev/null
@@ -1,97 +0,0 @@
-[Match]
-Architecture=
-Credential=
-Driver=
-Firmware=
-Host=
-KernelCommandLine=
-KernelVersion=
-Kind=
-MACAddress=
-OriginalName=
-Path=
-PermanentMACAddress=
-Property=
-Type=
-Virtualization=
-[Link]
-Description=
-MACAddressPolicy=
-MACAddress=
-NamePolicy=
-Name=
-AlternativeNamesPolicy=
-AlternativeName=
-Alias=
-TransmitQueues=
-ReceiveQueues=
-TransmitQueueLength=
-MTUBytes=
-BitsPerSecond=
-Duplex=
-AutoNegotiation=
-WakeOnLan=
-WakeOnLanPassword=
-Port=
-ReceiveChecksumOffload=
-TransmitChecksumOffload=
-GenericSegmentationOffload=
-TCPSegmentationOffload=
-TCP6SegmentationOffload=
-UDPSegmentationOffload=
-GenericReceiveOffload=
-GenericReceiveOffloadHardware=
-LargeReceiveOffload=
-ReceiveVLANCTAGHardwareAcceleration=
-TransmitVLANCTAGHardwareAcceleration=
-ReceiveVLANCTAGFilter=
-TransmitVLANSTAGHardwareAcceleration=
-NTupleFilter=
-RxChannels=
-TxChannels=
-OtherChannels=
-CombinedChannels=
-Advertise=
-RxBufferSize=
-RxMiniBufferSize=
-RxJumboBufferSize=
-TxBufferSize=
-RxFlowControl=
-TxFlowControl=
-AutoNegotiationFlowControl=
-GenericSegmentOffloadMaxBytes=
-GenericSegmentOffloadMaxSegments=
-RxCoalesceSec=
-RxMaxCoalescedFrames=
-RxCoalesceIrqSec=
-RxMaxCoalescedIrqFrames=
-TxCoalesceSec=
-TxMaxCoalescedFrames=
-TxCoalesceIrqSec=
-TxMaxCoalescedIrqFrames=
-StatisticsBlockCoalesceSec=
-UseAdaptiveRxCoalesce=
-UseAdaptiveTxCoalesce=
-CoalescePacketRateLow=
-RxCoalesceLowSec=
-RxMaxCoalescedLowFrames=
-TxCoalesceLowSec=
-TxMaxCoalescedLowFrames=
-CoalescePacketRateHigh=
-RxCoalesceHighSec=
-RxMaxCoalescedHighFrames=
-TxCoalesceHighSec=
-TxMaxCoalescedHighFrames=
-CoalescePacketRateSampleIntervalSec=
-MDI=
-SR-IOVVirtualFunctions=
-[SR-IOV]
-VirtualFunction=
-MACSpoofCheck=
-VLANId=
-VLANProtocol=
-QualityOfService=
-QueryReceiveSideScaling=
-Trust=
-LinkState=
-MACAddress=
diff --git a/test/fuzz/fuzz-netdev-parser/directives.netdev b/test/fuzz/fuzz-netdev-parser/directives.netdev
deleted file mode 100644
index 309941f58d..0000000000
--- a/test/fuzz/fuzz-netdev-parser/directives.netdev
+++ /dev/null
@@ -1,258 +0,0 @@
-[VLAN]
-MVRP=
-LooseBinding=
-ReorderHeader=
-Id=
-GVRP=
-Protocol=
-EgressQOSMaps=
-IngressQOSMaps=
-[MACVLAN]
-Mode=
-SourceMACAddress=
-BroadcastMulticastQueueLength=
-[WireGuard]
-ListenPort=
-PrivateKey=
-PrivateKeyFile=
-FwMark=
-FirewallMark=
-RouteTable=
-RouteMetric=
-[MACVTAP]
-Mode=
-SourceMACAddress=
-[Match]
-Architecture=
-Credential=
-Firmware=
-Host=
-KernelCommandLine=
-KernelVersion=
-Virtualization=
-[GENEVE]
-DestinationPort=
-TTL=
-UDP6ZeroCheckSumTx=
-TOS=
-Id=
-UDPChecksum=
-UDP6ZeroChecksumTx=
-FlowLabel=
-UDP6ZeroChecksumRx=
-Remote=
-UDP6ZeroCheckSumRx=
-IPDoNotFragment=
-[Bridge]
-ForwardDelaySec=
-HelloTimeSec=
-MaxAgeSec=
-STP=
-MulticastSnooping=
-DefaultPVID=
-MulticastQuerier=
-AgeingTimeSec=
-Priority=
-GroupForwardMask=
-VLANFiltering=
-VLANProtocol=
-MulticastIGMPVersion=
-[VRF]
-TableId=
-Table=
-[Peer]
-MACAddress=
-Name=
-[WireGuardPeer]
-Endpoint=
-PresharedKey=
-PresharedKeyFile=
-PersistentKeepalive=
-PublicKey=
-AllowedIPs=
-RouteTable=
-RouteMetric=
-[Tunnel]
-FooOverUDP=
-IPv6FlowLabel=
-Remote=
-AllowLocalRemote=
-Local=
-TOS=
-Independent=
-AssignToLoopback=
-Key=
-InputKey=
-Encapsulation=
-Mode=
-OutputKey=
-DiscoverPathMTU=
-FOUDestinationPort=
-CopyDSCP=
-EncapsulationLimit=
-TTL=
-FOUSourcePort=
-IPv6RapidDeploymentPrefix=
-ERSPANVersion=
-ERSPANIndex=
-ERSPANDirection=
-ERSPANHardwareId=
-SerializeTunneledPackets=
-ISATAP=
-External=
-[VXLAN]
-UDP6ZeroChecksumRx=
-ARPProxy=
-FlowLabel=
-Local=
-RemoteChecksumTx=
-RouteShortCircuit=
-Remote=
-L3MissNotification=
-Group=
-FDBAgeingSec=
-MacLearning=
-Id=
-VNI=
-RemoteChecksumRx=
-TOS=
-L2MissNotification=
-UDP6ZeroChecksumTx=
-UDP6ZeroCheckSumRx=
-UDPCheckSum=
-GroupPolicyExtension=
-GenericProtocolExtension=
-MaximumFDBEntries=
-TTL=
-DestinationPort=
-ReduceARPProxy=
-PortRange=
-UDPChecksum=
-UDP6ZeroCheckSumTx=
-IPDoNotFragment=
-Independent=
-[VXCAN]
-Peer=
-[Bond]
-LearnPacketIntervalSec=
-TransmitHashPolicy=
-MIIMonitorSec=
-PacketsPerSlave=
-DownDelaySec=
-PrimaryReselectPolicy=
-ResendIGMP=
-ARPAllTargets=
-AdActorSystemPriority=
-UpDelaySec=
-AdSelect=
-AdActorSystem=
-AdUserPortKey=
-FailOverMACPolicy=
-ARPValidate=
-Mode=
-GratuitousARP=
-ARPIPTargets=
-MinLinks=
-LACPTransmitRate=
-ARPIntervalSec=
-AllSlavesActive=
-DynamicTransmitLoadBalancing=
-[FooOverUDP]
-Protocol=
-Port=
-PeerPort=
-Encapsulation=
-Local=
-Peer=
-[Tap]
-MultiQueue=
-OneQueue=
-User=
-Group=
-PacketInfo=
-VNetHeader=
-KeepCarrier=
-[IPVLAN]
-Mode=
-Flags=
-[IPVTAP]
-Mode=
-Flags=
-[Tun]
-OneQueue=
-MultiQueue=
-PacketInfo=
-VNetHeader=
-Group=
-User=
-KeepCarrier=
-[NetDev]
-Kind=
-MACAddress=
-MTUBytes=
-Description=
-Name=
-[L2TP]
-TunnelId=
-PeerTunnelId=
-UDPSourcePort=
-UDPDestinationPort=
-Local=
-Remote=
-EncapsulationType=
-UDPCheckSum=
-UDP6CheckSumRx=
-UDP6CheckSumTx=
-[L2TPSession]
-SessionId=
-PeerSessionId=
-Layer2SpecificHeader=
-Name=
-[MACsec]
-Port=
-Encrypt=
-[MACsecReceiveAssociation]
-Port=
-MACAddress=
-PacketNumber=
-KeyId=
-Key=
-KeyFile=
-Activate=
-UseForEncoding=
-[MACsecReceiveChannel]
-Port=
-MACAddress=
-[MACsecTransmitAssociation]
-PacketNumber=
-KeyId=
-Key=
-KeyFile=
-Activate=
-[Xfrm]
-Independent=
-InterfaceId=
-[BareUDP]
-DestinationPort=
-EtherType=
-[BatmanAdvanced]
-GatewayMode=
-Aggregation=
-BridgeLoopAvoidance=
-DistributedArpTable=
-Fragmentation=
-HopPenalty=
-OriginatorIntervalSec=
-GatewayBandwithDown=
-GatewayBandwithUp=
-GatewayBandwidthDown=
-GatewayBandwidthUp=
-RoutingAlgorithm=
-[IPoIB]
-PartitionKey=
-Mode=
-IgnoreUserspaceMulticastGroups=
-[WLAN]
-PhysicalDevice=
-Type=
-WDS=
diff --git a/test/fuzz/fuzz-network-parser/directives b/test/fuzz/fuzz-network-parser/directives
deleted file mode 100644
index 171322ef20..0000000000
--- a/test/fuzz/fuzz-network-parser/directives
+++ /dev/null
@@ -1,595 +0,0 @@
-[Bridge]
-Cost=
-UseBPDU=
-HairPin=
-Isolated=
-UnicastFlood=
-FastLeave=
-Priority=
-AllowPortToBeRoot=
-MulticastToUnicast=
-MulticastFlood=
-NeighborSuppression=
-Learning=
-ProxyARP=
-ProxyARPWiFi=
-MulticastRouter=
-[Match]
-Architecture=
-BSSID=
-Credential=
-Driver=
-Firmware=
-Host=
-KernelCommandLine=
-KernelVersion=
-Kind=
-MACAddress=
-Name=
-Path=
-PermanentMACAddress=
-Property=
-SSID=
-Type=
-Virtualization=
-WLANInterfaceType=
-[Link]
-ActivationPolicy=
-RequiredForOnline=
-RequiredFamilyForOnline=
-ARP=
-AllMulticast=
-Unmanaged=
-MTUBytes=
-Multicast=
-MACAddress=
-Group=
-Promiscuous=
-[SR-IOV]
-VirtualFunction=
-MACSpoofCheck=
-VLANId=
-VLANProtocol=
-QualityOfService=
-QueryReceiveSideScaling=
-Trust=
-LinkState=
-MACAddress=
-[BridgeFDB]
-VLANId=
-MACAddress=
-Destination=
-VNI=
-AssociatedWith=
-OutgoingInterface=
-[BridgeMDB]
-MulticastGroupAddress=
-VLANId=
-[DHCP]
-UseDomains=
-UseRoutes=
-IAID=
-UserClass=
-UseNTP=
-RapidCommit=
-ForceDHCPv6PDOtherInformation=
-UseMTU=
-UseDomainName=
-RouteMetric=
-SendHostname=
-Anonymize=
-VendorClassIdentifier=
-Hostname=
-DUIDType=
-UseHostname=
-UseDNS=
-CriticalConnection=
-DUIDRawData=
-RequestBroadcast=
-ClientIdentifier=
-ListenPort=
-UseTimezone=
-RouteTable=
-[DHCPv4]
-UseDNS=
-RoutesToDNS=
-UseDomains=
-UseRoutes=
-UseGateway=
-IAID=
-UserClass=
-UseNTP=
-RoutesToNTP=
-UseSIP=
-UseMTU=
-UseDomainName=
-RouteMetric=
-SendHostname=
-Anonymize=
-VendorClassIdentifier=
-Hostname=
-DUIDType=
-UseHostname=
-Label=
-CriticalConnection=
-DUIDRawData=
-RequestBroadcast=
-ClientIdentifier=
-ListenPort=
-UseTimezone=
-RouteTable=
-DenyList=
-BlackList=
-AllowList=
-RequestOptions=
-SendRelease=
-MaxAttempts=
-IPServiceType=
-SendOption=
-SendVendorOption=
-SendDecline=
-MUDURL=
-RouteMTUBytes=
-FallbackLeaseLifetimeSec=
-Use6RD=
-NetLabel=
-[DHCPv6]
-UseAddress=
-UseDelegatedPrefix=
-UseNTP=
-UseDNS=
-UseHostname=
-UseDomains=
-RapidCommit=
-ForceDHCPv6PDOtherInformation=
-PrefixDelegationHint=
-WithoutRA=
-MUDURL=
-SendOption=
-RequestOptions=
-UserClass=
-VendorClass=
-SendVendorOption=
-RouteMetric=
-IAID=
-DUIDType=
-DUIDRawData=
-NetLabel=
-[DHCPv6PrefixDelegation]
-SubnetId=
-Announce=
-Assign=
-ManageTemporaryAddress=
-Token=
-RouteMetric=
-NetLabel=
-[DHCPPrefixDelegation]
-UplinkInterface=
-SubnetId=
-Announce=
-Assign=
-ManageTemporaryAddress=
-Token=
-RouteMetric=
-NetLabel=
-[Route]
-Destination=
-Protocol=
-Table=
-Gateway=
-InitialAdvertisedReceiveWindow=
-GatewayOnLink=
-GatewayOnlink=
-Type=
-InitialCongestionWindow=
-IPv6Preference=
-PreferredSource=
-Scope=
-MTUBytes=
-QuickAck=
-FastOpenNoCookie=
-Source=
-Metric=
-TTLPropagate=
-MultiPathRoute=
-TCPAdvertisedMaximumSegmentSize=
-TCPCongestionControlAlgorithm=
-NextHop=
-[Network]
-KeepMaster=
-IPv6DuplicateAddressDetection=
-IPMasquerade=
-ProxyARP=
-PrimarySlave=
-IPv4LLRoute=
-DefaultRouteOnDevice=
-Address=
-IPv6ProxyNDPAddress=
-IPv6AcceptRA=
-IPv6AcceptRouterAdvertisements=
-IPv4AcceptLocal=
-IPv4RouteLocalnet=
-DNSSECNegativeTrustAnchors=
-MACVTAP=
-IPv6PrivacyExtensions=
-MACVLAN=
-MulticastDNS=
-LLDP=
-Tunnel=
-Gateway=
-IPv4LL=
-IPVLAN=
-IPVTAP=
-EmitLLDP=
-IPv6MTUBytes=
-IPv4ProxyARP=
-Bridge=
-DNSOverTLS=
-Bond=
-IPv6ProxyNDP=
-DNS=
-DNSDefaultRoute=
-ActiveSlave=
-LLMNR=
-DNSSEC=
-IPv6HopLimit=
-IPForward=
-IPv6Token=
-Xfrm=
-Description=
-VXLAN=
-L2TP=
-MACsec=
-LinkLocalAddressing=
-IPv4LLStartAddress=
-IPv6LinkLocalAddressGenerationMode=
-IPv6StableSecretAddress=
-ConfigureWithoutCarrier=
-NTP=
-DHCP=
-Domains=
-IPv6SendRA=
-IPv6PrefixDelegation=
-VLAN=
-DHCPServer=
-BindCarrier=
-VRF=
-IgnoreCarrierLoss=
-KeepConfiguration=
-DHCPv6PrefixDelegation=
-DHCPPrefixDelegation=
-BatmanAdvanced=
-IPoIB=
-[IPv6Prefix]
-Prefix=
-OnLink=
-PreferredLifetimeSec=
-AddressAutoconfiguration=
-ValidLifetimeSec=
-Assign=
-Token=
-RouteMetric=
-[IPv6RoutePrefix]
-Route=
-LifetimeSec=
-[BridgeVLAN]
-EgressUntagged=
-VLAN=
-PVID=
-[LLDP]
-MUDURL=
-[CAN]
-SamplePoint=
-BitRate=
-TimeQuantaNSec=
-PropagationSegment=
-PhaseBufferSegment1=
-PhaseBufferSegment2=
-SyncJumpWidth=
-DataSamplePoint=
-DataBitRate=
-DataTimeQuantaNSec=
-DataPropagationSegment=
-DataPhaseBufferSegment1=
-DataPhaseBufferSegment2=
-DataSyncJumpWidth=
-FDMode=
-FDNonISO=
-RestartSec=
-TripleSampling=
-BusErrorReporting=
-Termination=
-ListenOnly=
-Loopback=
-OneShot=
-PresumeACK=
-ClassicDataLengthCode=
-[IPoIB]
-Mode=
-IgnoreUserspaceMulticastGroups=
-[Address]
-DuplicateAddressDetection=
-AutoJoin=
-PreferredLifetime=
-Address=
-Scope=
-HomeAddress=
-PrefixRoute=
-AddPrefixRoute=
-ManageTemporaryAddress=
-Broadcast=
-Peer=
-Label=
-RouteMetric=
-[RoutingPolicyRule]
-Table=
-IncomingInterface=
-To=
-OutgoingInterface=
-From=
-TypeOfService=
-Priority=
-FirewallMark=
-SourcePort=
-DestinationPort=
-IPProtocol=
-InvertRule=
-Family=
-SuppressPrefixLength=
-SuppressInterfaceGroup=
-User=
-Type=
-[IPv6SendRA]
-RouterPreference=
-DNSLifetimeSec=
-DNS=
-RouterLifetimeSec=
-Domains=
-EmitDNS=
-EmitDomains=
-Managed=
-OtherInformation=
-UplinkInterface=
-NetLabel=
-[IPv6PrefixDelegation]
-RouterPreference=
-DNSLifetimeSec=
-DNS=
-RouterLifetimeSec=
-Domains=
-EmitDNS=
-EmitDomains=
-Managed=
-OtherInformation=
-[Neighbor]
-Address=
-LinkLayerAddress=
-MACAddress=
-[IPv6AddressLabel]
-Label=
-Prefix=
-[IPv6AcceptRA]
-UseDomains=
-UseMTU=
-RouteTable=
-RouteMetric=
-UseDNS=
-DHCPv6Client=
-UseGateway=
-UseRoutePrefix=
-UseAutonomousPrefix=
-UseOnLinkPrefix=
-RouterAllowList=
-RouterDenyList=
-PrefixAllowList=
-PrefixDenyList=
-RouteAllowList=
-RouteDenyList=
-DenyList=
-BlackList=
-Token=
-[DHCPServer]
-EmitNTP=
-PoolSize=
-PoolOffset=
-Timezone=
-EmitDNS=
-NTP=
-EmitSIP=
-SIP=
-EmitPOP3=
-POP3=
-EmitSMTP=
-SMTP=
-EmitLPR=
-LPR=
-EmitRouter=
-Router=
-MaxLeaseTimeSec=
-DefaultLeaseTimeSec=
-EmitTimezone=
-DNS=
-SendOption=
-SendVendorOption=
-BindToInterface=
-RelayTarget=
-RelayAgentCircuitId=
-RelayAgentRemoteId=
-ServerAddress=
-UplinkInterface=
-BootServerAddress=
-BootServerName=
-BootFilename=
-[DHCPServerStaticLease]
-MACAddress=
-Address=
-[NextHop]
-Id=
-Gateway=
-Family=
-OnLink=
-Blackhole=
-Group=
-[QDisc]
-Parent=
-Handle=
-[NetworkEmulator]
-Parent=
-Handle=
-DelaySec=
-DelayJitterSec=
-LossRate=
-DuplicateRate=
-PacketLimit=
-[TokenBucketFilter]
-Parent=
-Handle=
-Rate=
-BurstBytes=
-Burst=
-LimitBytes=
-LimitSize=
-MTUBytes=
-MPUBytes=
-PeakRate=
-LatencySec=
-[StochasticFairnessQueueing]
-Parent=
-Handle=
-PerturbPeriodSec=
-[FairQueueingControlledDelay]
-Parent=
-Handle=
-PacketLimit=
-MemoryLimitBytes=
-MemoryLimit=
-Flows=
-QuantumBytes=
-Quantum=
-TargetSec=
-IntervalSec=
-CEThresholdSec=
-ECN=
-[FairQueueing]
-Parent=
-Handle=
-PacketLimit=
-FlowLimit=
-QuantumBytes=
-Quantum=
-InitialQuantumBytes=
-InitialQuantum=
-MaximumRate=
-Buckets=
-OrphanMask=
-Pacing=
-CEThresholdSec=
-[ControlledDelay]
-Parent=
-Handle=
-PacketLimit=
-TargetSec=
-IntervalSec=
-CEThresholdSec=
-ECN=
-[CAKE]
-Parent=
-Handle=
-Bandwidth=
-AutoRateIngress=
-OverheadBytes=
-MPUBytes=
-CompensationMode=
-UseRawPacketSize=
-FlowIsolationMode=
-NAT=
-PriorityQueueingPreset=
-FirewallMark=
-Wash=
-SplitGSO=
-[TrafficControlQueueingDiscipline]
-Parent=
-NetworkEmulatorDelaySec=
-NetworkEmulatorDelayJitterSec=
-NetworkEmulatorLossRate=
-NetworkEmulatorDuplicateRate=
-NetworkEmulatorPacketLimit=
-[TrivialLinkEqualizer]
-Parent=
-Handle=
-Id=
-[HierarchyTokenBucket]
-Parent=
-Handle=
-DefaultClass=
-RateToQuantum=
-[HierarchyTokenBucketClass]
-Parent=
-ClassId=
-Priority=
-QuantumBytes=
-MTUBytes=
-OverheadBytes=
-Rate=
-CeilRate=
-BufferBytes=
-CeilBufferBytes=
-[BFIFO]
-Parent=
-Handle=
-LimitBytes=
-[PFIFO]
-Parent=
-Handle=
-PacketLimit=
-[PFIFOHeadDrop]
-Parent=
-Handle=
-PacketLimit=
-[PFIFOFast]
-Parent=
-Handle=
-[GenericRandomEarlyDetection]
-Parent=
-Handle=
-VirtualQueues=
-DefaultVirtualQueue=
-GenericRIO=
-[StochasticFairBlue]
-Parent=
-Handle=
-PacketLimit=
-[PIE]
-Parent=
-Handle=
-PacketLimit=
-[QuickFairQueueing]
-Parent=
-Handle=
-[QuickFairQueueingClass]
-Parent=
-ClassId=
-Weight=
-MaxPacketBytes=
-[DeficitRoundRobinScheduler]
-Parent=
-Handle=
-[DeficitRoundRobinSchedulerClass]
-Parent=
-ClassId=
-QuantumBytes=
-[EnhancedTransmissionSelection]
-Parent=
-Handle=
-Bands=
-StrictBands=
-QuantumBytes=
-PriorityMap=
-[HeavyHitterFilter]
-Parent=
-Handle=
-PacketLimit=
-[FlowQueuePIE]
-Parent=
-Handle=
-PacketLimit=
diff --git a/test/fuzz/fuzz-unit-file/directives.automount b/test/fuzz/fuzz-unit-file/directives.automount
deleted file mode 100644
index fd0ce64a2e..0000000000
--- a/test/fuzz/fuzz-unit-file/directives.automount
+++ /dev/null
@@ -1,6 +0,0 @@
-automount
-[Automount]
-DirectoryMode=
-TimeoutIdleSec=
-Where=
-ExtraOptions=
diff --git a/test/fuzz/fuzz-unit-file/directives.mount b/test/fuzz/fuzz-unit-file/directives.mount
deleted file mode 100644
index 0a44328e5c..0000000000
--- a/test/fuzz/fuzz-unit-file/directives.mount
+++ /dev/null
@@ -1,216 +0,0 @@
-mount
-[Mount]
-AllowedCPUs=
-AllowedMemoryNodes=
-AmbientCapabilities=
-AppArmorProfile=
-BPFProgram=
-ExecSearchPath=
-BindPaths=
-BindReadOnlyPaths=
-BlockIOAccounting=
-BlockIODeviceWeight=
-BlockIOReadBandwidth=
-BlockIOWeight=
-BlockIOWriteBandwidth=
-CPUAccounting=
-CPUAffinity=
-CPUQuota=
-CPUQuotaPeriodSec=
-CPUSchedulingPolicy=
-CPUSchedulingPriority=
-CPUSchedulingResetOnFork=
-CPUShares=
-CPUWeight=
-CacheDirectory=
-CacheDirectoryMode=
-Capabilities=
-CapabilityBoundingSet=
-ConfigurationDirectory=
-ConfigurationDirectoryMode=
-CoredumpFilter=
-DefaultMemoryLow=
-DefaultMemoryMin=
-Delegate=
-DeviceAllow=
-DevicePolicy=
-DirectoryMode=
-DisableControllers=
-DynamicUser=
-Environment=
-EnvironmentFile=
-ExecPaths=
-ExtensionDirectories=
-ExtensionImages=
-FinalKillSignal=
-ForceUnmount=
-Group=
-IOAccounting=
-IODeviceLatencyTargetSec=
-IODeviceWeight=
-IOReadBandwidthMax=
-IOReadIOPSMax=
-IOSchedulingClass=
-IOSchedulingPriority=
-IOWeight=
-IOWriteBandwidthMax=
-IOWriteIOPSMax=
-IPAccounting=
-IPAddressAllow=
-IPAddressDeny=
-IPCNamespacePath=
-IPEgressFilterPath=
-IPIngressFilterPath=
-IgnoreSIGPIPE=
-InaccessibleDirectories=
-InaccessiblePaths=
-KeyringMode=
-KillMode=
-KillSignal=
-LazyUnmount=
-LimitAS=
-LimitCORE=
-LimitCPU=
-LimitDATA=
-LimitFSIZE=
-LimitLOCKS=
-LimitMEMLOCK=
-LimitMSGQUEUE=
-LimitNICE=
-LimitNOFILE=
-LimitNPROC=
-LimitRSS=
-LimitRTPRIO=
-LimitRTTIME=
-LimitSIGPENDING=
-LimitSTACK=
-LoadCredential=
-LoadCredentialEncrypted=
-LockPersonality=
-LogExtraFields=
-LogLevelMax=
-LogNamespace=
-LogRateLimitBurst=
-LogRateLimitIntervalSec=
-LogsDirectory=
-LogsDirectoryMode=
-ManagedOOMMemoryPressure=
-ManagedOOMMemoryPressureLimit=
-ManagedOOMPreference=
-ManagedOOMSwap=
-MemoryAccounting=
-MemoryDenyWriteExecute=
-MemoryHigh=
-MemoryLimit=
-MemoryLow=
-MemoryMax=
-MemoryMin=
-MemorySwapMax=
-MountAPIVFS=
-MountFlags=
-MountImages=
-NUMAMask=
-NUMAPolicy=
-NetClass=
-NetworkNamespacePath=
-Nice=
-NoExecPaths=
-NoNewPrivileges=
-OOMScoreAdjust=
-Options=
-PAMName=
-PassEnvironment=
-Personality=
-PrivateDevices=
-PrivateIPC=
-PrivateMounts=
-PrivateNetwork=
-PrivateTmp=
-PrivateUsers=
-ProcSubset=
-ProtectClock=
-ProtectControlGroups=
-ProtectHome=
-ProtectHostname=
-ProtectKernelLogs=
-ProtectKernelModules=
-ProtectKernelTunables=
-ProtectProc=
-ProtectSystem=
-ReadOnlyDirectories=
-ReadOnlyPaths=
-ReadWriteDirectories=
-ReadWriteOnly=
-ReadWritePaths=
-RemoveIPC=
-RestartKillSignal=
-RestrictAddressFamilies=
-RestrictFileSystems=
-RestrictNamespaces=
-RestrictNetworkInterfaces=
-RestrictRealtime=
-RestrictSUIDSGID=
-RootDirectory=
-RootHash=
-RootHashSignature=
-RootImage=
-RootImageOptions=
-RootVerity=
-RuntimeDirectory=
-RuntimeDirectoryMode=
-RuntimeDirectoryPreserve=
-SELinuxContext=
-SecureBits=
-SendSIGHUP=
-SendSIGKILL=
-SetCredential=
-SetCredentialEncrypted=
-Slice=
-SloppyOptions=
-SmackProcessLabel=
-SocketBindAllow=
-SocketBindDeny=
-StandardError=
-StandardInput=
-StandardInputData=
-StandardInputText=
-StandardOutput=
-StartupAllowedCPUs=
-StartupAllowedMemoryNodes=
-StartupBlockIOWeight=
-StartupCPUShares=
-StartupCPUWeight=
-StartupIOWeight=
-StateDirectory=
-StateDirectoryMode=
-SupplementaryGroups=
-SyslogFacility=
-SyslogIdentifier=
-SyslogLevel=
-SyslogLevelPrefix=
-SystemCallArchitectures=
-SystemCallErrorNumber=
-SystemCallFilter=
-SystemCallLog=
-TTYPath=
-TTYReset=
-TTYVHangup=
-TTYVTDisallocate=
-TTYRows=
-TTYColumns=
-TasksAccounting=
-TasksMax=
-TemporaryFileSystem=
-TimeoutCleanSec=
-TimeoutSec=
-TimerSlackNSec=
-Type=
-UMask=
-UnsetEnvironment=
-User=
-UtmpIdentifier=
-UtmpMode=
-WatchdogSignal=
-What=
-Where=
-WorkingDirectory=
diff --git a/test/fuzz/fuzz-unit-file/directives.path b/test/fuzz/fuzz-unit-file/directives.path
deleted file mode 100644
index 3c4df76b23..0000000000
--- a/test/fuzz/fuzz-unit-file/directives.path
+++ /dev/null
@@ -1,12 +0,0 @@
-path
-[Path]
-DirectoryMode=
-DirectoryNotEmpty=
-MakeDirectory=
-PathChanged=
-PathExists=
-PathExistsGlob=
-PathModified=
-TriggerLimitBurst=
-TriggerLimitIntervalSec=
-Unit=
diff --git a/test/fuzz/fuzz-unit-file/directives.scope b/test/fuzz/fuzz-unit-file/directives.scope
deleted file mode 100644
index 4552d0b403..0000000000
--- a/test/fuzz/fuzz-unit-file/directives.scope
+++ /dev/null
@@ -1,68 +0,0 @@
-scope
-[Scope]
-AllowedCPUs=
-AllowedMemoryNodes=
-BPFProgram=
-BlockIOAccounting=
-BlockIODeviceWeight=
-BlockIOReadBandwidth=
-BlockIOWeight=
-BlockIOWriteBandwidth=
-CPUAccounting=
-CPUQuota=
-CPUQuotaPeriodSec=
-CPUShares=
-CPUWeight=
-DefaultMemoryLow=
-DefaultMemoryMin=
-Delegate=
-DeviceAllow=
-DevicePolicy=
-DisableControllers=
-FinalKillSignal=
-IOAccounting=
-IODeviceLatencyTargetSec=
-IODeviceWeight=
-IOReadBandwidthMax=
-IOReadIOPSMax=
-IOWeight=
-IOWriteBandwidthMax=
-IOWriteIOPSMax=
-IPAccounting=
-IPAddressAllow=
-IPAddressDeny=
-IPEgressFilterPath=
-IPIngressFilterPath=
-KillMode=
-KillSignal=
-ManagedOOMMemoryPressure=
-ManagedOOMMemoryPressureLimit=
-ManagedOOMPreference=
-ManagedOOMSwap=
-MemoryAccounting=
-MemoryHigh=
-MemoryLimit=
-MemoryLow=
-MemoryMax=
-MemoryMin=
-MemorySwapMax=
-NetClass=
-RestartKillSignal=
-RestrictNetworkInterfaces=
-RuntimeMaxSec=
-RuntimeRandomizedExtraSec=
-SendSIGHUP=
-SendSIGKILL=
-Slice=
-SocketBindAllow=
-SocketBindDeny=
-StartupAllowedCPUs=
-StartupAllowedMemoryNodes=
-StartupBlockIOWeight=
-StartupCPUShares=
-StartupCPUWeight=
-StartupIOWeight=
-TasksAccounting=
-TasksMax=
-TimeoutStopSec=
-WatchdogSignal=
diff --git a/test/fuzz/fuzz-unit-file/directives.service b/test/fuzz/fuzz-unit-file/directives.service
deleted file mode 100644
index 056edb9f17..0000000000
--- a/test/fuzz/fuzz-unit-file/directives.service
+++ /dev/null
@@ -1,370 +0,0 @@
-service
-[Unit]
-After=
-AllowIsolate=
-AssertACPower=
-AssertArchitecture=
-AssertCPUFeature=
-AssertCPUPressure=
-AssertCPUs=
-AssertCapability=
-AssertControlGroupController=
-AssertCredential=
-AssertDirectoryNotEmpty=
-AssertEnvironment=
-AssertFileIsExecutable=
-AssertFileNotEmpty=
-AssertFirstBoot=
-AssertGroup=
-AssertHost=
-AssertIOPressure=
-AssertKernelCommandLine=
-AssertKernelVersion=
-AssertMemory=
-AssertMemoryPressure=
-AssertNeedsUpdate=
-AssertOSRelease=
-AssertPathExists=
-AssertPathExistsGlob=
-AssertPathIsDirectory=
-AssertPathIsEncrypted=
-AssertPathIsMountPoint=
-AssertPathIsReadWrite=
-AssertPathIsSymbolicLink=
-AssertSecurity=
-AssertUser=
-AssertVirtualization=
-BPFProgram=
-Before=
-ExecSearchPath=
-BindTo=
-BindsTo=
-CollectMode=
-ConditionACPower=
-ConditionArchitecture=
-ConditionCPUFeature=
-ConditionCPUPressure=
-ConditionCPUs=
-ConditionFirmware=
-ConditionCapability=
-ConditionControlGroupController=
-ConditionCredential=
-ConditionDirectoryNotEmpty=
-ConditionEnvironment=
-ConditionFileIsExecutable=
-ConditionFileNotEmpty=
-ConditionFirstBoot=
-ConditionGroup=
-ConditionHost=
-ConditionIOPressure=
-ConditionKernelCommandLine=
-ConditionKernelVersion=
-ConditionMemory=
-ConditionMemoryPressure=
-ConditionNeedsUpdate=
-ConditionOSRelease=
-ConditionPathExists=
-ConditionPathExistsGlob=
-ConditionPathIsDirectory=
-ConditionPathIsEncrypted=
-ConditionPathIsMountPoint=
-ConditionPathIsReadWrite=
-ConditionPathIsSymbolicLink=
-ConditionSecurity=
-ConditionUser=
-ConditionVirtualization=
-Conflicts=
-DefaultDependencies=
-Description=
-Documentation=
-FailureAction=
-FailureActionExitStatus=
-IgnoreOnIsolate=
-IgnoreOnSnapshot=
-JobRunningTimeoutSec=
-JobTimeoutAction=
-JobTimeoutRebootArgument=
-JobTimeoutSec=
-JoinsNamespaceOf=
-OnFailure=
-OnFailureIsolate=
-OnFailureJobMode=
-OnSuccess=
-OnSuccessJobMode=
-PartOf=
-PropagateReloadFrom=
-PropagateReloadTo=
-PropagatesReloadTo=
-PropagatesStopTo=
-RebootArgument=
-RefuseManualStart=
-RefuseManualStop=
-ReloadPropagatedFrom=
-Requires=
-RequiresMountsFor=
-RequiresOverridable=
-Requisite=
-RequisiteOverridable=
-SocketBindAllow=
-SocketBindDeny=
-SourcePath=
-StartLimitAction=
-StartLimitBurst=
-StartLimitInterval=
-StartLimitIntervalSec=
-StopWhenUnneeded=
-StopPropagatedFrom=
-SuccessAction=
-SuccessActionExitStatus=
-Upholds=
-Wants=
-[Install]
-Alias=
-Also=
-DefaultInstance=
-RequiredBy=
-WantedBy=
-[Service]
-AllowedCPUs=
-AllowedMemoryNodes=
-AmbientCapabilities=
-AppArmorProfile=
-BindPaths=
-BindReadOnlyPaths=
-BlockIOAccounting=
-BlockIODeviceWeight=
-BlockIOReadBandwidth=
-BlockIOWeight=
-BlockIOWriteBandwidth=
-BusName=
-BusPolicy=
-CPUAccounting=
-CPUAffinity=
-CPUQuota=
-CPUQuotaPeriodSec=
-CPUSchedulingPolicy=
-CPUSchedulingPriority=
-CPUSchedulingResetOnFork=
-CPUShares=
-CPUWeight=
-CacheDirectory=
-CacheDirectoryMode=
-Capabilities=
-CapabilityBoundingSet=
-ConfigurationDirectory=
-ConfigurationDirectoryMode=
-CoredumpFilter=
-DefaultMemoryLow=
-DefaultMemoryMin=
-Delegate=
-DeviceAllow=
-DevicePolicy=
-DisableControllers=
-DynamicUser=
-Environment=
-EnvironmentFile=
-ExecCondition=
-ExecPaths=
-ExecReload=
-ExecStart=
-ExecStartPost=
-ExecStartPre=
-ExecStop=
-ExecStopPost=
-ExitType=
-ExtensionDirectories=
-ExtensionImages=
-FailureAction=
-FileDescriptorStoreMax=
-FinalKillSignal=
-Group=
-GuessMainPID=
-IOAccounting=
-IODeviceLatencyTargetSec=
-IODeviceWeight=
-IOReadBandwidthMax=
-IOReadIOPSMax=
-IOSchedulingClass=
-IOSchedulingPriority=
-IOWeight=
-IOWriteBandwidthMax=
-IOWriteIOPSMax=
-IPAccounting=
-IPAddressAllow=
-IPAddressDeny=
-IPCNamespacePath=
-IPEgressFilterPath=
-IPIngressFilterPath=
-IgnoreSIGPIPE=
-InaccessibleDirectories=
-InaccessiblePaths=
-KeyringMode=
-KillMode=
-KillSignal=
-LimitAS=
-LimitCORE=
-LimitCPU=
-LimitDATA=
-LimitFSIZE=
-LimitLOCKS=
-LimitMEMLOCK=
-LimitMSGQUEUE=
-LimitNICE=
-LimitNOFILE=
-LimitNPROC=
-LimitRSS=
-LimitRTPRIO=
-LimitRTTIME=
-LimitSIGPENDING=
-LimitSTACK=
-LoadCredential=
-LoadCredentialEncrypted=
-LockPersonality=
-LogExtraFields=
-LogLevelMax=
-LogNamespace=
-LogRateLimitBurst=
-LogRateLimitIntervalSec=
-LogsDirectory=
-LogsDirectoryMode=
-ManagedOOMMemoryPressure=
-ManagedOOMMemoryPressureLimit=
-ManagedOOMPreference=
-ManagedOOMSwap=
-MemoryAccounting=
-MemoryDenyWriteExecute=
-MemoryHigh=
-MemoryLimit=
-MemoryLow=
-MemoryMax=
-MemoryMin=
-MemorySwapMax=
-MountAPIVFS=
-MountFlags=
-MountImages=
-NUMAMask=
-NUMAPolicy=
-NetClass=
-NetworkNamespacePath=
-Nice=
-NoExecPaths=
-NoNewPrivileges=
-NonBlocking=
-NotifyAccess=
-OOMPolicy=
-OOMScoreAdjust=
-PAMName=
-PIDFile=
-PassEnvironment=
-PermissionsStartOnly=
-Personality=
-PrivateDevices=
-PrivateIPC=
-PrivateMounts=
-PrivateNetwork=
-PrivateTmp=
-PrivateUsers=
-ProcSubset=
-ProtectClock=
-ProtectControlGroups=
-ProtectHome=
-ProtectHostname=
-ProtectKernelLogs=
-ProtectKernelModules=
-ProtectKernelTunables=
-ProtectProc=
-ProtectSystem=
-ReadOnlyDirectories=
-ReadOnlyPaths=
-ReadWriteDirectories=
-ReadWritePaths=
-RebootArgument=
-RemainAfterExit=
-RemoveIPC=
-Restart=
-RestartForceExitStatus=
-RestartKillSignal=
-RestartPreventExitStatus=
-RestartSec=
-RestrictAddressFamilies=
-RestrictFileSystems=
-RestrictNamespaces=
-RestrictNetworkInterfaces=
-RestrictRealtime=
-RestrictSUIDSGID=
-RootDirectory=
-RootDirectoryStartOnly=
-RootHash=
-RootHashSignature=
-RootImage=
-RootImageOptions=
-RootVerity=
-RuntimeDirectory=
-RuntimeDirectoryMode=
-RuntimeDirectoryPreserve=
-RuntimeMaxSec=
-RuntimeRandomizedExtraSec=
-SELinuxContext=
-SecureBits=
-SendSIGHUP=
-SendSIGKILL=
-SetCredential=
-SetCredentialEncrypted=
-Slice=
-SmackProcessLabel=
-Sockets=
-StandardError=
-StandardInput=
-StandardInputData=
-StandardInputText=
-StandardOutput=
-StartLimitAction=
-StartLimitBurst=
-StartLimitInterval=
-StartupAllowedCPUs=
-StartupAllowedMemoryNodes=
-StartupBlockIOWeight=
-StartupCPUShares=
-StartupCPUWeight=
-StartupIOWeight=
-StateDirectory=
-StateDirectoryMode=
-SuccessExitStatus=
-SupplementaryGroups=
-SysVStartPriority=
-SyslogFacility=
-SyslogIdentifier=
-SyslogLevel=
-SyslogLevelPrefix=
-SystemCallArchitectures=
-SystemCallErrorNumber=
-SystemCallFilter=
-SystemCallLog=
-TTYPath=
-TTYReset=
-TTYVHangup=
-TTYVTDisallocate=
-TTYRows=
-TTYColumns=
-TasksAccounting=
-TasksMax=
-TemporaryFileSystem=
-TimeoutAbortSec=
-TimeoutCleanSec=
-TimeoutSec=
-TimeoutStartFailureMode=
-TimeoutStartSec=
-TimeoutStopFailureMode=
-TimeoutStopSec=
-TimerSlackNSec=
-Type=
-UMask=
-USBFunctionDescriptors=
-USBFunctionStrings=
-UnsetEnvironment=
-User=
-UtmpIdentifier=
-UtmpMode=
-WatchdogSec=
-WatchdogSignal=
-WorkingDirectory=
diff --git a/test/fuzz/fuzz-unit-file/directives.slice b/test/fuzz/fuzz-unit-file/directives.slice
deleted file mode 100644
index ab77070c5e..0000000000
--- a/test/fuzz/fuzz-unit-file/directives.slice
+++ /dev/null
@@ -1,58 +0,0 @@
-slice
-[Slice]
-AllowedCPUs=
-AllowedMemoryNodes=
-BPFProgram=
-BlockIOAccounting=
-BlockIODeviceWeight=
-BlockIOReadBandwidth=
-BlockIOWeight=
-BlockIOWriteBandwidth=
-CPUAccounting=
-CPUQuota=
-CPUQuotaPeriodSec=
-CPUShares=
-CPUWeight=
-DefaultMemoryLow=
-DefaultMemoryMin=
-Delegate=
-DeviceAllow=
-DevicePolicy=
-DisableControllers=
-IOAccounting=
-IODeviceLatencyTargetSec=
-IODeviceWeight=
-IOReadBandwidthMax=
-IOReadIOPSMax=
-IOWeight=
-IOWriteBandwidthMax=
-IOWriteIOPSMax=
-IPAccounting=
-IPAddressAllow=
-IPAddressDeny=
-IPEgressFilterPath=
-IPIngressFilterPath=
-ManagedOOMMemoryPressure=
-ManagedOOMMemoryPressureLimit=
-ManagedOOMPreference=
-ManagedOOMSwap=
-MemoryAccounting=
-MemoryHigh=
-MemoryLimit=
-MemoryLow=
-MemoryMax=
-MemoryMin=
-MemorySwapMax=
-NetClass=
-RestrictNetworkInterfaces=
-Slice=
-SocketBindAllow=
-SocketBindDeny=
-StartupAllowedCPUs=
-StartupAllowedMemoryNodes=
-StartupBlockIOWeight=
-StartupCPUShares=
-StartupCPUWeight=
-StartupIOWeight=
-TasksAccounting=
-TasksMax=
diff --git a/test/fuzz/fuzz-unit-file/directives.socket b/test/fuzz/fuzz-unit-file/directives.socket
deleted file mode 100644
index 90358fc11a..0000000000
--- a/test/fuzz/fuzz-unit-file/directives.socket
+++ /dev/null
@@ -1,266 +0,0 @@
-socket
-[Socket]
-Accept=
-AllowedCPUs=
-AllowedMemoryNodes=
-AmbientCapabilities=
-AppArmorProfile=
-BPFProgram=
-Backlog=
-ExecSearchPath=
-BindIPv6Only=
-BindPaths=
-BindReadOnlyPaths=
-BindToDevice=
-BlockIOAccounting=
-BlockIODeviceWeight=
-BlockIOReadBandwidth=
-BlockIOWeight=
-BlockIOWriteBandwidth=
-Broadcast=
-CPUAccounting=
-CPUAffinity=
-CPUQuota=
-CPUQuotaPeriodSec=
-CPUSchedulingPolicy=
-CPUSchedulingPriority=
-CPUSchedulingResetOnFork=
-CPUShares=
-CPUWeight=
-CacheDirectory=
-CacheDirectoryMode=
-Capabilities=
-CapabilityBoundingSet=
-ConfigurationDirectory=
-ConfigurationDirectoryMode=
-CoredumpFilter=
-DefaultMemoryLow=
-DefaultMemoryMin=
-DeferAcceptSec=
-Delegate=
-DeviceAllow=
-DevicePolicy=
-DirectoryMode=
-DisableControllers=
-DynamicUser=
-Environment=
-EnvironmentFile=
-ExecPaths=
-ExecStartPost=
-ExecStartPre=
-ExecStopPost=
-ExecStopPre=
-ExtensionDirectories=
-ExtensionImages=
-FileDescriptorName=
-FinalKillSignal=
-FlushPending=
-FreeBind=
-Group=
-IOAccounting=
-IODeviceLatencyTargetSec=
-IODeviceWeight=
-IOReadBandwidthMax=
-IOReadIOPSMax=
-IOSchedulingClass=
-IOSchedulingPriority=
-IOWeight=
-IOWriteBandwidthMax=
-IOWriteIOPSMax=
-IPAccounting=
-IPAddressAllow=
-IPAddressDeny=
-IPCNamespacePath=
-IPEgressFilterPath=
-IPIngressFilterPath=
-IPTOS=
-IPTTL=
-IgnoreSIGPIPE=
-InaccessibleDirectories=
-InaccessiblePaths=
-KeepAlive=
-KeepAliveIntervalSec=
-KeepAliveProbes=
-KeepAliveTimeSec=
-KeyringMode=
-KillMode=
-KillSignal=
-LimitAS=
-LimitCORE=
-LimitCPU=
-LimitDATA=
-LimitFSIZE=
-LimitLOCKS=
-LimitMEMLOCK=
-LimitMSGQUEUE=
-LimitNICE=
-LimitNOFILE=
-LimitNPROC=
-LimitRSS=
-LimitRTPRIO=
-LimitRTTIME=
-LimitSIGPENDING=
-LimitSTACK=
-ListenDatagram=
-ListenFIFO=
-ListenMessageQueue=
-ListenNetlink=
-ListenSequentialPacket=
-ListenSpecial=
-ListenStream=
-ListenUSBFunction=
-LoadCredential=
-LoadCredentialEncrypted=
-LockPersonality=
-LogExtraFields=
-LogLevelMax=
-LogNamespace=
-LogRateLimitBurst=
-LogRateLimitIntervalSec=
-LogsDirectory=
-LogsDirectoryMode=
-ManagedOOMMemoryPressure=
-ManagedOOMMemoryPressureLimit=
-ManagedOOMPreference=
-ManagedOOMSwap=
-Mark=
-MaxConnections=
-MaxConnectionsPerSource=
-MemoryAccounting=
-MemoryDenyWriteExecute=
-MemoryHigh=
-MemoryLimit=
-MemoryLow=
-MemoryMax=
-MemoryMin=
-MemorySwapMax=
-MessageQueueMaxMessages=
-MessageQueueMessageSize=
-MountAPIVFS=
-MountFlags=
-MountImages=
-NUMAMask=
-NUMAPolicy=
-NetClass=
-NetworkNamespacePath=
-Nice=
-NoDelay=
-NoExecPaths=
-NoNewPrivileges=
-OOMScoreAdjust=
-PAMName=
-PassCredentials=
-PassEnvironment=
-PassPacketInfo=
-PassSecurity=
-Personality=
-PipeSize=
-Priority=
-PrivateDevices=
-PrivateIPC=
-PrivateMounts=
-PrivateNetwork=
-PrivateTmp=
-PrivateUsers=
-ProcSubset=
-ProtectClock=
-ProtectControlGroups=
-ProtectHome=
-ProtectHostname=
-ProtectKernelLogs=
-ProtectKernelModules=
-ProtectKernelTunables=
-ProtectProc=
-ProtectSystem=
-ReadOnlyDirectories=
-ReadOnlyPaths=
-ReadWriteDirectories=
-ReadWritePaths=
-ReceiveBuffer=
-RemoveIPC=
-RemoveOnStop=
-RestartKillSignal=
-RestrictAddressFamilies=
-RestrictFileSystems=
-RestrictNamespaces=
-RestrictNetworkInterfaces=
-RestrictRealtime=
-RestrictSUIDSGID=
-ReusePort=
-RootDirectory=
-RootHash=
-RootHashSignature=
-RootImage=
-RootImageOptions=
-RootVerity=
-RuntimeDirectory=
-RuntimeDirectoryMode=
-RuntimeDirectoryPreserve=
-SELinuxContext=
-SELinuxContextFromNet=
-SecureBits=
-SendBuffer=
-SendSIGHUP=
-SendSIGKILL=
-Service=
-SetCredential=
-SetCredentialEncrypted=
-Slice=
-SmackLabel=
-SmackLabelIPIn=
-SmackLabelIPOut=
-SmackProcessLabel=
-SocketBindAllow=
-SocketBindDeny=
-SocketGroup=
-SocketMode=
-SocketProtocol=
-SocketUser=
-StandardError=
-StandardInput=
-StandardInputData=
-StandardInputText=
-StandardOutput=
-StartupAllowedCPUs=
-StartupAllowedMemoryNodes=
-StartupBlockIOWeight=
-StartupCPUShares=
-StartupCPUWeight=
-StartupIOWeight=
-StateDirectory=
-StateDirectoryMode=
-SupplementaryGroups=
-Symlinks=
-SyslogFacility=
-SyslogIdentifier=
-SyslogLevel=
-SyslogLevelPrefix=
-SystemCallArchitectures=
-SystemCallErrorNumber=
-SystemCallFilter=
-SystemCallLog=
-TCPCongestion=
-TTYPath=
-TTYReset=
-TTYVHangup=
-TTYVTDisallocate=
-TTYRows=
-TTYColumns=
-TasksAccounting=
-TasksMax=
-TemporaryFileSystem=
-TimeoutCleanSec=
-TimeoutSec=
-TimerSlackNSec=
-Timestamping=
-Transparent=
-TriggerLimitBurst=
-TriggerLimitIntervalSec=
-UMask=
-UnsetEnvironment=
-User=
-UtmpIdentifier=
-UtmpMode=
-WatchdogSignal=
-WorkingDirectory=
-Writable=
diff --git a/test/fuzz/fuzz-unit-file/directives.swap b/test/fuzz/fuzz-unit-file/directives.swap
deleted file mode 100644
index 5d057fa630..0000000000
--- a/test/fuzz/fuzz-unit-file/directives.swap
+++ /dev/null
@@ -1,210 +0,0 @@
-swap
-[Swap]
-AllowedCPUs=
-AllowedMemoryNodes=
-AmbientCapabilities=
-AppArmorProfile=
-BPFProgram=
-ExecSearchPath=
-BindPaths=
-BindReadOnlyPaths=
-BlockIOAccounting=
-BlockIODeviceWeight=
-BlockIOReadBandwidth=
-BlockIOWeight=
-BlockIOWriteBandwidth=
-CPUAccounting=
-CPUAffinity=
-CPUQuota=
-CPUQuotaPeriodSec=
-CPUSchedulingPolicy=
-CPUSchedulingPriority=
-CPUSchedulingResetOnFork=
-CPUShares=
-CPUWeight=
-CacheDirectory=
-CacheDirectoryMode=
-Capabilities=
-CapabilityBoundingSet=
-ConfigurationDirectory=
-ConfigurationDirectoryMode=
-CoredumpFilter=
-DefaultMemoryLow=
-DefaultMemoryMin=
-Delegate=
-DeviceAllow=
-DevicePolicy=
-DisableControllers=
-DynamicUser=
-Environment=
-EnvironmentFile=
-ExecPaths=
-ExtensionDirectories=
-ExtensionImages=
-FinalKillSignal=
-Group=
-IOAccounting=
-IODeviceLatencyTargetSec=
-IODeviceWeight=
-IOReadBandwidthMax=
-IOReadIOPSMax=
-IOSchedulingClass=
-IOSchedulingPriority=
-IOWeight=
-IOWriteBandwidthMax=
-IOWriteIOPSMax=
-IPAccounting=
-IPAddressAllow=
-IPAddressDeny=
-IPCNamespacePath=
-IPEgressFilterPath=
-IPIngressFilterPath=
-IgnoreSIGPIPE=
-InaccessibleDirectories=
-InaccessiblePaths=
-KeyringMode=
-KillMode=
-KillSignal=
-LimitAS=
-LimitCORE=
-LimitCPU=
-LimitDATA=
-LimitFSIZE=
-LimitLOCKS=
-LimitMEMLOCK=
-LimitMSGQUEUE=
-LimitNICE=
-LimitNOFILE=
-LimitNPROC=
-LimitRSS=
-LimitRTPRIO=
-LimitRTTIME=
-LimitSIGPENDING=
-LimitSTACK=
-LoadCredential=
-LoadCredentialEncrypted=
-LockPersonality=
-LogExtraFields=
-LogLevelMax=
-LogNamespace=
-LogRateLimitBurst=
-LogRateLimitIntervalSec=
-LogsDirectory=
-LogsDirectoryMode=
-ManagedOOMMemoryPressure=
-ManagedOOMMemoryPressureLimit=
-ManagedOOMPreference=
-ManagedOOMSwap=
-MemoryAccounting=
-MemoryDenyWriteExecute=
-MemoryHigh=
-MemoryLimit=
-MemoryLow=
-MemoryMax=
-MemoryMin=
-MemorySwapMax=
-MountAPIVFS=
-MountFlags=
-MountImages=
-NUMAMask=
-NUMAPolicy=
-NetClass=
-NetworkNamespacePath=
-Nice=
-NoExecPaths=
-NoNewPrivileges=
-OOMScoreAdjust=
-Options=
-PAMName=
-PassEnvironment=
-Personality=
-Priority=
-PrivateDevices=
-PrivateIPC=
-PrivateMounts=
-PrivateNetwork=
-PrivateTmp=
-PrivateUsers=
-ProcSubset=
-ProtectClock=
-ProtectControlGroups=
-ProtectHome=
-ProtectHostname=
-ProtectKernelLogs=
-ProtectKernelModules=
-ProtectKernelTunables=
-ProtectProc=
-ProtectSystem=
-ReadOnlyDirectories=
-ReadOnlyPaths=
-ReadWriteDirectories=
-ReadWritePaths=
-RemoveIPC=
-RestartKillSignal=
-RestrictAddressFamilies=
-RestrictFileSystems=
-RestrictNamespaces=
-RestrictNetworkInterfaces=
-RestrictRealtime=
-RestrictSUIDSGID=
-RootDirectory=
-RootHash=
-RootHashSignature=
-RootImage=
-RootImageOptions=
-RootVerity=
-RuntimeDirectory=
-RuntimeDirectoryMode=
-RuntimeDirectoryPreserve=
-SELinuxContext=
-SecureBits=
-SendSIGHUP=
-SendSIGKILL=
-SetCredential=
-SetCredentialEncrypted=
-Slice=
-SmackProcessLabel=
-SocketBindAllow=
-SocketBindDeny=
-StandardError=
-StandardInput=
-StandardInputData=
-StandardInputText=
-StandardOutput=
-StartupAllowedCPUs=
-StartupAllowedMemoryNodes=
-StartupBlockIOWeight=
-StartupCPUShares=
-StartupCPUWeight=
-StartupIOWeight=
-StateDirectory=
-StateDirectoryMode=
-SupplementaryGroups=
-SyslogFacility=
-SyslogIdentifier=
-SyslogLevel=
-SyslogLevelPrefix=
-SystemCallArchitectures=
-SystemCallErrorNumber=
-SystemCallFilter=
-SystemCallLog=
-TTYPath=
-TTYReset=
-TTYVHangup=
-TTYVTDisallocate=
-TTYRows=
-TTYColumns=
-TasksAccounting=
-TasksMax=
-TemporaryFileSystem=
-TimeoutCleanSec=
-TimeoutSec=
-TimerSlackNSec=
-UMask=
-UnsetEnvironment=
-User=
-UtmpIdentifier=
-UtmpMode=
-WatchdogSignal=
-What=
-WorkingDirectory=
diff --git a/test/fuzz/fuzz-unit-file/directives.timer b/test/fuzz/fuzz-unit-file/directives.timer
deleted file mode 100644
index 40075cf3e7..0000000000
--- a/test/fuzz/fuzz-unit-file/directives.timer
+++ /dev/null
@@ -1,17 +0,0 @@
-timer
-[Timer]
-AccuracySec=
-FixedRandomDelay=
-OnActiveSec=
-OnBootSec=
-OnCalendar=
-OnClockChange=
-OnStartupSec=
-OnTimezoneChange=
-OnUnitActiveSec=
-OnUnitInactiveSec=
-Persistent=
-RandomizedDelaySec=
-RemainAfterElapse=
-Unit=
-WakeSystem=
diff --git a/test/fuzz/generate-directives.py b/test/fuzz/generate-directives.py
new file mode 100644
index 0000000000..d05108962f
--- /dev/null
+++ b/test/fuzz/generate-directives.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+import sys
+import collections, re
+
+d = collections.defaultdict(list)
+for line in open(sys.argv[1]):
+ m = re.match(r'^([a-zA-Z0-9-]+)\.([a-zA-Z0-9-]+),', line)
+ if m:
+ d[m.group(1)] += [m.group(2)]
+
+sec_rx = sys.argv[2] if len(sys.argv) > 2 else '.'
+sec_rx = re.compile(sec_rx)
+unit_type = sys.argv[3] if len(sys.argv) > 3 else None
+
+if unit_type:
+ print(unit_type)
+
+for section, items in d.items():
+ if not sec_rx.match(section):
+ continue
+ print(f'[{section}]')
+ for item in items:
+ print(f'{item}=')
+ print()
diff --git a/test/fuzz/meson.build b/test/fuzz/meson.build
index 82738fd1b7..f7f0a6111c 100644
--- a/test/fuzz/meson.build
+++ b/test/fuzz/meson.build
@@ -1,5 +1,36 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
+generate_directives_py = find_program('generate-directives.py')
+fuzz_generated_in_dir = meson.current_build_dir()
+
+fuzz_generated_directives = []
+
+directives = [['fuzz-network-parser_directives', 'src/network/networkd-network-gperf.gperf'],
+ ['fuzz-netdev-parser_directives.netdev', 'src/network/netdev/netdev-gperf.gperf'],
+ ['fuzz-link-parser_directives.link', 'src/udev/net/link-config-gperf.gperf'],
+ ]
+
+foreach tuple : directives
+ fuzz_generated_directives += custom_target(
+ tuple[0],
+ output: tuple[0],
+ command: [generate_directives_py, files(project_source_root / tuple[1])],
+ capture: true)
+endforeach
+
+foreach section : ['Automount', 'Mount', 'Path', 'Scope', 'Service', 'Slice', 'Socket', 'Swap', 'Timer']
+ unit_type = section.to_lower()
+ sec_rx = section == 'Service' ? '(Service|Unit|Install)' : section
+ fuzz_generated_directives += custom_target(
+ 'fuzz-unit-file_directives.@0@'.format(unit_type),
+ output: 'fuzz-unit-file_directives.@0@'.format(unit_type),
+ command: [generate_directives_py, load_fragment_gperf_gperf, sec_rx, unit_type],
+ capture: true)
+endforeach
+
+
+############################################################
+
sanitize_address_undefined = custom_target(
'sanitize-address-undefined-fuzzers',
output : 'sanitize-address-undefined-fuzzers',
@@ -28,7 +59,22 @@ else
out = run_command(sh, '-c', 'cd "@0@"; echo @1@/*/*'.format(project_source_root, fuzz_testsdir), check: true)
endif
-fuzz_regression_tests = {}
+# Fuzz inputs that we generate (see above fuzz_generated_directives)
+fuzz_regression_tests = {
+ 'fuzz-link-parser': [['', 'directives.link']],
+ 'fuzz-netdev-parser': [['', 'directives.netdev']],
+ 'fuzz-network-parser': [['', 'directives']],
+ 'fuzz-unit-file': [['', 'directives.automount'],
+ ['', 'directives.mount'],
+ ['', 'directives.path'],
+ ['', 'directives.scope'],
+ ['', 'directives.service'],
+ ['', 'directives.slice'],
+ ['', 'directives.socket'],
+ ['', 'directives.swap'],
+ ['', 'directives.timer']]}
+
+# Add crafted fuzz inputs we have in the repo
foreach p : out.stdout().split()
# Remove the last entry which is ''.
#
@@ -44,6 +90,6 @@ foreach p : out.stdout().split()
endif
# Meson parser provision for: fuzz_regression_tests[fuzzer] += [fuzz_in]
l = fuzz_regression_tests[fuzzer]
- l += [fuzz_in]
+ l += [[fuzz_testsdir, fuzz_in]]
fuzz_regression_tests += {fuzzer: l}
endforeach
diff --git a/tools/check-directives.sh b/tools/check-directives.sh
deleted file mode 100755
index 767833285b..0000000000
--- a/tools/check-directives.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env bash
-# SPDX-License-Identifier: LGPL-2.1-or-later
-set -eu
-set -o pipefail
-
-SOURCE_ROOT="${1:?}"
-BUILD_ROOT="${2:?}"
-
-command -v gawk &>/dev/null || exit 77
-
-function generate_directives() {
- gawk -v sec_rx="${2:-""}" -v unit_type="${3:-""}" '
- match($0, /^([^ \t\.]+)\.([^ \t\.,]+)/, m) {
- # res[section][directive] = 1
- res[m[1]][m[2]] = 1;
- }
- END {
- if (unit_type)
- print unit_type
-
- for (section in res) {
- if (sec_rx && section !~ sec_rx)
- continue
-
- print "[" section "]";
- for (directive in res[section]) {
- print directive "=";
- }
- }
- }
- ' "$1"
-}
-
-ret=0
-if ! diff \
- <(generate_directives "$SOURCE_ROOT"/src/network/networkd-network-gperf.gperf | sort) \
- <(sort "$SOURCE_ROOT"/test/fuzz/fuzz-network-parser/directives); then
- echo "Looks like test/fuzz/fuzz-network-parser/directives hasn't been updated"
- ret=1
-fi
-
-if ! diff \
- <(generate_directives "$SOURCE_ROOT"/src/network/netdev/netdev-gperf.gperf | sort) \
- <(sort "$SOURCE_ROOT"/test/fuzz/fuzz-netdev-parser/directives.netdev); then
- echo "Looks like test/fuzz/fuzz-netdev-parser/directives.netdev hasn't been updated"
- ret=1
-fi
-
-if ! diff \
- <(generate_directives "$SOURCE_ROOT"/src/udev/net/link-config-gperf.gperf | sort) \
- <(sort "$SOURCE_ROOT"/test/fuzz/fuzz-link-parser/directives.link) ; then
- echo "Looks like test/fuzz/fuzz-link-parser/directives.link hasn't been updated"
- ret=1
-fi
-
-for section in Automount Mount Path Scope Slice Socket Swap Timer; do
- if ! diff \
- <(generate_directives "$BUILD_ROOT"/src/core/load-fragment-gperf.gperf "$section" "${section,,}" | sort) \
- <(sort "$SOURCE_ROOT/test/fuzz/fuzz-unit-file/directives.${section,,}") ; then
- echo "Looks like test/fuzz/fuzz-unit-file/directives.${section,,} hasn't been updated"
- ret=1
- fi
-done
-
-if ! diff \
- <(generate_directives "$BUILD_ROOT"/src/core/load-fragment-gperf.gperf "(Service|Unit|Install)" "service" | sort) \
- <(sort "$SOURCE_ROOT/test/fuzz/fuzz-unit-file/directives.service") ; then
- echo "Looks like test/fuzz/fuzz-unit-file/directives.service hasn't been updated"
- ret=1
-fi
-
-exit $ret