]> git.baikalelectronics.ru Git - kernel.git/commit
lib/test-string_helpers.c: fix and improve string_get_size() tests
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 3 Feb 2016 00:57:18 +0000 (16:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Feb 2016 16:28:43 +0000 (08:28 -0800)
commit02ae9adf3c6acb79cd8d984638132d82827cd1d9
tree7ec74e7c5de71f659086228e9498700b4e5f6a27
parente81afeba99119913b3b3bba58f4c255c9582a0c3
lib/test-string_helpers.c: fix and improve string_get_size() tests

Recently added commit 272e7900c69b ("string_helpers: fix precision loss
for some inputs") fixed precision issues for string_get_size() and broke
tests.

Fix and improve them: test both STRING_UNITS_2 and STRING_UNITS_10 at a
time, better failure reporting, test small an huge values.

Fixes: 272e7900c69b0108 ("string_helpers: fix precision loss for some inputs")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: James Bottomley <JBottomley@Odin.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/test-string_helpers.c