]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tests: add a couple of files containing all the sections and directives
authorEvgeny Vereshchagin <evvers@ya.ru>
Tue, 6 Nov 2018 18:42:29 +0000 (19:42 +0100)
committerEvgeny Vereshchagin <evvers@ya.ru>
Tue, 6 Nov 2018 18:42:29 +0000 (19:42 +0100)
This should help the fuzzers to discover code paths faster.

In case anyone is interested, they were generated with the following script
```
perl -aF'/[\s,]+/' -ne '
if (my ($s, $d) = ($F[0] =~ /^([^\s\.]+)\.([^\s\.]+)$/)) { $d{$s}{$d} = 1; }
END { while (my ($key, $value) = each %d) {
    printf "[%s]\n%s\n", $key, join("\n", keys(%$value))
}}'
```
by passing src/network/networkd-network-gperf.gperf and
src/network/netdev/netdev-gperf.gperf to it.

test/fuzz/fuzz-netdev-parser/directives.netdev [new file with mode: 0644]
test/fuzz/fuzz-network-parser/directives.network [new file with mode: 0644]

diff --git a/test/fuzz/fuzz-netdev-parser/directives.netdev b/test/fuzz/fuzz-netdev-parser/directives.netdev
new file mode 100644 (file)
index 0000000..4725d2d
--- /dev/null
@@ -0,0 +1,153 @@
+[VLAN]
+MVRP=
+LooseBinding=
+ReorderHeader=
+Id=
+GVRP=
+[MACVLAN]
+Mode=
+[WireGuard]
+ListenPort=
+PrivateKey=
+FwMark=
+[MACVTAP]
+Mode=
+[Match]
+Architecture=
+Host=
+KernelVersion=
+Virtualization=
+KernelCommandLine=
+[GENEVE]
+DestinationPort=
+TTL=
+UDP6ZeroCheckSumTx=
+TOS=
+Id=
+UDPChecksum=
+UDP6ZeroChecksumTx=
+FlowLabel=
+UDP6ZeroChecksumRx=
+Remote=
+UDP6ZeroCheckSumRx=
+[Bridge]
+ForwardDelaySec=
+HelloTimeSec=
+MaxAgeSec=
+STP=
+MulticastSnooping=
+DefaultPVID=
+MulticastQuerier=
+AgeingTimeSec=
+Priority=
+GroupForwardMask=
+VLANFiltering=
+[VRF]
+TableId=
+Table=
+[Peer]
+MACAddress=
+Name=
+[WireGuardPeer]
+Endpoint=
+PresharedKey=
+PersistentKeepalive=
+PublicKey=
+AllowedIPs=
+[Tunnel]
+FooOverUDP=
+IPv6FlowLabel=
+Remote=
+AllowLocalRemote=
+Local=
+TOS=
+Independent=
+Key=
+InputKey=
+Encapsulation=
+Mode=
+OutputKey=
+DiscoverPathMTU=
+FOUDestinationPort=
+CopyDSCP=
+EncapsulationLimit=
+TTL=
+FOUSourcePort=
+[VXLAN]
+UDP6ZeroChecksumRx=
+ARPProxy=
+FlowLabel=
+Local=
+RemoteChecksumTx=
+RouteShortCircuit=
+Remote=
+L3MissNotification=
+Group=
+FDBAgeingSec=
+MacLearning=
+Id=
+RemoteChecksumRx=
+TOS=
+L2MissNotification=
+UDP6ZeroChecksumTx=
+UDP6ZeroCheckSumRx=
+UDPCheckSum=
+GroupPolicyExtension=
+MaximumFDBEntries=
+TTL=
+DestinationPort=
+ReduceARPProxy=
+PortRange=
+UDPChecksum=
+UDP6ZeroCheckSumTx=
+[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=
+[FooOverUDP]
+Protocol=
+Port=
+Encapsulation=
+[Tap]
+MultiQueue=
+OneQueue=
+User=
+Group=
+PacketInfo=
+VNetHeader=
+[IPVLAN]
+Mode=
+Flags=
+[Tun]
+OneQueue=
+MultiQueue=
+PacketInfo=
+Group=
+User=
+[NetDev]
+Kind=
+MACAddress=
+MTUBytes=
+Description=
+Name=
diff --git a/test/fuzz/fuzz-network-parser/directives.network b/test/fuzz/fuzz-network-parser/directives.network
new file mode 100644 (file)
index 0000000..766c760
--- /dev/null
@@ -0,0 +1,187 @@
+[Bridge]
+Cost=
+UseBPDU=
+HairPin=
+UnicastFlood=
+FastLeave=
+Priority=
+AllowPortToBeRoot=
+[Match]
+KernelVersion=
+Type=
+Driver=
+Architecture=
+Path=
+Name=
+Virtualization=
+KernelCommandLine=
+Host=
+MACAddress=
+[Link]
+RequiredForOnline=
+ARP=
+AllMulticast=
+Unmanaged=
+MTUBytes=
+Multicast=
+MACAddress=
+[BridgeFDB]
+VLANId=
+MACAddress=
+[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=
+[Route]
+Destination=
+Protocol=
+Table=
+Gateway=
+InitialAdvertisedReceiveWindow=
+GatewayOnlink=
+Type=
+InitialCongestionWindow=
+IPv6Preference=
+PreferredSource=
+Scope=
+MTUBytes=
+QuickAck=
+Source=
+Metric=
+[Network]
+IPv6DuplicateAddressDetection=
+IPMasquerade=
+ProxyARP=
+PrimarySlave=
+IPv4LLRoute=
+Address=
+IPv6ProxyNDPAddress=
+IPv6AcceptRA=
+IPv6AcceptRouterAdvertisements=
+DNSSECNegativeTrustAnchors=
+MACVTAP=
+IPv6PrivacyExtensions=
+MACVLAN=
+MulticastDNS=
+LLDP=
+Tunnel=
+Gateway=
+IPv4LL=
+IPVLAN=
+EmitLLDP=
+IPv6MTUBytes=
+IPv4ProxyARP=
+Bridge=
+DNSOverTLS=
+Bond=
+IPv6ProxyNDP=
+DNS=
+ActiveSlave=
+LLMNR=
+DNSSEC=
+IPv6HopLimit=
+IPForward=
+IPv6Token=
+Description=
+VXLAN=
+LinkLocalAddressing=
+ConfigureWithoutCarrier=
+NTP=
+DHCP=
+Domains=
+IPv6PrefixDelegation=
+VLAN=
+DHCPServer=
+BindCarrier=
+VRF=
+[IPv6Prefix]
+Prefix=
+OnLink=
+PreferredLifetimeSec=
+AddressAutoconfiguration=
+ValidLifetimeSec=
+[BridgeVLAN]
+EgressUntagged=
+VLAN=
+PVID=
+[CAN]
+SamplePoint=
+BitRate=
+RestartSec=
+[Address]
+DuplicateAddressDetection=
+AutoJoin=
+PreferredLifetime=
+Address=
+Scope=
+HomeAddress=
+PrefixRoute=
+ManageTemporaryAddress=
+Broadcast=
+Peer=
+Label=
+[RoutingPolicyRule]
+Table=
+IncomingInterface=
+To=
+OutgoingInterface=
+From=
+TypeOfService=
+Priority=
+FirewallMark=
+[IPv6PrefixDelegation]
+RouterPreference=
+DNSLifetimeSec=
+DNS=
+RouterLifetimeSec=
+Domains=
+EmitDNS=
+EmitDomains=
+Managed=
+OtherInformation=
+[IPv6AddressLabel]
+Label=
+Prefix=
+[IPv6AcceptRA]
+UseDomains=
+RouteTable=
+UseDNS=
+[DHCPServer]
+EmitNTP=
+PoolSize=
+PoolOffset=
+Timezone=
+EmitDNS=
+NTP=
+EmitRouter=
+MaxLeaseTimeSec=
+DefaultLeaseTimeSec=
+EmitTimezone=
+DNS=
+[DHCPv4]
+UseHostname=
+UseMTU=
+UseDomainName=
+CriticalConnection=
+UseDNS=