shared: fix sysext ImageType IDL missing mstack value, add enum IDL test
Add the missing 'mstack' value to the ImageType enum in the io.systemd.sysext Varlink IDL — image_type_table in discover-image.c already defines IMAGE_MSTACK = "mstack" but it was absent from the IDL. Export vl_type_ImageType so the test can reference it, and add TEST_IDL_ENUM(ImageType, ...) to the enums_idl test to catch similar regressions in the future.
This commit is contained in:
@@ -8,12 +8,13 @@ static SD_VARLINK_DEFINE_ENUM_TYPE(
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(sysext),
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(confext));
|
||||
|
||||
static SD_VARLINK_DEFINE_ENUM_TYPE(
|
||||
SD_VARLINK_DEFINE_ENUM_TYPE(
|
||||
ImageType,
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(directory),
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(subvolume),
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(raw),
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(block));
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(block),
|
||||
SD_VARLINK_DEFINE_ENUM_VALUE(mstack));
|
||||
|
||||
static SD_VARLINK_DEFINE_METHOD(
|
||||
Merge,
|
||||
|
||||
@@ -3,4 +3,5 @@
|
||||
|
||||
#include "sd-varlink-idl.h"
|
||||
|
||||
extern const sd_varlink_symbol vl_type_ImageType;
|
||||
extern const sd_varlink_interface vl_interface_io_systemd_sysext;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "sd-varlink-idl.h"
|
||||
|
||||
#include "bootspec.h"
|
||||
#include "discover-image.h"
|
||||
#include "fd-util.h"
|
||||
#include "gpt.h"
|
||||
#include "json-util.h"
|
||||
@@ -541,6 +542,9 @@ TEST(enums_idl) {
|
||||
|
||||
TEST_IDL_ENUM(DnsOverTlsMode, dns_over_tls_mode, vl_type_DNSOverTLSMode);
|
||||
TEST_IDL_ENUM(ResolveSupport, resolve_support, vl_type_ResolveSupport);
|
||||
|
||||
TEST_IDL_ENUM(ImageType, image_type, vl_type_ImageType);
|
||||
TEST_IDL_ENUM_TO_STRING(ImageType, image_type, vl_type_ImageType);
|
||||
}
|
||||
|
||||
static SD_VARLINK_DEFINE_METHOD(
|
||||
|
||||
Reference in New Issue
Block a user