From: Christian Brauner Date: Wed, 3 May 2017 10:24:39 +0000 (+0200) Subject: test: add lxc_config_item_is_supported() tests X-Git-Tag: lxc-2.1.0~145^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1535%2Fhead;p=thirdparty%2Flxc.git test: add lxc_config_item_is_supported() tests Signed-off-by: Christian Brauner --- diff --git a/src/tests/get_item.c b/src/tests/get_item.c index cb4ba42eb..4e4a51196 100644 --- a/src/tests/get_item.c +++ b/src/tests/get_item.c @@ -391,6 +391,17 @@ int main(int argc, char *argv[]) fprintf(stderr, "%d: failed clearing lxc.hook\n", __LINE__); goto out; } + + if (!lxc_config_item_is_supported("lxc.arch")) { + fprintf(stderr, "%d: failed to report \"lxc.arch\" as supported configuration item\n", __LINE__); + goto out; + } + + if (lxc_config_item_is_supported("lxc.nonsense")) { + fprintf(stderr, "%d: failed to detect \"lxc.nonsense\" as unsupported configuration item\n", __LINE__); + goto out; + } + printf("All get_item tests passed\n"); ret = EXIT_SUCCESS; out: