diff options
-rw-r--r-- | lib/test_printf.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/test_printf.c b/lib/test_printf.c index 60740c10c3e8..4f6ae60433bc 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | 14 | ||
15 | #include <linux/bitmap.h> | 15 | #include <linux/bitmap.h> |
16 | #include <linux/dcache.h> | ||
16 | #include <linux/socket.h> | 17 | #include <linux/socket.h> |
17 | #include <linux/in.h> | 18 | #include <linux/in.h> |
18 | 19 | ||
@@ -326,9 +327,35 @@ uuid(void) | |||
326 | test("03020100-0504-0706-0809-0A0B0C0D0E0F", "%pUL", uuid); | 327 | test("03020100-0504-0706-0809-0A0B0C0D0E0F", "%pUL", uuid); |
327 | } | 328 | } |
328 | 329 | ||
330 | static struct dentry test_dentry[4] __initdata = { | ||
331 | { .d_parent = &test_dentry[0], | ||
332 | .d_name = QSTR_INIT(test_dentry[0].d_iname, 3), | ||
333 | .d_iname = "foo" }, | ||
334 | { .d_parent = &test_dentry[0], | ||
335 | .d_name = QSTR_INIT(test_dentry[1].d_iname, 5), | ||
336 | .d_iname = "bravo" }, | ||
337 | { .d_parent = &test_dentry[1], | ||
338 | .d_name = QSTR_INIT(test_dentry[2].d_iname, 4), | ||
339 | .d_iname = "alfa" }, | ||
340 | { .d_parent = &test_dentry[2], | ||
341 | .d_name = QSTR_INIT(test_dentry[3].d_iname, 5), | ||
342 | .d_iname = "romeo" }, | ||
343 | }; | ||
344 | |||
329 | static void __init | 345 | static void __init |
330 | dentry(void) | 346 | dentry(void) |
331 | { | 347 | { |
348 | test("foo", "%pd", &test_dentry[0]); | ||
349 | test("foo", "%pd2", &test_dentry[0]); | ||
350 | |||
351 | test("romeo", "%pd", &test_dentry[3]); | ||
352 | test("alfa/romeo", "%pd2", &test_dentry[3]); | ||
353 | test("bravo/alfa/romeo", "%pd3", &test_dentry[3]); | ||
354 | test("/bravo/alfa/romeo", "%pd4", &test_dentry[3]); | ||
355 | test("/bravo/alfa", "%pd4", &test_dentry[2]); | ||
356 | |||
357 | test("bravo/alfa |bravo/alfa ", "%-12pd2|%*pd2", &test_dentry[2], -12, &test_dentry[2]); | ||
358 | test(" bravo/alfa| bravo/alfa", "%12pd2|%*pd2", &test_dentry[2], 12, &test_dentry[2]); | ||
332 | } | 359 | } |
333 | 360 | ||
334 | static void __init | 361 | static void __init |