varlink: add enum types for class and whom fields in io.systemd.Machine
Convert the class field (Register input, List output) from plain string to MachineClass enum type, and the whom field (Kill input) to KillWhom enum type. Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -503,6 +503,10 @@ executables += [
|
||||
core_test_template + {
|
||||
'sources' : files('test-varlink-idl-manager.c'),
|
||||
},
|
||||
test_template + {
|
||||
'sources' : files('test-varlink-idl-machine.c'),
|
||||
'objects' : ['systemd-machined'],
|
||||
},
|
||||
test_template + {
|
||||
'sources' : files('test-watchdog.c'),
|
||||
'type' : 'unsafe',
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
|
||||
#include "machine.h"
|
||||
#include "tests.h"
|
||||
#include "test-varlink-idl-util.h"
|
||||
#include "varlink-io.systemd.Machine.h"
|
||||
|
||||
TEST(machine_enums_idl) {
|
||||
TEST_IDL_ENUM(MachineClass, machine_class, vl_type_MachineClass);
|
||||
TEST_IDL_ENUM(KillWhom, kill_whom, vl_type_KillWhom);
|
||||
}
|
||||
|
||||
DEFINE_TEST_MAIN(LOG_DEBUG);
|
||||
Reference in New Issue
Block a user