<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib/test_printf.c, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-01-16T19:17:29Z</updated>
<entry>
<title>lib/test_printf.c: test dentry printing</title>
<updated>2016-01-16T19:17:29Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2016-01-16T00:59:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=251c72345579b82df59eddfa184af53d6830959c'/>
<id>urn:sha1:251c72345579b82df59eddfa184af53d6830959c</id>
<content type='text'>
Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/test_printf.c: add test for large bitmaps</title>
<updated>2016-01-16T19:17:29Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2016-01-16T00:59:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=857cca4d565d85857597ccf0b6f72cf0f06e046c'/>
<id>urn:sha1:857cca4d565d85857597ccf0b6f72cf0f06e046c</id>
<content type='text'>
Following "lib/vsprintf.c: expand field_width to 24 bits", let's add a
test to see that we now actually support bitmaps with 65536 bits.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/test_printf.c: account for kvasprintf tests</title>
<updated>2016-01-16T19:17:29Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2016-01-16T00:59:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b79a7db37d560c9e4b6fdb5314cb8b226a2d6567'/>
<id>urn:sha1:b79a7db37d560c9e4b6fdb5314cb8b226a2d6567</id>
<content type='text'>
These should also count as performed tests.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/test_printf.c: add a few number() tests</title>
<updated>2016-01-16T19:17:28Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2016-01-16T00:58:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1ca8e8ebe991ff628d7e03ad4b5a11817a9655d5'/>
<id>urn:sha1:1ca8e8ebe991ff628d7e03ad4b5a11817a9655d5</id>
<content type='text'>
This adds a few tests to test_number, one of which serves to document
another deviation from POSIX/C99 (printing 0 with an explicit precision
of 0).

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/test_printf.c: test precision quirks</title>
<updated>2016-01-16T19:17:28Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2016-01-16T00:58:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f176eb4ce9d433184178d37a598ffdfe1cee1463'/>
<id>urn:sha1:f176eb4ce9d433184178d37a598ffdfe1cee1463</id>
<content type='text'>
The kernel's printf doesn't follow the standards in a few corner cases
(which are probably mostly irrelevant).  Add tests that document the
current behaviour.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/test_printf.c: check for out-of-bound writes</title>
<updated>2016-01-16T19:17:28Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2016-01-16T00:58:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=331e4deb6dfdac50d3f9c4ccbc41b1427335e212'/>
<id>urn:sha1:331e4deb6dfdac50d3f9c4ccbc41b1427335e212</id>
<content type='text'>
Add a few padding bytes on either side of the test buffer, and check
that these (and the part of the buffer not used) are untouched by
vsnprintf.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib/test_printf.c: don't BUG</title>
<updated>2016-01-16T19:17:27Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2016-01-16T00:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd0515d50ff33865d0f8cdd74510e8bd1aee88ac'/>
<id>urn:sha1:fd0515d50ff33865d0f8cdd74510e8bd1aee88ac</id>
<content type='text'>
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 &lt;linux@rasmusvillemoes.dk&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Al Viro &lt;viro@ZenIV.linux.org.uk&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Joe Perches &lt;joe@perches.com&gt;
Cc: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>test_printf: test printf family at runtime</title>
<updated>2015-11-07T01:50:42Z</updated>
<author>
<name>Rasmus Villemoes</name>
<email>linux@rasmusvillemoes.dk</email>
</author>
<published>2015-11-07T00:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=707cc7280f452a162c52bc240eae62568b9753c2'/>
<id>urn:sha1:707cc7280f452a162c52bc240eae62568b9753c2</id>
<content type='text'>
This adds a simple module for testing the kernel's printf facilities.
Previously, some %p extensions have caused a wrong return value in case
the entire output didn't fit and/or been unusable in kasprintf().  This
should help catch such issues.  Also, it should help ensure that changes
to the formatting algorithms don't break anything.

I'm not sure if we have a struct dentry or struct file lying around at
boot time or if we can fake one, but most %p extensions should be
testable, as should the ordinary number and string formatting.

The nature of vararg functions means we can't use a more conventional
table-driven approach.

For now, this is mostly a skeleton; contributions are very
welcome. Some tests are/will be slightly annoying to write, since the
expected output depends on stuff like CONFIG_*, sizeof(long), runtime
values etc.

Signed-off-by: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Reviewed-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Cc: Martin Kletzander &lt;mkletzan@redhat.com&gt;
Cc: Rasmus Villemoes &lt;linux@rasmusvillemoes.dk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
