diff options
author | teor (Tim Wilson-Brown) <teor2345@gmail.com> | 2016-02-01 10:02:04 +1100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-02-01 09:50:43 -0500 |
commit | f7b2ae91e9e6c9d4c3d5c993cd146829d3f1f3d7 (patch) | |
tree | 868a192841930239a9c598590fe01cc8d5cf34d2 /src/test/test_util_process.c | |
parent | dbb5819e96e6f31a9ed5c46cda7d7ba1265a362c (diff) | |
download | tor-f7b2ae91e9e6c9d4c3d5c993cd146829d3f1f3d7.tar.gz tor-f7b2ae91e9e6c9d4c3d5c993cd146829d3f1f3d7.zip |
Make all unit tests independent of log message order and count
Diffstat (limited to 'src/test/test_util_process.c')
-rw-r--r-- | src/test/test_util_process.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/test_util_process.c b/src/test/test_util_process.c index cb1d5b2ebb..0a4354c043 100644 --- a/src/test/test_util_process.c +++ b/src/test/test_util_process.c @@ -34,8 +34,7 @@ test_util_process_set_waitpid_callback(void *ignored) res2 = set_waitpid_callback(pid, temp_callback, NULL); tt_assert(res2); - tt_str_op(mock_saved_log_at(0), OP_EQ, - "Replaced a waitpid monitor on pid 42. That should be " + expect_log_msg("Replaced a waitpid monitor on pid 42. That should be " "impossible.\n"); done: @@ -56,13 +55,12 @@ test_util_process_clear_waitpid_callback(void *ignored) res = set_waitpid_callback(pid, temp_callback, NULL); clear_waitpid_callback(res); - tt_int_op(mock_saved_log_number(), OP_EQ, 0); + expect_no_log_entry(); #if 0 /* No. This is use-after-free. We don't _do_ that. XXXX */ clear_waitpid_callback(res); - tt_str_op(mock_saved_log_at(0), OP_EQ, - "Couldn't remove waitpid monitor for pid 43.\n"); + expect_log_msg("Couldn't remove waitpid monitor for pid 43.\n"); #endif done: |