+ lib-test_bitmap-switch-test_bitmap_parselist-to-ktime_get.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: lib/test_bitmap.c: switch test_bitmap_parselist to ktime_get()
has been added to the -mm tree.  Its filename is
     lib-test_bitmap-switch-test_bitmap_parselist-to-ktime_get.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/lib-test_bitmap-switch-test_bitmap_parselist-to-ktime_get.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/lib-test_bitmap-switch-test_bitmap_parselist-to-ktime_get.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yury Norov <yury.norov@xxxxxxxxx>
Subject: lib/test_bitmap.c: switch test_bitmap_parselist to ktime_get()

test_bitmap_parselist uses get_cycles().  Only arm, arm64, openrisc, riscv
and sparc64 implement get_cycles() and others take a stub from
include/asm-generic/timex.h.

So, switch to more generic ktime_get().

Link: http://lkml.kernel.org/r/20190325210748.6571-5-ynorov@xxxxxxxxxxx
Fixes: 6df0d464dbcc1a55 (lib/test_bitmap.c: add test for bitmap_parselist())
Signed-off-by: Yury Norov <ynorov@xxxxxxxxxxx>
Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
Cc: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/test_bitmap.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- a/lib/test_bitmap.c~lib-test_bitmap-switch-test_bitmap_parselist-to-ktime_get
+++ a/lib/test_bitmap.c
@@ -266,15 +266,15 @@ static void __init test_bitmap_parselist
 {
 	int i;
 	int err;
-	cycles_t cycles;
+	ktime_t time;
 	DECLARE_BITMAP(bmap, 2048);
 
 	for (i = 0; i < ARRAY_SIZE(parselist_tests); i++) {
 #define ptest parselist_tests[i]
 
-		cycles = get_cycles();
+		time = ktime_get();
 		err = bitmap_parselist(ptest.in, bmap, ptest.nbits);
-		cycles = get_cycles() - cycles;
+		time = ktime_get() - time;
 
 		if (err != ptest.errno) {
 			pr_err("test %d: input is %s, errno is %d, expected %d\n",
@@ -291,8 +291,7 @@ static void __init test_bitmap_parselist
 
 		if (ptest.flags & PARSE_TIME)
 			pr_err("test %d: input is '%s' OK, Time: %llu\n",
-					i, ptest.in,
-					(unsigned long long)cycles);
+					i, ptest.in, time);
 	}
 }
 
_

Patches currently in -mm which might be from yury.norov@xxxxxxxxx are

bitmap_parselist-dont-calculate-length-of-the-input-string.patch
bitmap_parselist-move-non-parser-logic-to-helpers.patch
bitmap_parselist-rework-input-string-parser.patch
lib-test_bitmap-switch-test_bitmap_parselist-to-ktime_get.patch
lib-test_bitmap-add-testcases-for-bitmap_parselist.patch
lib-test_bitmap-add-tests-for-bitmap_parselist_user.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux