mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
lib/test_printf.c: don't BUG
BUG is a completely unnecessarily big hammer, and we're more likely to get the internal bug reported if we just pr_err() and ensure the test suite fails. Signed-off-by: Rasmus Villemoes <[email protected]> Acked-by: Kees Cook <[email protected]> Cc: Al Viro <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Joe Perches <[email protected]> Cc: Maurizio Lombardi <[email protected]> Cc: Tejun Heo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
8e2a2bfdb8
commit
fd0515d50f
1 file changed
+6
-1
+6
-1
@@ -91,7 +91,12 @@ __test(const char *expect, int elen, const char *fmt, ...)
|
||||
int rand;
|
||||
char *p;
|
||||
|
||||
BUG_ON(elen >= BUF_SIZE);
|
||||
if (elen >= BUF_SIZE) {
|
||||
pr_err("error in test suite: expected output length %d too long. Format was '%s'.\n",
|
||||
elen, fmt);
|
||||
failed_tests++;
|
||||
return;
|
||||
}
|
||||
|
||||
va_start(ap, fmt);
|
||||
|
||||
|
||||
Reference in new issue
Block a user