1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
5 #include "architecture.h"
8 #include "cgroup-util.h"
10 #include "condition.h"
11 #include "confidential-virt.h"
12 #include "device-private.h"
13 #include "discover-image.h"
16 #include "import-util.h"
20 #include "locale-util.h"
24 #include "netif-naming-scheme.h"
25 #include "output-mode.h"
27 #include "resolve-util.h"
30 #include "show-status.h"
32 #include "socket-util.h"
34 #include "test-tables.h"
38 #include "unit-name.h"
41 int main(int argc
, char **argv
) {
42 test_setup_logging(LOG_DEBUG
);
44 test_table(Architecture
, architecture
, ARCHITECTURE
);
45 test_table(ConditionType
, assert_type
, CONDITION_TYPE
);
46 test_table(AutomountResult
, automount_result
, AUTOMOUNT_RESULT
);
47 test_table(AutomountState
, automount_state
, AUTOMOUNT_STATE
);
48 test_table(CGroupController
, cgroup_controller
, CGROUP_CONTROLLER
);
49 test_table(CGroupDevicePolicy
, cgroup_device_policy
, CGROUP_DEVICE_POLICY
);
50 test_table(CGroupIOLimitType
, cgroup_io_limit_type
, CGROUP_IO_LIMIT_TYPE
);
51 test_table(CollectMode
, collect_mode
, COLLECT_MODE
);
52 test_table(ConditionResult
, condition_result
, CONDITION_RESULT
);
53 test_table(ConditionType
, condition_type
, CONDITION_TYPE
);
54 test_table(ConfidentialVirtualization
, confidential_virtualization
, CONFIDENTIAL_VIRTUALIZATION
);
55 test_table(sd_device_action_t
, device_action
, SD_DEVICE_ACTION
);
56 test_table(DeviceState
, device_state
, DEVICE_STATE
);
57 test_table(DnsOverTlsMode
, dns_over_tls_mode
, DNS_OVER_TLS_MODE
);
58 test_table(DnssecMode
, dnssec_mode
, DNSSEC_MODE
);
59 test_table(EmergencyAction
, emergency_action
, EMERGENCY_ACTION
);
60 test_table(ExecDirectoryType
, exec_directory_type
, EXEC_DIRECTORY_TYPE
);
61 test_table(ExecInput
, exec_input
, EXEC_INPUT
);
62 test_table(ExecKeyringMode
, exec_keyring_mode
, EXEC_KEYRING_MODE
);
63 test_table(ExecOutput
, exec_output
, EXEC_OUTPUT
);
64 test_table(ExecPreserveMode
, exec_preserve_mode
, EXEC_PRESERVE_MODE
);
65 test_table(ExecUtmpMode
, exec_utmp_mode
, EXEC_UTMP_MODE
);
66 test_table(ImageType
, image_type
, IMAGE_TYPE
);
67 test_table(ImportVerify
, import_verify
, IMPORT_VERIFY
);
68 test_table(JobMode
, job_mode
, JOB_MODE
);
69 test_table(JobResult
, job_result
, JOB_RESULT
);
70 test_table(JobState
, job_state
, JOB_STATE
);
71 test_table(JobType
, job_type
, JOB_TYPE
);
72 test_table(KillMode
, kill_mode
, KILL_MODE
);
73 test_table(KillWhom
, kill_whom
, KILL_WHOM
);
74 test_table(LocaleVariable
, locale_variable
, VARIABLE_LC
);
75 test_table(LogTarget
, log_target
, LOG_TARGET
);
76 test_table(ManagedOOMMode
, managed_oom_mode
, MANAGED_OOM_MODE
);
77 test_table(ManagedOOMPreference
, managed_oom_preference
, MANAGED_OOM_PREFERENCE
);
78 test_table(ManagerState
, manager_state
, MANAGER_STATE
);
79 test_table(ManagerTimestamp
, manager_timestamp
, MANAGER_TIMESTAMP
);
80 test_table(MountExecCommand
, mount_exec_command
, MOUNT_EXEC_COMMAND
);
81 test_table(MountResult
, mount_result
, MOUNT_RESULT
);
82 test_table(MountState
, mount_state
, MOUNT_STATE
);
83 test_table(NamePolicy
, name_policy
, NAMEPOLICY
);
84 test_table(NotifyAccess
, notify_access
, NOTIFY_ACCESS
);
85 test_table(NotifyState
, notify_state
, NOTIFY_STATE
);
86 test_table(OutputMode
, output_mode
, OUTPUT_MODE
);
87 test_table(PartitionDesignator
, partition_designator
, PARTITION_DESIGNATOR
);
88 test_table(PathResult
, path_result
, PATH_RESULT
);
89 test_table(PathState
, path_state
, PATH_STATE
);
90 test_table(PathType
, path_type
, PATH_TYPE
);
91 test_table(ProtectHome
, protect_home
, PROTECT_HOME
);
92 test_table(ProtectSystem
, protect_system
, PROTECT_SYSTEM
);
93 test_table(ResolveSupport
, resolve_support
, RESOLVE_SUPPORT
);
94 test_table(int, rlimit
, RLIMIT
);
95 test_table(ScopeResult
, scope_result
, SCOPE_RESULT
);
96 test_table(ScopeState
, scope_state
, SCOPE_STATE
);
97 test_table(ServiceExecCommand
, service_exec_command
, SERVICE_EXEC_COMMAND
);
98 test_table(ServiceRestart
, service_restart
, SERVICE_RESTART
);
99 test_table(ServiceRestartMode
, service_restart_mode
, SERVICE_RESTART_MODE
);
100 test_table(ServiceResult
, service_result
, SERVICE_RESULT
);
101 test_table(ServiceState
, service_state
, SERVICE_STATE
);
102 test_table(ServiceType
, service_type
, SERVICE_TYPE
);
103 test_table(ShowStatus
, show_status
, SHOW_STATUS
);
104 test_table(SliceState
, slice_state
, SLICE_STATE
);
105 test_table(SocketAddressBindIPv6Only
, socket_address_bind_ipv6_only
, SOCKET_ADDRESS_BIND_IPV6_ONLY
);
106 test_table(SocketExecCommand
, socket_exec_command
, SOCKET_EXEC_COMMAND
);
107 test_table(SocketResult
, socket_result
, SOCKET_RESULT
);
108 test_table(SocketState
, socket_state
, SOCKET_STATE
);
109 test_table(SwapExecCommand
, swap_exec_command
, SWAP_EXEC_COMMAND
);
110 test_table(SwapResult
, swap_result
, SWAP_RESULT
);
111 test_table(SwapState
, swap_state
, SWAP_STATE
);
112 test_table(TargetState
, target_state
, TARGET_STATE
);
113 test_table(TimerBase
, timer_base
, TIMER_BASE
);
114 test_table(TimerResult
, timer_result
, TIMER_RESULT
);
115 test_table(TimerState
, timer_state
, TIMER_STATE
);
116 test_table(UnitActiveState
, unit_active_state
, UNIT_ACTIVE_STATE
);
117 test_table(UnitDependency
, unit_dependency
, UNIT_DEPENDENCY
);
118 test_table(InstallChangeType
, install_change_type
, INSTALL_CHANGE_TYPE
);
119 test_table(UnitFilePresetMode
, unit_file_preset_mode
, UNIT_FILE_PRESET_MODE
);
120 test_table(UnitFileState
, unit_file_state
, UNIT_FILE_STATE
);
121 test_table(UnitLoadState
, unit_load_state
, UNIT_LOAD_STATE
);
122 test_table(UnitType
, unit_type
, UNIT_TYPE
);
123 test_table(Virtualization
, virtualization
, VIRTUALIZATION
);
124 test_table(Compression
, compression
, COMPRESSION
);
126 assert_cc(sizeof(sd_device_action_t
) == sizeof(int64_t));