2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-23 10:28:05 +00:00
criu/test/plugins/inventory_test_enabled_plugin.c
Radostin Stoyanov e6ce8f4054 zdtm: add inventory test plugins
This patch adds two test plugins to verify that CRIU plugins listed
in the inventory image are enabled, while those that are not listed
can be disabled.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2024-10-26 22:18:22 -07:00

17 lines
484 B
C

#include "criu-plugin.h"
#include "image.h"
int inventory_test_enabled_plugin_init(int stage)
{
if (stage == CR_PLUGIN_STAGE__RESTORE)
return !check_and_remove_inventory_plugin(CR_PLUGIN_DESC.name, strlen(CR_PLUGIN_DESC.name));
return add_inventory_plugin(CR_PLUGIN_DESC.name);
}
void inventory_test_enabled_plugin_fini(int stage, int ret)
{
return;
}
CR_PLUGIN_REGISTER("inventory_test_enabled_plugin", inventory_test_enabled_plugin_init, inventory_test_enabled_plugin_fini)