From: kbuild test robot <lkp@intel.com>
To: Yury Norov <ynorov@caviumnetworks.com>
Cc: kbuild-all@01.org, Andrew Morton <akpm@linux-foundation.org>,
Noam Camus <noamca@mellanox.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Matthew Wilcox <mawilcox@microsoft.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-kernel@vger.kernel.org,
Yury Norov <ynorov@caviumnetworks.com>
Subject: Re: [PATCH 2/2] lib: add test for bitmap_parselist()
Date: Wed, 9 Aug 2017 11:28:56 +0800 [thread overview]
Message-ID: <201708091143.QqTgSaxI%fengguang.wu@intel.com> (raw)
In-Reply-To: <20170807225438.16161-2-ynorov@caviumnetworks.com>
[-- Attachment #1: Type: text/plain, Size: 4922 bytes --]
Hi Yury,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc4 next-20170808]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Yury-Norov/lib-make-bitmap_parselist-thread-safe-and-much-faster/20170809-105307
config: i386-randconfig-x000-201732 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
>> lib/test_bitmap.c:180:17: warning: large integer implicitly truncated to unsigned type [-Woverflow]
0xfffffffe, 0x3333333311111111, 0xffffffff77777777};
^~~~~~~~~~~~~~~~~~
lib/test_bitmap.c:180:37: warning: large integer implicitly truncated to unsigned type [-Woverflow]
0xfffffffe, 0x3333333311111111, 0xffffffff77777777};
^~~~~~~~~~~~~~~~~~
lib/test_bitmap.c:181:38: warning: large integer implicitly truncated to unsigned type [-Woverflow]
static const unsigned long exp2[] = {0x3333333311111111, 0xffffffff77777777};
^~~~~~~~~~~~~~~~~~
lib/test_bitmap.c:181:58: warning: large integer implicitly truncated to unsigned type [-Woverflow]
static const unsigned long exp2[] = {0x3333333311111111, 0xffffffff77777777};
^~~~~~~~~~~~~~~~~~
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from include/linux/bitmap.h:9,
from lib/test_bitmap.c:7:
lib/test_bitmap.c: In function 'test_bitmap_parselist':
include/linux/kern_levels.h:4:18: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'cycles_t {aka long long unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^~~~~~~~
include/linux/printk.h:301:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~
>> lib/test_bitmap.c:235:4: note: in expansion of macro 'pr_err'
pr_err("test %d: input is '%s' OK, Time: %lu\n",
^~~~~~
vim +180 lib/test_bitmap.c
177
178 static const unsigned long exp[] = {1, 2, 0x0000ffff, 0xffff0000, 0x55555555,
179 0xaaaaaaaa, 0x11111111, 0x22222222, 0xffffffff,
> 180 0xfffffffe, 0x3333333311111111, 0xffffffff77777777};
181 static const unsigned long exp2[] = {0x3333333311111111, 0xffffffff77777777};
182
183 static const struct test_bitmap_parselist parselist_tests[] __initconst = {
184 {0, "0", &exp[0], 8, 0},
185 {0, "1", &exp[1], 8, 0},
186 {0, "0-15", &exp[2], 32, 0},
187 {0, "16-31", &exp[3], 32, 0},
188 {0, "0-31:1/2", &exp[4], 32, 0},
189 {0, "1-31:1/2", &exp[5], 32, 0},
190 {0, "0-31:1/4", &exp[6], 32, 0},
191 {0, "1-31:1/4", &exp[7], 32, 0},
192 {0, "0-31:4/4", &exp[8], 32, 0},
193 {0, "1-31:4/4", &exp[9], 32, 0},
194 {0, "0-31:1/4,32-63:2/4", &exp[10], 64, 0},
195 {0, "0-31:3/4,32-63:4/4", &exp[11], 64, 0},
196
197 {0, "0-31:1/4,32-63:2/4,64-95:3/4,96-127:4/4", exp2, 128, 0},
198
199 {0, "0-2047:128/256", NULL, 2048, PARSE_TIME},
200
201 {-EINVAL, "-1", NULL, 8, 0},
202 {-EINVAL, "-0", NULL, 8, 0},
203 {-EINVAL, "10-1", NULL, 8, 0},
204 {-EINVAL, "0-31:10/1", NULL, 8, 0},
205 };
206
207 static void __init test_bitmap_parselist(void)
208 {
209 int i;
210 int err;
211 cycles_t cycles;
212 DECLARE_BITMAP(bmap, 2048);
213
214 for (i = 0; i < ARRAY_SIZE(parselist_tests); i++) {
215 #define ptest parselist_tests[i]
216
217 cycles = get_cycles();
218 err = bitmap_parselist(ptest.in, bmap, ptest.nbits);
219 cycles = get_cycles() - cycles;
220
221 if (err != ptest.errno) {
222 pr_err("test %d: input is %s, errno is %d, expected %d\n",
223 i, ptest.in, err, ptest.errno);
224 continue;
225 }
226
227 if (!err && ptest.expected
228 && !__bitmap_equal(bmap, ptest.expected, ptest.nbits)) {
229 pr_err("test %d: input is %s, result is 0x%lx, expected 0x%lx\n",
230 i, ptest.in, bmap[0], *ptest.expected);
231 continue;
232 }
233
234 if (ptest.flags & PARSE_TIME)
> 235 pr_err("test %d: input is '%s' OK, Time: %lu\n",
236 i, ptest.in, cycles);
237 }
238 }
239
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29920 bytes --]
next prev parent reply other threads:[~2017-08-09 3:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-07 22:54 [PATCH 1/2] lib: make bitmap_parselist thread-safe and much faster Yury Norov
2017-08-07 22:54 ` [PATCH 2/2] lib: add test for bitmap_parselist() Yury Norov
2017-08-09 3:28 ` kbuild test robot [this message]
2017-08-09 20:33 ` Andrew Morton
2017-08-09 22:52 ` Yury Norov
2017-08-10 7:30 ` Rasmus Villemoes
2017-08-10 10:37 ` Yury Norov
2017-08-09 4:11 ` kbuild test robot
2017-08-09 20:28 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201708091143.QqTgSaxI%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mawilcox@microsoft.com \
--cc=mchehab@kernel.org \
--cc=noamca@mellanox.com \
--cc=ynorov@caviumnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).