From: kernel test robot <lkp@intel.com>
To: Daniel Latypov <dlatypov@google.com>, andriy.shevchenko@linux.intel.com
Cc: kbuild-all@lists.01.org, brendanhiggins@google.com,
davidgow@google.com, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org,
Daniel Latypov <dlatypov@google.com>
Subject: Re: [PATCH] lib: add basic KUnit test for lib/math
Date: Mon, 2 Nov 2020 22:51:11 +0800 [thread overview]
Message-ID: <20201102145111.GD20030@xsang-OptiPlex-9020> (raw)
In-Reply-To: <20201019224556.3536790-1-dlatypov@google.com>
[-- Attachment #1: Type: text/plain, Size: 3892 bytes --]
Hi Daniel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 7cf726a59435301046250c42131554d9ccc566b8]
url: https://github.com/0day-ci/linux/commits/Daniel-Latypov/lib-add-basic-KUnit-test-for-lib-math/20201020-064737
base: 7cf726a59435301046250c42131554d9ccc566b8
:::::: branch date: 13 days ago
:::::: commit date: 13 days ago
config: i386-randconfig-s002-20201101 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-68-g49c98aa3-dirty
# https://github.com/0day-ci/linux/commit/e268c8ae297dc311e5deb6b25daad9a2f88309ba
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Daniel-Latypov/lib-add-basic-KUnit-test-for-lib-math/20201020-064737
git checkout e268c8ae297dc311e5deb6b25daad9a2f88309ba
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> lib/math/math_test.c:137:37: sparse: sparse: shift too big (32) for type unsigned long
vim +137 lib/math/math_test.c
e268c8ae297dc31 Daniel Latypov 2020-10-19 109
e268c8ae297dc31 Daniel Latypov 2020-10-19 110 static void int_sqrt_test(struct kunit *test)
e268c8ae297dc31 Daniel Latypov 2020-10-19 111 {
e268c8ae297dc31 Daniel Latypov 2020-10-19 112 const char *message_fmt = "sqrt(%lu)";
e268c8ae297dc31 Daniel Latypov 2020-10-19 113 int i;
e268c8ae297dc31 Daniel Latypov 2020-10-19 114
e268c8ae297dc31 Daniel Latypov 2020-10-19 115 struct test_case test_cases[] = {
e268c8ae297dc31 Daniel Latypov 2020-10-19 116 {
e268c8ae297dc31 Daniel Latypov 2020-10-19 117 .a = 0,
e268c8ae297dc31 Daniel Latypov 2020-10-19 118 .result = 0,
e268c8ae297dc31 Daniel Latypov 2020-10-19 119 },
e268c8ae297dc31 Daniel Latypov 2020-10-19 120 {
e268c8ae297dc31 Daniel Latypov 2020-10-19 121 .a = 1,
e268c8ae297dc31 Daniel Latypov 2020-10-19 122 .result = 1,
e268c8ae297dc31 Daniel Latypov 2020-10-19 123 },
e268c8ae297dc31 Daniel Latypov 2020-10-19 124 {
e268c8ae297dc31 Daniel Latypov 2020-10-19 125 .a = 4,
e268c8ae297dc31 Daniel Latypov 2020-10-19 126 .result = 2,
e268c8ae297dc31 Daniel Latypov 2020-10-19 127 },
e268c8ae297dc31 Daniel Latypov 2020-10-19 128 {
e268c8ae297dc31 Daniel Latypov 2020-10-19 129 .a = 5,
e268c8ae297dc31 Daniel Latypov 2020-10-19 130 .result = 2,
e268c8ae297dc31 Daniel Latypov 2020-10-19 131 },
e268c8ae297dc31 Daniel Latypov 2020-10-19 132 {
e268c8ae297dc31 Daniel Latypov 2020-10-19 133 .a = 8,
e268c8ae297dc31 Daniel Latypov 2020-10-19 134 .result = 2,
e268c8ae297dc31 Daniel Latypov 2020-10-19 135 },
e268c8ae297dc31 Daniel Latypov 2020-10-19 136 {
e268c8ae297dc31 Daniel Latypov 2020-10-19 @137 .a = 1UL >> 32,
e268c8ae297dc31 Daniel Latypov 2020-10-19 138 .result = 1UL >> 16,
e268c8ae297dc31 Daniel Latypov 2020-10-19 139 },
e268c8ae297dc31 Daniel Latypov 2020-10-19 140 };
e268c8ae297dc31 Daniel Latypov 2020-10-19 141
e268c8ae297dc31 Daniel Latypov 2020-10-19 142 for (i = 0; i < ARRAY_SIZE(test_cases); ++i) {
e268c8ae297dc31 Daniel Latypov 2020-10-19 143 KUNIT_EXPECT_EQ_MSG(test, int_sqrt(test_cases[i].a),
e268c8ae297dc31 Daniel Latypov 2020-10-19 144 test_cases[i].result, message_fmt,
e268c8ae297dc31 Daniel Latypov 2020-10-19 145 test_cases[i].a);
e268c8ae297dc31 Daniel Latypov 2020-10-19 146 }
e268c8ae297dc31 Daniel Latypov 2020-10-19 147 }
e268c8ae297dc31 Daniel Latypov 2020-10-19 148
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34557 bytes --]
next prev parent reply other threads:[~2020-11-02 14:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 22:45 [PATCH] lib: add basic KUnit test for lib/math Daniel Latypov
2020-10-20 0:45 ` kernel test robot
2020-10-20 8:09 ` Andy Shevchenko
2020-10-20 16:13 ` Daniel Latypov
2020-10-21 3:40 ` David Gow
2020-10-21 17:47 ` Daniel Latypov
2020-10-22 15:06 ` Andy Shevchenko
2020-10-22 16:26 ` Daniel Latypov
2020-10-22 18:51 ` Brendan Higgins
2020-10-22 19:10 ` Andy Shevchenko
2020-10-22 19:12 ` Andy Shevchenko
2020-10-22 18:53 ` Brendan Higgins
2020-10-22 19:05 ` Andy Shevchenko
2020-10-22 21:21 ` Brendan Higgins
2020-10-23 9:02 ` Andy Shevchenko
2020-11-02 14:51 ` kernel test robot [this message]
2020-11-03 1:32 ` kernel test robot
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=20201102145111.GD20030@xsang-OptiPlex-9020 \
--to=lkp@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brendanhiggins@google.com \
--cc=davidgow@google.com \
--cc=dlatypov@google.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
/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).