From: kernel test robot <lkp@intel.com>
To: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org,
"Liam R. Howlett" <Liam.Howlett@oracle.com>
Subject: Re: [PATCH 33/34] maple_tree: Add testing for mas_{prev,next}_range()
Date: Wed, 26 Apr 2023 09:41:42 +0800 [thread overview]
Message-ID: <202304260916.KTgrhA2f-lkp@intel.com> (raw)
In-Reply-To: <20230425140955.3834476-34-Liam.Howlett@oracle.com>
Hi Liam,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
[also build test ERROR on linus/master v6.3 next-20230425]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Liam-R-Howlett/maple_tree-Fix-static-analyser-cppcheck-issue/20230425-233958
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20230425140955.3834476-34-Liam.Howlett%40oracle.com
patch subject: [PATCH 33/34] maple_tree: Add testing for mas_{prev,next}_range()
config: hexagon-randconfig-r045-20230424 (https://download.01.org/0day-ci/archive/20230426/202304260916.KTgrhA2f-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 437b7602e4a998220871de78afcb020b9c14a661)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/571139f33a7ede9db66c7892c40e88ed66a32bc5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Liam-R-Howlett/maple_tree-Fix-static-analyser-cppcheck-issue/20230425-233958
git checkout 571139f33a7ede9db66c7892c40e88ed66a32bc5
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304260916.KTgrhA2f-lkp@intel.com/
All errors (new ones prefixed by >>):
>> lib/test_maple_tree.c:3437:17: error: call to undeclared function 'mas_find_range'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
void *entry = mas_find_range(&mas, ULONG_MAX);
^
>> lib/test_maple_tree.c:3437:9: error: incompatible integer to pointer conversion initializing 'void *' with an expression of type 'int' [-Wint-conversion]
void *entry = mas_find_range(&mas, ULONG_MAX);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_maple_tree.c:3443:2: error: call to undeclared function 'mas_find_range'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
mas_contiguous(&mas, test, ULONG_MAX) {
^
include/linux/maple_tree.h:545:22: note: expanded from macro 'mas_contiguous'
while (((__entry) = mas_find_range((__mas), (__max))) != NULL)
^
>> lib/test_maple_tree.c:3443:2: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
mas_contiguous(&mas, test, ULONG_MAX) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/maple_tree.h:545:20: note: expanded from macro 'mas_contiguous'
while (((__entry) = mas_find_range((__mas), (__max))) != NULL)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_maple_tree.c:3453:2: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
mas_contiguous(&mas, test, ULONG_MAX) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/maple_tree.h:545:20: note: expanded from macro 'mas_contiguous'
while (((__entry) = mas_find_range((__mas), (__max))) != NULL)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_maple_tree.c:3464:2: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
mas_contiguous(&mas, test, 340) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/maple_tree.h:545:20: note: expanded from macro 'mas_contiguous'
while (((__entry) = mas_find_range((__mas), (__max))) != NULL)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_maple_tree.c:3476:7: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
test = mas_find_range(&mas, ULONG_MAX);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> lib/test_maple_tree.c:3482:9: error: call to undeclared function 'mas_find_range_rev'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
test = mas_find_range_rev(&mas, 0);
^
lib/test_maple_tree.c:3482:7: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
test = mas_find_range_rev(&mas, 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_maple_tree.c:3487:7: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
test = mas_find_range_rev(&mas, 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/test_maple_tree.c:3493:7: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
test = mas_find_range_rev(&mas, 340);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 errors generated.
vim +/mas_find_range +3437 lib/test_maple_tree.c
3358
3359 static noinline void __init check_slot_iterators(struct maple_tree *mt)
3360 {
3361 MA_STATE(mas, mt, 0, 0);
3362 unsigned long i, index = 40;
3363 unsigned char offset = 0;
3364 void *test;
3365
3366 mt_set_non_kernel(99999);
3367
3368 mas_lock(&mas);
3369 for (i = 0; i <= index; i++) {
3370 unsigned long end = 5;
3371 if (i > 20 && i < 35)
3372 end = 9;
3373 mas_set_range(&mas, i*10, i*10 + end);
3374 mas_store_gfp(&mas, xa_mk_value(i), GFP_KERNEL);
3375 }
3376
3377 i = 21;
3378 mas_set(&mas, i*10);
3379 MAS_BUG_ON(&mas, mas_walk(&mas) != xa_mk_value(i));
3380 MAS_BUG_ON(&mas, mas_prev_range(&mas, 0) != NULL);
3381 MAS_BUG_ON(&mas, mas.index != 206);
3382 MAS_BUG_ON(&mas, mas.last != 209);
3383
3384 i--;
3385 MAS_BUG_ON(&mas, mas_prev_range(&mas, 0) != xa_mk_value(i));
3386 MAS_BUG_ON(&mas, mas.index != 200);
3387 MAS_BUG_ON(&mas, mas.last != 205);
3388
3389 i = 25;
3390 mas_set(&mas, i*10);
3391 MAS_BUG_ON(&mas, mas_walk(&mas) != xa_mk_value(i));
3392 MAS_BUG_ON(&mas, mas.offset != 0);
3393
3394 /* Previous range is in another node */
3395 i--;
3396 MAS_BUG_ON(&mas, mas_prev_range(&mas, 0) != xa_mk_value(i));
3397 MAS_BUG_ON(&mas, mas.index != 240);
3398 MAS_BUG_ON(&mas, mas.last != 249);
3399
3400 /* Shift back with mas_next */
3401 i++;
3402 MAS_BUG_ON(&mas, mas_next_range(&mas, ULONG_MAX) != xa_mk_value(i));
3403 MAS_BUG_ON(&mas, mas.index != 250);
3404 MAS_BUG_ON(&mas, mas.last != 259);
3405
3406 i = 33;
3407 mas_set(&mas, i*10);
3408 MAS_BUG_ON(&mas, mas_walk(&mas) != xa_mk_value(i));
3409 MAS_BUG_ON(&mas, mas.index != 330);
3410 MAS_BUG_ON(&mas, mas.last != 339);
3411
3412 /* Next range is in another node */
3413 i++;
3414 MAS_BUG_ON(&mas, mas_next_range(&mas, ULONG_MAX) != xa_mk_value(i));
3415 MAS_BUG_ON(&mas, mas.offset != 0);
3416 MAS_BUG_ON(&mas, mas.index != 340);
3417 MAS_BUG_ON(&mas, mas.last != 349);
3418
3419 /* Next out of range */
3420 i++;
3421 MAS_BUG_ON(&mas, mas_next_range(&mas, i*10 - 1) != NULL);
3422 /* maple state does not move */
3423 MAS_BUG_ON(&mas, mas.offset != 0);
3424 MAS_BUG_ON(&mas, mas.index != 340);
3425 MAS_BUG_ON(&mas, mas.last != 349);
3426
3427 /* Prev out of range */
3428 i--;
3429 MAS_BUG_ON(&mas, mas_prev_range(&mas, i*10 + 1) != NULL);
3430 /* maple state does not move */
3431 MAS_BUG_ON(&mas, mas.offset != 0);
3432 MAS_BUG_ON(&mas, mas.index != 340);
3433 MAS_BUG_ON(&mas, mas.last != 349);
3434
3435 mas_set(&mas, 210);
3436 for (i = 210; i<= 350; i += 10) {
> 3437 void *entry = mas_find_range(&mas, ULONG_MAX);
3438
3439 MAS_BUG_ON(&mas, entry != xa_mk_value(i/10));
3440 }
3441
3442 mas_set(&mas, 0);
> 3443 mas_contiguous(&mas, test, ULONG_MAX) {
3444 MAS_BUG_ON(&mas, test != xa_mk_value(0));
3445 MAS_BUG_ON(&mas, mas.index != 0);
3446 MAS_BUG_ON(&mas, mas.last != 5);
3447 }
3448 MAS_BUG_ON(&mas, test != NULL);
3449 MAS_BUG_ON(&mas, mas.index != 6);
3450 MAS_BUG_ON(&mas, mas.last != 9);
3451
3452 mas_set(&mas, 6);
3453 mas_contiguous(&mas, test, ULONG_MAX) {
3454 MAS_BUG_ON(&mas, test != xa_mk_value(1));
3455 MAS_BUG_ON(&mas, mas.index != 10);
3456 MAS_BUG_ON(&mas, mas.last != 15);
3457 }
3458 MAS_BUG_ON(&mas, test != NULL);
3459 MAS_BUG_ON(&mas, mas.index != 16);
3460 MAS_BUG_ON(&mas, mas.last != 19);
3461
3462 i = 210;
3463 mas_set(&mas, i);
3464 mas_contiguous(&mas, test, 340) {
3465 MAS_BUG_ON(&mas, test != xa_mk_value(i/10));
3466 MAS_BUG_ON(&mas, mas.index != i);
3467 MAS_BUG_ON(&mas, mas.last != i+9);
3468 i+=10;
3469 offset = mas.offset;
3470 }
3471 /* Hit the limit, iterator is at the limit. */
3472 MAS_BUG_ON(&mas, offset != mas.offset);
3473 MAS_BUG_ON(&mas, test != NULL);
3474 MAS_BUG_ON(&mas, mas.index != 340);
3475 MAS_BUG_ON(&mas, mas.last != 349);
3476 test = mas_find_range(&mas, ULONG_MAX);
3477 MAS_BUG_ON(&mas, test != xa_mk_value(35));
3478 MAS_BUG_ON(&mas, mas.index != 350);
3479 MAS_BUG_ON(&mas, mas.last != 355);
3480
3481
> 3482 test = mas_find_range_rev(&mas, 0);
3483 MAS_BUG_ON(&mas, test != xa_mk_value(34));
3484 MAS_BUG_ON(&mas, mas.index != 340);
3485 MAS_BUG_ON(&mas, mas.last != 349);
3486 mas_set(&mas, 345);
3487 test = mas_find_range_rev(&mas, 0);
3488 MAS_BUG_ON(&mas, test != xa_mk_value(34));
3489 MAS_BUG_ON(&mas, mas.index != 340);
3490 MAS_BUG_ON(&mas, mas.last != 349);
3491
3492 offset = mas.offset;
3493 test = mas_find_range_rev(&mas, 340);
3494 MAS_BUG_ON(&mas, offset != mas.offset);
3495 MAS_BUG_ON(&mas, test != NULL);
3496 MAS_BUG_ON(&mas, mas.index != 340);
3497 MAS_BUG_ON(&mas, mas.last != 349);
3498
3499 mas_unlock(&mas);
3500 mt_set_non_kernel(0);
3501 }
3502
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
next prev parent reply other threads:[~2023-04-26 1:42 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 14:09 [PATCH 00/34] Maple tree mas_{next,prev}_range() and cleanup Liam R. Howlett
2023-04-25 14:09 ` [PATCH 01/34] maple_tree: Fix static analyser cppcheck issue Liam R. Howlett
2023-04-26 4:06 ` Peng Zhang
2023-04-25 14:09 ` [PATCH 02/34] maple_tree: Clean up mas_parent_enum() Liam R. Howlett
2023-04-25 16:13 ` Wei Yang
2023-04-26 4:14 ` Peng Zhang
2023-04-26 21:07 ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 03/34] maple_tree: Avoid unnecessary ascending Liam R. Howlett
2023-04-26 5:27 ` Peng Zhang
2023-04-25 14:09 ` [PATCH 04/34] maple_tree: Clean up mas_dfs_postorder() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 05/34] maple_tree: Add format option to mt_dump() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 06/34] maple_tree: Add debug BUG_ON and WARN_ON variants Liam R. Howlett
2023-04-25 14:09 ` [PATCH 07/34] maple_tree: Convert BUG_ON() to MT_BUG_ON() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 08/34] maple_tree: Change RCU checks to WARN_ON() instead of BUG_ON() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 09/34] maple_tree: Convert debug code to use MT_WARN_ON() and MAS_WARN_ON() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 10/34] maple_tree: Use MAS_BUG_ON() when setting a leaf node as a parent Liam R. Howlett
2023-04-28 10:08 ` Petr Tesařík
2023-05-03 19:31 ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 11/34] maple_tree: Use MAS_BUG_ON() in mas_set_height() Liam R. Howlett
2023-04-28 10:10 ` Petr Tesařík
2023-05-03 19:33 ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 12/34] maple_tree: Use MAS_BUG_ON() from mas_topiary_range() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 13/34] maple_tree: Use MAS_WR_BUG_ON() in mas_store_prealloc() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 14/34] maple_tree: Use MAS_BUG_ON() prior to calling mas_meta_gap() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 15/34] maple_tree: Return error on mte_pivots() out of range Liam R. Howlett
2023-04-26 9:55 ` Peng Zhang
2023-04-25 14:09 ` [PATCH 16/34] maple_tree: Make test code work without debug enabled Liam R. Howlett
2023-04-26 3:23 ` kernel test robot
2023-04-25 14:09 ` [PATCH 17/34] mm: Update validate_mm() to use vma iterator Liam R. Howlett
2023-04-25 14:09 ` [PATCH 18/34] mm: Update vma_iter_store() to use MAS_WARN_ON() Liam R. Howlett
2023-04-27 1:07 ` Sergey Senozhatsky
2023-04-27 1:17 ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 19/34] maple_tree: Add __init and __exit to test module Liam R. Howlett
2023-04-25 14:09 ` [PATCH 20/34] maple_tree: Remove unnecessary check from mas_destroy() Liam R. Howlett
2023-04-26 9:59 ` Peng Zhang
2023-04-25 14:09 ` [PATCH 21/34] maple_tree: mas_start() reset depth on dead node Liam R. Howlett
2023-04-28 2:45 ` Peng Zhang
2023-04-25 14:09 ` [PATCH 22/34] mm/mmap: Change do_vmi_align_munmap() for maple tree iterator changes Liam R. Howlett
2023-04-25 14:09 ` [PATCH 23/34] maple_tree: Try harder to keep active node after mas_next() Liam R. Howlett
2023-05-04 2:44 ` kernel test robot
2023-04-25 14:09 ` [PATCH 24/34] maple_tree: Try harder to keep active node with mas_prev() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 25/34] maple_tree: Clear up index and last setting in single entry tree Liam R. Howlett
2023-04-27 11:19 ` Peng Zhang
2023-04-27 17:25 ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 26/34] maple_tree: Update testing code for mas_{next,prev,walk} Liam R. Howlett
2023-05-04 3:33 ` Peng Zhang
2023-05-04 18:50 ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 27/34] maple_tree: Introduce mas_next_slot() interface Liam R. Howlett
2023-04-26 1:21 ` kernel test robot
2023-04-26 13:16 ` kernel test robot
2023-04-28 6:48 ` Peng Zhang
2023-05-03 19:31 ` Liam R. Howlett
2023-04-28 8:39 ` kernel test robot
2023-04-25 14:09 ` [PATCH 28/34] maple_tree: Revise limit checks in mas_empty_area{_rev}() Liam R. Howlett
2023-04-28 7:06 ` Peng Zhang
2023-04-25 14:09 ` [PATCH 29/34] maple_tree: Introduce mas_prev_slot() interface Liam R. Howlett
2023-04-28 8:27 ` Peng Zhang
2023-05-03 19:29 ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 30/34] maple_tree: Fix comments for mas_next_entry() and mas_prev_entry() Liam R. Howlett
2023-04-25 14:09 ` [PATCH 31/34] maple_tree: Add mas_next_range() and mas_find_range() interfaces Liam R. Howlett
2023-04-25 14:09 ` [PATCH 32/34] maple_tree: Add mas_prev_range() and mas_find_range_rev interface Liam R. Howlett
2023-04-25 14:09 ` [PATCH 33/34] maple_tree: Add testing for mas_{prev,next}_range() Liam R. Howlett
2023-04-26 1:41 ` kernel test robot [this message]
2023-05-05 17:11 ` Liam R. Howlett
2023-04-25 14:09 ` [PATCH 34/34] mm: Add vma_iter_{next,prev}_range() to vma iterator Liam R. Howlett
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=202304260916.KTgrhA2f-lkp@intel.com \
--to=lkp@intel.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=maple-tree@lists.infradead.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.