summaryrefslogtreecommitdiff
path: root/src/irmd/reg/tests
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2024-02-23 13:27:38 +0100
committerSander Vrijders <sander@ouroboros.rocks>2024-02-23 16:41:38 +0100
commitb65e5c1d45c8bfc38b3745cb28ac9074b1c1bdc1 (patch)
tree19aac189a295822ca597b6c923b27becc6249c20 /src/irmd/reg/tests
parentb7baa89fbaa04ceb3227d4d43089d8e6a5326b65 (diff)
downloadouroboros-b65e5c1d45c8bfc38b3745cb28ac9074b1c1bdc1.tar.gz
ouroboros-b65e5c1d45c8bfc38b3745cb28ac9074b1c1bdc1.zip
irmd: Always use reg_destroy_proc
Destroying a process will now always be done with reg_destroy_proc, regardless of whether it was an IPCP or spawned. This makes it easier to keep the registry consistent and avoid races. Also improves some logs and updates some default settings. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/reg/tests')
-rw-r--r--src/irmd/reg/tests/reg_test.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/irmd/reg/tests/reg_test.c b/src/irmd/reg/tests/reg_test.c
index f840a3e0..c341c297 100644
--- a/src/irmd/reg/tests/reg_test.c
+++ b/src/irmd/reg/tests/reg_test.c
@@ -538,7 +538,7 @@ static int test_reg_create_ipcp(void)
goto fail;
}
- if (reg_destroy_ipcp(info.pid) < 0) {
+ if (reg_destroy_proc(info.pid) < 0) {
printf("Failed to destroy ipcp.\n");
goto fail;
}
@@ -605,7 +605,7 @@ static int test_set_layer(void)
goto fail;
}
- if (reg_destroy_ipcp(info.pid) < 0) {
+ if (reg_destroy_proc(info.pid) < 0) {
printf("Failed to destroy ipcp.\n");
goto fail;
}
@@ -771,7 +771,7 @@ static int test_reg_spawned(void)
goto fail;
}
- if (reg_destroy_spawned(TEST_PID) < 0) {
+ if (reg_destroy_proc(TEST_PID) < 0) {
printf("Failed to destroy spawned.\n");
goto fail;
}
@@ -1291,7 +1291,7 @@ static int test_wait_ipcp_boot_timeout(void)
goto fail;
}
- if (reg_destroy_ipcp(info.pid) < 0) {
+ if (reg_destroy_proc(info.pid) < 0) {
printf("Failed to destroy ipcp.\n");
goto fail;
}
@@ -1357,7 +1357,7 @@ static int test_wait_ipcp_boot_fail(void)
pthread_join(thr, NULL);
- if (reg_destroy_ipcp(info.pid) < 0) {
+ if (reg_destroy_proc(info.pid) < 0) {
printf("Failed to destroy ipcp.\n");
goto fail;
}
@@ -1424,7 +1424,7 @@ static int test_wait_ipcp_boot_success(void)
goto fail;
}
- if (reg_destroy_ipcp(info.pid) < 0) {
+ if (reg_destroy_proc(info.pid) < 0) {
printf("Failed to destroy ipcp.\n");
goto fail;
}