diff options
| author | Michael Biebl <biebl@debian.org> | 2023-02-10 11:50:34 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2023-02-10 11:50:34 +0100 |
| commit | 1372848511cb896b80b51ed1a3e9606bd9816631 (patch) | |
| tree | 674792b9385bdef935988894b45f06b2af39f88c /src/core/tests/test-core-with-expect.c | |
| parent | 40ec077ea305994c1fc2130add6787ca0c73e2c6 (diff) | |
New upstream version 1.42.0 upstream/1.42.0
Diffstat (limited to 'src/core/tests/test-core-with-expect.c')
| -rw-r--r-- | src/core/tests/test-core-with-expect.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/core/tests/test-core-with-expect.c b/src/core/tests/test-core-with-expect.c index de510c76..b05144ac 100644 --- a/src/core/tests/test-core-with-expect.c +++ b/src/core/tests/test-core-with-expect.c @@ -227,11 +227,11 @@ do_test_nm_utils_kill_child(void) { GLogLevelFlags fatal_mask; char *argv_watchdog[] = { - "bash", - "-c", - "sleep 4; " - "kill -KILL 0; #watchdog for #" TEST_TOKEN, - NULL, + "bash", + "-c", + "sleep 4; " + "kill -KILL 0; #watchdog for #" TEST_TOKEN, + NULL, }; char *argv1[] = { "bash", @@ -282,7 +282,7 @@ do_test_nm_utils_kill_child(void) pid4a = test_nm_utils_kill_child_spawn(argv4, TRUE); /* give processes time to start (and potentially block signals) ... */ - g_usleep(G_USEC_PER_SEC / 10); + g_usleep(G_USEC_PER_SEC / 5); fatal_mask = g_log_set_always_fatal(G_LOG_FATAL_MASK); @@ -338,12 +338,12 @@ do_test_nm_utils_kill_child(void) "(No child process*, 10) after sending no signal (0)"); test_nm_utils_kill_child_sync_do("test-s-3-2", pid3s, 0, 0, FALSE, NULL); - NMTST_EXPECT_NM_DEBUG("kill child process 'test-s-4' (*): waiting up to 1 milliseconds for " + NMTST_EXPECT_NM_DEBUG("kill child process 'test-s-4' (*): waiting up to 50 milliseconds for " "process to terminate normally after sending SIGTERM (15)..."); NMTST_EXPECT_NM_DEBUG("kill child process 'test-s-4' (*): sending SIGKILL..."); NMTST_EXPECT_NM_DEBUG("kill child process 'test-s-4' (*): after sending SIGTERM (15) and " "SIGKILL, process * exited by signal 9 (* usec elapsed)"); - test_nm_utils_kill_child_sync_do("test-s-4", pid4s, SIGTERM, 1, TRUE, &expected_signal_KILL); + test_nm_utils_kill_child_sync_do("test-s-4", pid4s, SIGTERM, 50, TRUE, &expected_signal_KILL); NMTST_EXPECT_NM_DEBUG("kill child process 'test-a-1-1' (*): wait for process to terminate " "after sending SIGTERM (15) (send SIGKILL in 3000 milliseconds)..."); @@ -528,27 +528,27 @@ test_nm_utils_array_remove_at_indexes(void) _remove_at_indexes_init_random_idx(idx, i_len, i_idx_len); g_array_set_size(array, i_len); for (i = 0; i < i_len; i++) - g_array_index(array, gssize, i) = i; + nm_g_array_index(array, gssize, i) = i; - nm_utils_array_remove_at_indexes(array, &g_array_index(idx, guint, 0), i_idx_len); + nm_utils_array_remove_at_indexes(array, nm_g_array_first_p(idx, guint), i_idx_len); g_hash_table_remove_all(unique); /* ensure that all the indexes are still unique */ for (i = 0; i < array->len; i++) - g_hash_table_add(unique, GUINT_TO_POINTER(g_array_index(array, gssize, i))); + g_hash_table_add(unique, GUINT_TO_POINTER(nm_g_array_index(array, gssize, i))); g_assert_cmpint(g_hash_table_size(unique), ==, array->len); for (i = 0; i < idx->len; i++) - g_hash_table_add(unique, GUINT_TO_POINTER(g_array_index(idx, guint, i))); + g_hash_table_add(unique, GUINT_TO_POINTER(nm_g_array_index(idx, guint, i))); g_assert_cmpint(g_hash_table_size(unique), ==, i_len); /* ensure proper sort order in array */ for (i = 0; i < array->len; i++) { - gssize i1 = g_array_index(array, gssize, i); + gssize i1 = nm_g_array_index(array, gssize, i); g_assert(i1 >= 0 && i1 < i_len); if (i > 0) { - gsize i0 = g_array_index(array, gssize, i - 1); + gsize i0 = nm_g_array_index(array, gssize, i - 1); g_assert_cmpint(i0, <, i1); } } |