diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2022-04-17 11:30:11 -0700 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2022-04-20 10:51:11 -0700 |
commit | ec0d1849d990ae25017c7b611a4385f4ec2cc874 (patch) | |
tree | ff3991897f339cf596e175b8e5e05f77148afbc7 /tests | |
parent | b2528af10abea3d19aa42b33a65060ce3ff505cd (diff) |
util/log: Remove qemu_log_close
The only real use is in cpu_abort, where we have just
flushed the file via qemu_log_unlock, and are just about
to force-crash the application via abort. We do not
really need to close the FILE before the abort.
The two uses in test-logging.c can be handled with
qemu_set_log_filename_flags.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220417183019.755276-32-richard.henderson@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/test-logging.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/test-logging.c b/tests/unit/test-logging.c index 7327de7b5f..66dbc82a56 100644 --- a/tests/unit/test-logging.c +++ b/tests/unit/test-logging.c @@ -169,7 +169,7 @@ static void test_logfile_lock(gconstpointer data) * Initiate a close file and make sure our handle remains * valid since we still have the logfile lock. */ - qemu_log_close(); + qemu_set_log_filename_flags(NULL, 0, &error_abort); fprintf(logfile, "%s 2nd write to file\n", __func__); fflush(logfile); qemu_log_unlock(logfile); @@ -207,7 +207,7 @@ int main(int argc, char **argv) tmp_path, test_logfile_lock); rc = g_test_run(); - qemu_log_close(); + qemu_set_log_filename_flags(NULL, 0, &error_abort); drain_call_rcu(); rmdir_full(tmp_path); |