test_printf.c (4e89a78779647ca7ee2967551c599633fe9d3647) | test_printf.c (5ead723a20e0447bc7db33dc3070b420e5f80aa6) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Test cases for printf facility. 4 */ 5 6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 7 8#include <linux/init.h> --- 21 unchanged lines hidden (view full) --- 30#define PAD_SIZE 16 31#define FILL_CHAR '$' 32 33KSTM_MODULE_GLOBALS(); 34 35static char *test_buffer __initdata; 36static char *alloced_buffer __initdata; 37 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Test cases for printf facility. 4 */ 5 6#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 7 8#include <linux/init.h> --- 21 unchanged lines hidden (view full) --- 30#define PAD_SIZE 16 31#define FILL_CHAR '$' 32 33KSTM_MODULE_GLOBALS(); 34 35static char *test_buffer __initdata; 36static char *alloced_buffer __initdata; 37 |
38extern bool no_hash_pointers; 39 |
|
38static int __printf(4, 0) __init 39do_test(int bufsize, const char *expect, int elen, 40 const char *fmt, va_list ap) 41{ 42 va_list aq; 43 int ret, written; 44 45 total_tests++; --- 250 unchanged lines hidden (view full) --- 296 * We can't use test() to test %p because we don't know what output to expect 297 * after an address is hashed. 298 */ 299static void __init 300plain(void) 301{ 302 int err; 303 | 40static int __printf(4, 0) __init 41do_test(int bufsize, const char *expect, int elen, 42 const char *fmt, va_list ap) 43{ 44 va_list aq; 45 int ret, written; 46 47 total_tests++; --- 250 unchanged lines hidden (view full) --- 298 * We can't use test() to test %p because we don't know what output to expect 299 * after an address is hashed. 300 */ 301static void __init 302plain(void) 303{ 304 int err; 305 |
306 if (no_hash_pointers) { 307 pr_warn("skipping plain 'p' tests"); 308 skipped_tests += 2; 309 return; 310 } 311 |
|
304 err = plain_hash(); 305 if (err) { 306 pr_warn("plain 'p' does not appear to be hashed\n"); 307 failed_tests++; 308 return; 309 } 310 311 err = plain_format(); --- 405 unchanged lines hidden --- | 312 err = plain_hash(); 313 if (err) { 314 pr_warn("plain 'p' does not appear to be hashed\n"); 315 failed_tests++; 316 return; 317 } 318 319 err = plain_format(); --- 405 unchanged lines hidden --- |