From acd92b8873839bdaaf15aaf86c19edc9f165966e Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 7 Feb 2026 20:59:01 +0100 Subject: lib: Check fchown result when creating ssm_pool The result of fchown and fchmod weren't checked, causing some compilers to complain. Updated the test to create a PUP instead of "non-root" version of the GSPP. Removed the environment variable for the test suffix as this is not needed. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/ssm/tests/pool_sharding_test.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/lib/ssm/tests/pool_sharding_test.c') diff --git a/src/lib/ssm/tests/pool_sharding_test.c b/src/lib/ssm/tests/pool_sharding_test.c index 46eecd8d..4ecd2b9c 100644 --- a/src/lib/ssm/tests/pool_sharding_test.c +++ b/src/lib/ssm/tests/pool_sharding_test.c @@ -68,7 +68,7 @@ static int test_lazy_distribution(void) TEST_START(); - pool = ssm_pool_create(0, getgid()); + pool = ssm_pool_create(getuid(), getgid()); if (pool == NULL) { printf("Failed to create pool.\n"); goto fail; @@ -141,7 +141,7 @@ static int test_shard_migration(void) TEST_START(); - pool = ssm_pool_create(0, getgid()); + pool = ssm_pool_create(getuid(), getgid()); if (pool == NULL) { printf("Failed to create pool.\n"); goto fail; @@ -213,7 +213,7 @@ static int test_fallback_stealing(void) TEST_START(); - pool = ssm_pool_create(0, getgid()); + pool = ssm_pool_create(getuid(), getgid()); if (pool == NULL) { printf("Failed to create pool.\n"); goto fail; @@ -326,7 +326,7 @@ static int test_multiprocess_sharding(void) TEST_START(); - pool = ssm_pool_create(0, getgid()); + pool = ssm_pool_create(getuid(), getgid()); if (pool == NULL) { printf("Failed to create pool.\n"); goto fail; @@ -348,7 +348,7 @@ static int test_multiprocess_sharding(void) ssize_t off; int my_shard; - child_pool = ssm_pool_open(0); + child_pool = ssm_pool_open(getuid()); if (child_pool == NULL) exit(EXIT_FAILURE); @@ -442,7 +442,7 @@ static int test_exhaustion_with_fallback(void) TEST_START(); - pool = ssm_pool_create(0, getgid()); + pool = ssm_pool_create(getuid(), getgid()); if (pool == NULL) { printf("Failed to create pool.\n"); goto fail; -- cgit v1.2.3