diff options
| author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2026-02-07 20:59:01 +0100 |
|---|---|---|
| committer | Sander Vrijders <sander@ouroboros.rocks> | 2026-02-13 09:22:29 +0100 |
| commit | acd92b8873839bdaaf15aaf86c19edc9f165966e (patch) | |
| tree | 09f6fe68c784b5a7d3c929a31fe76daeb19d73b4 /src/lib/ssm/tests/pool_sharding_test.c | |
| parent | ec473cb9a6817bc748c4496a6dba719e7b751368 (diff) | |
| download | ouroboros-acd92b8873839bdaaf15aaf86c19edc9f165966e.tar.gz ouroboros-acd92b8873839bdaaf15aaf86c19edc9f165966e.zip | |
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 <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib/ssm/tests/pool_sharding_test.c')
| -rw-r--r-- | src/lib/ssm/tests/pool_sharding_test.c | 12 |
1 files changed, 6 insertions, 6 deletions
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; |
