chiark / gitweb /
support acpi firmware performance data (FPDT)
[elogind.git] / src / test / test-tables.c
1 /***
2   This file is part of systemd
3
4   Copyright 2013 Zbigniew JÄ™drzejewski-Szmek
5
6   systemd is free software; you can redistribute it and/or modify it
7   under the terms of the GNU Lesser General Public License as published by
8   the Free Software Foundation; either version 2.1 of the License, or
9   (at your option) any later version.
10
11   systemd is distributed in the hope that it will be useful, but
12   WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14   Lesser General Public License for more details.
15
16   You should have received a copy of the GNU Lesser General Public License
17   along with systemd; If not, see <http://www.gnu.org/licenses/>.
18 ***/
19
20 #include "automount.h"
21 #include "cgroup.h"
22 #include "condition.h"
23 #include "device.h"
24 #include "execute.h"
25 #include "exit-status.h"
26 #include "install.h"
27 #include "job.h"
28 #include "kill.h"
29 #include "log.h"
30 #include "logs-show.h"
31 #include "mount.h"
32 #include "path-lookup.h"
33 #include "path.h"
34 #include "scope.h"
35 #include "service.h"
36 #include "slice.h"
37 #include "snapshot.h"
38 #include "socket-util.h"
39 #include "socket.h"
40 #include "swap.h"
41 #include "target.h"
42 #include "timer.h"
43 #include "unit-name.h"
44 #include "unit.h"
45 #include "util.h"
46 #include "syscall-list.h"
47
48 #include "test-tables.h"
49
50 int main(int argc, char **argv) {
51         test_table(automount_result, AUTOMOUNT_RESULT);
52         test_table(automount_state, AUTOMOUNT_STATE);
53         test_table(cgroup_device_policy, CGROUP_DEVICE_POLICY);
54         test_table(condition_type, CONDITION_TYPE);
55         test_table(device_state, DEVICE_STATE);
56         test_table(exec_input, EXEC_INPUT);
57         test_table(exec_output, EXEC_OUTPUT);
58         test_table(job_mode, JOB_MODE);
59         test_table(job_result, JOB_RESULT);
60         test_table(job_state, JOB_STATE);
61         test_table(job_type, JOB_TYPE);
62         test_table(kill_mode, KILL_MODE);
63         test_table(kill_who, KILL_WHO);
64         test_table(log_target, LOG_TARGET);
65         test_table(mount_exec_command, MOUNT_EXEC_COMMAND);
66         test_table(mount_result, MOUNT_RESULT);
67         test_table(mount_state, MOUNT_STATE);
68         test_table(notify_access, NOTIFY_ACCESS);
69         test_table(output_mode, OUTPUT_MODE);
70         test_table(path_result, PATH_RESULT);
71         test_table(path_state, PATH_STATE);
72         test_table(path_type, PATH_TYPE);
73         test_table(scope_result, SCOPE_RESULT);
74         test_table(scope_state, SCOPE_STATE);
75         test_table(service_exec_command, SERVICE_EXEC_COMMAND);
76         test_table(service_restart, SERVICE_RESTART);
77         test_table(service_result, SERVICE_RESULT);
78         test_table(service_state, SERVICE_STATE);
79         test_table(service_type, SERVICE_TYPE);
80         test_table(slice_state, SLICE_STATE);
81         test_table(snapshot_state, SNAPSHOT_STATE);
82         test_table(socket_address_bind_ipv6_only, SOCKET_ADDRESS_BIND_IPV6_ONLY);
83         test_table(socket_exec_command, SOCKET_EXEC_COMMAND);
84         test_table(socket_result, SOCKET_RESULT);
85         test_table(socket_state, SOCKET_STATE);
86         test_table(start_limit_action, SERVICE_START_LIMIT);
87         test_table(swap_exec_command, SWAP_EXEC_COMMAND);
88         test_table(swap_result, SWAP_RESULT);
89         test_table(swap_state, SWAP_STATE);
90         test_table(systemd_running_as, SYSTEMD_RUNNING_AS);
91         test_table(target_state, TARGET_STATE);
92         test_table(timer_base, TIMER_BASE);
93         test_table(timer_result, TIMER_RESULT);
94         test_table(timer_state, TIMER_STATE);
95         test_table(unit_active_state, UNIT_ACTIVE_STATE);
96         test_table(unit_dependency, UNIT_DEPENDENCY);
97         test_table(unit_file_change_type, UNIT_FILE_CHANGE_TYPE);
98         test_table(unit_file_state, UNIT_FILE_STATE);
99         test_table(unit_load_state, UNIT_LOAD_STATE);
100         test_table(unit_type, UNIT_TYPE);
101
102         _test_table("syscall", syscall_to_name, syscall_from_name, syscall_max(), true);
103
104         return EXIT_SUCCESS;
105 }