| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
|
| 3 |
#include <net/if.h> |
| 4 |
|
| 5 |
#include "sd-dhcp-lease.h" |
| 6 |
|
| 7 |
#include "bond-util.h" |
| 8 |
#include "dhcp6-protocol.h" |
| 9 |
#include "ethtool-util.h" |
| 10 |
#include "ipvlan-util.h" |
| 11 |
#include "lldp-rx-internal.h" |
| 12 |
#include "macvlan-util.h" |
| 13 |
#include "ndisc-internal.h" |
| 14 |
#include "networkd-dns.h" |
| 15 |
#include "networkd-lldp-rx.h" |
| 16 |
#include "networkd-radv.h" |
| 17 |
#include "networkd-sysctl.h" |
| 18 |
#include "test-tables.h" |
| 19 |
#include "tests.h" |
| 20 |
#include "tunnel.h" |
| 21 |
|
| 22 |
int main(int argc, char **argv) { |
| 23 |
test_setup_logging(LOG_DEBUG); |
| 24 |
|
| 25 |
test_table(BondAdSelect, bond_ad_select, NETDEV_BOND_AD_SELECT); |
| 26 |
test_table(BondArpAllTargets, bond_arp_all_targets, NETDEV_BOND_ARP_ALL_TARGETS); |
| 27 |
test_table(BondArpValidate, bond_arp_validate, NETDEV_BOND_ARP_VALIDATE); |
| 28 |
test_table(BondFailOverMac, bond_fail_over_mac, NETDEV_BOND_FAIL_OVER_MAC); |
| 29 |
test_table(BondLacpRate, bond_lacp_rate, NETDEV_BOND_LACP_RATE); |
| 30 |
test_table(BondMode, bond_mode, NETDEV_BOND_MODE); |
| 31 |
test_table(BondPrimaryReselect, bond_primary_reselect, NETDEV_BOND_PRIMARY_RESELECT); |
| 32 |
test_table(BondXmitHashPolicy, bond_xmit_hash_policy, NETDEV_BOND_XMIT_HASH_POLICY); |
| 33 |
test_table(DHCP6Status, dhcp6_message_status, DHCP6_STATUS); |
| 34 |
test_table_sparse(DHCP6MessageType, dhcp6_message_type, DHCP6_MESSAGE_TYPE); /* enum starts from 1 */ |
| 35 |
test_table(UseDomains, use_domains, USE_DOMAINS); |
| 36 |
test_table(Duplex, duplex, DUP); |
| 37 |
test_table(TunnelMode, tunnel_mode, TUNNEL_MODE); |
| 38 |
test_table(IPv6PrivacyExtensions, ipv6_privacy_extensions, IPV6_PRIVACY_EXTENSIONS); |
| 39 |
test_table(IPVlanFlags, ipvlan_flags, NETDEV_IPVLAN_FLAGS); |
| 40 |
test_table(LinkOperationalState, link_operstate, LINK_OPERSTATE); |
| 41 |
/* test_table(link_state, LINK_STATE); — not a reversible mapping */ |
| 42 |
test_table(LLDPMode, lldp_mode, LLDP_MODE); |
| 43 |
test_table(NetDevKind, netdev_kind, NETDEV_KIND); |
| 44 |
test_table(RADVPrefixDelegation, radv_prefix_delegation, RADV_PREFIX_DELEGATION); |
| 45 |
test_table(sd_lldp_rx_event_t, lldp_rx_event, SD_LLDP_RX_EVENT); |
| 46 |
test_table(sd_ndisc_event_t, ndisc_event, SD_NDISC_EVENT); |
| 47 |
test_table(sd_dhcp_lease_server_type_t, dhcp_lease_server_type, SD_DHCP_LEASE_SERVER_TYPE); |
| 48 |
|
| 49 |
test_table_sparse(IPVlanMode, ipvlan_mode, NETDEV_IPVLAN_MODE); |
| 50 |
test_table_sparse(MacVlanMode, macvlan_mode, NETDEV_MACVLAN_MODE); |
| 51 |
test_table_sparse(AddressFamily, address_family, ADDRESS_FAMILY); |
| 52 |
|
| 53 |
assert_cc(sizeof(sd_lldp_rx_event_t) == sizeof(int64_t)); |
| 54 |
assert_cc(sizeof(sd_ndisc_event_t) == sizeof(int64_t)); |
| 55 |
assert_cc(sizeof(sd_dhcp_lease_server_type_t) == sizeof(int64_t)); |
| 56 |
|
| 57 |
return EXIT_SUCCESS; |
| 58 |
} |