From: Michael Tremer Date: Mon, 16 Dec 2024 18:30:37 +0000 (+0000) Subject: tests: cgroups: Fix return code checks X-Git-Tag: 0.9.30~692 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a51fd69195d5e7d2b5f713e3efd512b787064825;p=pakfire.git tests: cgroups: Fix return code checks Signed-off-by: Michael Tremer --- diff --git a/tests/libpakfire/cgroup.c b/tests/libpakfire/cgroup.c index 8e9581316..11ae3a4f3 100644 --- a/tests/libpakfire/cgroup.c +++ b/tests/libpakfire/cgroup.c @@ -56,8 +56,8 @@ static int test_recursive(const struct test* t) { int r = EXIT_FAILURE; // Try to create some invalid cgroups - ASSERT(pakfire_cgroup_create(&cgroup, t->ctx, NULL, NULL, 0) == -EINVAL); - ASSERT(pakfire_cgroup_create(&cgroup, t->ctx, NULL, "pakfire-test/a/", 0) == -EINVAL); + ASSERT_ERROR(pakfire_cgroup_create(&cgroup, t->ctx, NULL, NULL, 0), EINVAL); + ASSERT_ERROR(pakfire_cgroup_create(&cgroup, t->ctx, NULL, "pakfire-test/a/", 0), EINVAL); // Open a new cgroup ASSERT_SUCCESS(pakfire_cgroup_create(&cgroup, t->ctx, NULL, "pakfire-test/a/b/c", 0)); @@ -128,7 +128,7 @@ static int test_stats(const struct test* t) { } // Try reading the stats into some invalid space - ASSERT_ERRNO(pakfire_cgroup_stat(cgroup, NULL), EINVAL); + ASSERT_ERROR(pakfire_cgroup_stat(cgroup, NULL), EINVAL); // Read the stats ASSERT_SUCCESS(pakfire_cgroup_stat(cgroup, &stats));