| // SPDX-License-Identifier: GPL-2.0+ |
| * Copyright (c) 2021, Heinrich Schuchardt <xypron.glpk@gmx.de> |
| * Test continuation of log messages using pr_cont(). |
| #include <asm/global_data.h> |
| #include <linux/printk.h> |
| #define CONFIG_LOGLEVEL 4 |
| static int log_test_pr_cont(struct unit_test_state *uts) |
| log_level = gd->default_log_level; |
| /* Write two messages, the second continuing the first */ |
| gd->log_fmt = BIT(LOGF_MSG); |
| gd->default_log_level = LOGL_INFO; |
| console_record_reset_enable(); |
| gd->default_log_level = log_level; |
| gd->flags &= ~GD_FLG_RECORD; |
| ut_assertok(ut_check_console_line(uts, "ea1 cc2")); |
| ut_assertok(ut_check_console_end(uts)); |
| LOG_TEST(log_test_pr_cont); |