From: kernel test robot <lkp@intel.com>
To: Max Kellermann <max.kellermann@ionos.com>, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Max Kellermann <max.kellermann@ionos.com>
Subject: Re: [PATCH 02/28] include: remove unnecessary #include directives
Date: Sat, 3 Feb 2024 07:58:42 +0800 [thread overview]
Message-ID: <202402030722.nMzDpW9K-lkp@intel.com> (raw)
In-Reply-To: <20240131145008.1345531-3-max.kellermann@ionos.com>
Hi Max,
kernel test robot noticed the following build warnings:
[auto build test WARNING on next-20240131]
[cannot apply to mkp-scsi/for-next jejb-scsi/for-next axboe-block/for-next linus/master v6.8-rc2 v6.8-rc1 v6.7 v6.8-rc2]
[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/Max-Kellermann/include-add-missing-includes/20240131-231042
base: next-20240131
patch link: https://lore.kernel.org/r/20240131145008.1345531-3-max.kellermann%40ionos.com
patch subject: [PATCH 02/28] include: remove unnecessary #include directives
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20240203/202402030722.nMzDpW9K-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240203/202402030722.nMzDpW9K-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402030722.nMzDpW9K-lkp@intel.com/
All warnings (new ones prefixed by >>):
lib/kunit/string-stream-test.c: In function 'string_stream_variable_length_line_test':
lib/kunit/string-stream-test.c:230:26: error: storage size of 'rnd' isn't known
230 | struct rnd_state rnd;
| ^~~
lib/kunit/string-stream-test.c:243:9: error: implicit declaration of function 'prandom_seed_state' [-Werror=implicit-function-declaration]
243 | prandom_seed_state(&rnd, 3141592653589793238ULL);
| ^~~~~~~~~~~~~~~~~~
lib/kunit/string-stream-test.c:246:26: error: implicit declaration of function 'prandom_u32_state' [-Werror=implicit-function-declaration]
246 | offset = prandom_u32_state(&rnd) % (sizeof(line) - 1);
| ^~~~~~~~~~~~~~~~~
>> lib/kunit/string-stream-test.c:230:26: warning: unused variable 'rnd' [-Wunused-variable]
230 | struct rnd_state rnd;
| ^~~
cc1: some warnings being treated as errors
vim +/rnd +230 lib/kunit/string-stream-test.c
4551caca6ab67f Richard Fitzgerald 2023-08-28 222
4551caca6ab67f Richard Fitzgerald 2023-08-28 223 /* Add a series of lines of variable length to a string_stream. */
4551caca6ab67f Richard Fitzgerald 2023-08-28 224 static void string_stream_variable_length_line_test(struct kunit *test)
4551caca6ab67f Richard Fitzgerald 2023-08-28 225 {
4551caca6ab67f Richard Fitzgerald 2023-08-28 226 static const char line[] =
4551caca6ab67f Richard Fitzgerald 2023-08-28 227 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
4551caca6ab67f Richard Fitzgerald 2023-08-28 228 " 0123456789!$%^&*()_-+={}[]:;@'~#<>,.?/|";
4551caca6ab67f Richard Fitzgerald 2023-08-28 229 struct string_stream *stream;
4551caca6ab67f Richard Fitzgerald 2023-08-28 @230 struct rnd_state rnd;
4551caca6ab67f Richard Fitzgerald 2023-08-28 231 char *concat_string, *pos, *string_end;
4551caca6ab67f Richard Fitzgerald 2023-08-28 232 size_t offset, total_len;
4551caca6ab67f Richard Fitzgerald 2023-08-28 233 int num_lines, i;
4551caca6ab67f Richard Fitzgerald 2023-08-28 234
20631e154c78f4 Richard Fitzgerald 2023-08-28 235 stream = kunit_alloc_string_stream(test, GFP_KERNEL);
4551caca6ab67f Richard Fitzgerald 2023-08-28 236 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, stream);
4551caca6ab67f Richard Fitzgerald 2023-08-28 237
4551caca6ab67f Richard Fitzgerald 2023-08-28 238 /*
4551caca6ab67f Richard Fitzgerald 2023-08-28 239 * Log many lines of varying lengths until we have created
4551caca6ab67f Richard Fitzgerald 2023-08-28 240 * many fragments.
4551caca6ab67f Richard Fitzgerald 2023-08-28 241 * The "randomness" must be repeatable.
4551caca6ab67f Richard Fitzgerald 2023-08-28 242 */
4551caca6ab67f Richard Fitzgerald 2023-08-28 243 prandom_seed_state(&rnd, 3141592653589793238ULL);
4551caca6ab67f Richard Fitzgerald 2023-08-28 244 total_len = 0;
4551caca6ab67f Richard Fitzgerald 2023-08-28 245 for (i = 0; i < 100; ++i) {
4551caca6ab67f Richard Fitzgerald 2023-08-28 246 offset = prandom_u32_state(&rnd) % (sizeof(line) - 1);
4551caca6ab67f Richard Fitzgerald 2023-08-28 247 string_stream_add(stream, "%s\n", &line[offset]);
4551caca6ab67f Richard Fitzgerald 2023-08-28 248 total_len += sizeof(line) - offset;
4551caca6ab67f Richard Fitzgerald 2023-08-28 249 }
4551caca6ab67f Richard Fitzgerald 2023-08-28 250 num_lines = i;
4551caca6ab67f Richard Fitzgerald 2023-08-28 251
4551caca6ab67f Richard Fitzgerald 2023-08-28 252 concat_string = get_concatenated_string(test, stream);
4551caca6ab67f Richard Fitzgerald 2023-08-28 253 KUNIT_EXPECT_NOT_ERR_OR_NULL(test, concat_string);
4551caca6ab67f Richard Fitzgerald 2023-08-28 254 KUNIT_EXPECT_EQ(test, strlen(concat_string), total_len);
4551caca6ab67f Richard Fitzgerald 2023-08-28 255
4551caca6ab67f Richard Fitzgerald 2023-08-28 256 /*
4551caca6ab67f Richard Fitzgerald 2023-08-28 257 * Split the concatenated string at the newlines and check that
4551caca6ab67f Richard Fitzgerald 2023-08-28 258 * all the original added strings are present.
4551caca6ab67f Richard Fitzgerald 2023-08-28 259 */
4551caca6ab67f Richard Fitzgerald 2023-08-28 260 prandom_seed_state(&rnd, 3141592653589793238ULL);
4551caca6ab67f Richard Fitzgerald 2023-08-28 261 pos = concat_string;
4551caca6ab67f Richard Fitzgerald 2023-08-28 262 for (i = 0; i < num_lines; ++i) {
4551caca6ab67f Richard Fitzgerald 2023-08-28 263 string_end = strchr(pos, '\n');
4551caca6ab67f Richard Fitzgerald 2023-08-28 264 KUNIT_EXPECT_NOT_NULL(test, string_end);
4551caca6ab67f Richard Fitzgerald 2023-08-28 265
4551caca6ab67f Richard Fitzgerald 2023-08-28 266 /* Convert to NULL-terminated string */
4551caca6ab67f Richard Fitzgerald 2023-08-28 267 *string_end = '\0';
4551caca6ab67f Richard Fitzgerald 2023-08-28 268
4551caca6ab67f Richard Fitzgerald 2023-08-28 269 offset = prandom_u32_state(&rnd) % (sizeof(line) - 1);
4551caca6ab67f Richard Fitzgerald 2023-08-28 270 KUNIT_EXPECT_STREQ(test, pos, &line[offset]);
4551caca6ab67f Richard Fitzgerald 2023-08-28 271
4551caca6ab67f Richard Fitzgerald 2023-08-28 272 pos = string_end + 1;
4551caca6ab67f Richard Fitzgerald 2023-08-28 273 }
4551caca6ab67f Richard Fitzgerald 2023-08-28 274
4551caca6ab67f Richard Fitzgerald 2023-08-28 275 /* There shouldn't be any more data after this */
4551caca6ab67f Richard Fitzgerald 2023-08-28 276 KUNIT_EXPECT_EQ(test, strlen(pos), 0);
4551caca6ab67f Richard Fitzgerald 2023-08-28 277 }
4551caca6ab67f Richard Fitzgerald 2023-08-28 278
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-02-02 23:59 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 14:49 [PATCH 00/28] Fast kernel headers: reduce header dependencies Max Kellermann
2024-01-31 14:49 ` [PATCH 01/28] include: add missing includes Max Kellermann
2024-01-31 14:49 ` [PATCH 02/28] include: remove unnecessary #include directives Max Kellermann
2024-02-02 23:58 ` kernel test robot [this message]
2024-01-31 14:49 ` [PATCH 03/28] include: reduce header dependencies by using "*_types.h" Max Kellermann
2024-01-31 14:49 ` [PATCH 04/28] workqueue.h: move struct delayed_work to workqueue_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 05/28] kref.h: move declarations to kref_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 06/28] kobject.h: move declarations to kobject_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 07/28] sysfs.h: move declarations to sysfs_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 08/28] maple_tree.h: move declarations to maple_tree_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 09/28] rwsem.h: move declarations to rwsem_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 10/28] uprobes.h: move declarations to uprobes_types.h Max Kellermann
2024-02-03 0:41 ` kernel test robot
2024-01-31 14:49 ` [PATCH 11/28] percpu_counter.h: move declarations to percpu_counter_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 12/28] bvec.h: move declarations to bvec_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 13/28] wait.h: move declarations to wait_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 14/28] swait.h: move declarations to swait_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 15/28] completion.h: move declarations to completion_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 16/28] device.h: move declarations to device_types.h Max Kellermann
2024-02-02 23:58 ` kernel test robot
2024-01-31 14:49 ` [PATCH 17/28] xarray.h: move declarations to xarray_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 18/28] blkdev.h: move blk_op_is_passthrough() to blk_types.h Max Kellermann
2024-01-31 14:49 ` [PATCH 19/28] bio.h: move bio_has_data() and bio_no_advance_iter() " Max Kellermann
2024-01-31 14:50 ` [PATCH 20/28] bio.h: move declarations to bio_types.h Max Kellermann
2024-01-31 14:50 ` [PATCH 21/28] percpu-refcount.h: move declarations to percpu-refcount_types.h Max Kellermann
2024-01-31 14:50 ` [PATCH 22/28] blkdev.h: move declarations to blkdev_types.h Max Kellermann
2024-01-31 14:50 ` [PATCH 23/28] sbitmap.h: move declarations to sbitmap_types.h Max Kellermann
2024-01-31 14:50 ` [PATCH 24/28] list_lru.h: move declarations to list_lru_types.h Max Kellermann
2024-01-31 14:50 ` [PATCH 25/28] list_bl.h: move declarations to list_bl_types.h Max Kellermann
2024-01-31 14:50 ` [PATCH 26/28] percpu-rwsem.h: move declarations to percpu-rwsem_types.h Max Kellermann
2024-01-31 14:50 ` [PATCH 27/28] quota.h: move declarations to quota_types.h Max Kellermann
2024-01-31 14:50 ` [PATCH 28/28] radix-tree.h: move declarations to radix-tree_types.h Max Kellermann
2024-01-31 21:44 ` [PATCH 00/28] Fast kernel headers: reduce header dependencies Randy Dunlap
2024-01-31 22:00 ` Max Kellermann
2024-02-01 18:08 ` Nick Desaulniers
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=202402030722.nMzDpW9K-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=max.kellermann@ionos.com \
--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 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).