diff mbox series

drm/tests: Add back seed value information

Message ID 20221026211458.68432-1-arthurgrillo@riseup.net (mailing list archive)
State New, archived
Headers show
Series drm/tests: Add back seed value information | expand

Commit Message

Arthur Grillo Oct. 26, 2022, 9:14 p.m. UTC
As reported by Michał the drm_mm and drm_buddy unit tests lost the
printk with seed value after they being refactored into kunit. This
patch adds back this important information to assure reproducibility
converting them to use the kunit api.

Signed-off-by: Arthur Grillo <arthurgrillo@riseup.net>
Reported-by: Michał Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/tests/drm_buddy_test.c | 3 +++
 drivers/gpu/drm/tests/drm_mm_test.c    | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

kernel test robot Oct. 27, 2022, 12:44 a.m. UTC | #1
Hi Arthur,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on drm-intel/for-linux-next drm-tip/drm-tip linus/master v6.1-rc2 next-20221026]
[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/Arthur-Grillo/drm-tests-Add-back-seed-value-information/20221027-051625
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20221026211458.68432-1-arthurgrillo%40riseup.net
patch subject: [PATCH] drm/tests: Add back seed value information
config: ia64-allmodconfig
compiler: ia64-linux-gcc (GCC) 12.1.0
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/d4760e93f908692ad7af618d17c07aa709e6e3ca
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Arthur-Grillo/drm-tests-Add-back-seed-value-information/20221027-051625
        git checkout d4760e93f908692ad7af618d17c07aa709e6e3ca
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/gpu/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/kunit/assert.h:13,
                    from include/kunit/test.h:12,
                    from drivers/gpu/drm/tests/drm_buddy_test.c:7:
   drivers/gpu/drm/tests/drm_buddy_test.c: In function 'drm_buddy_init_test':
>> drivers/gpu/drm/tests/drm_buddy_test.c:735:17: error: expected ')' before 'random_seed'
     735 |                 random_seed);
         |                 ^~~~~~~~~~~
   include/linux/printk.h:381:42: note: in definition of macro '__printk_index_emit'
     381 |                 if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
         |                                          ^~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
   include/linux/printk.h:381:41: note: to match this '('
     381 |                 if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
         |                                         ^
   include/linux/printk.h:428:17: note: in expansion of macro '__printk_index_emit'
     428 |                 __printk_index_emit(_fmt, NULL, NULL);                  \
         |                 ^~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
>> drivers/gpu/drm/tests/drm_buddy_test.c:735:17: error: expected ')' before 'random_seed'
     735 |                 random_seed);
         |                 ^~~~~~~~~~~
   include/linux/printk.h:390:61: note: in definition of macro '__printk_index_emit'
     390 |                                 .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
         |                                                             ^~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
   include/linux/printk.h:390:60: note: to match this '('
     390 |                                 .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
         |                                                            ^
   include/linux/printk.h:428:17: note: in expansion of macro '__printk_index_emit'
     428 |                 __printk_index_emit(_fmt, NULL, NULL);                  \
         |                 ^~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
>> drivers/gpu/drm/tests/drm_buddy_test.c:735:17: error: expected ')' before 'random_seed'
     735 |                 random_seed);
         |                 ^~~~~~~~~~~
   include/linux/printk.h:390:70: note: in definition of macro '__printk_index_emit'
     390 |                                 .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
         |                                                                      ^~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
   include/linux/printk.h:390:69: note: to match this '('
     390 |                                 .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
         |                                                                     ^
   include/linux/printk.h:428:17: note: in expansion of macro '__printk_index_emit'
     428 |                 __printk_index_emit(_fmt, NULL, NULL);                  \
         |                 ^~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
>> drivers/gpu/drm/tests/drm_buddy_test.c:735:17: error: expected ')' before 'random_seed'
     735 |                 random_seed);
         |                 ^~~~~~~~~~~
   include/linux/printk.h:429:25: note: in definition of macro 'printk_index_wrap'
     429 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
   include/linux/printk.h:429:24: note: to match this '('
     429 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                        ^
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
>> include/linux/kern_levels.h:5:25: warning: format '%s' expects a matching 'char *' argument [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:429:25: note: in definition of macro 'printk_index_wrap'
     429 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   include/linux/kern_levels.h:14:25: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO       KERN_SOH "6"    /* informational */
         |                         ^~~~~~~~
   include/kunit/test.h:438:22: note: in expansion of macro 'KERN_INFO'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |                      ^~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
>> include/kunit/test.h:420:49: error: request for member 'log' in something not a structure or union
     420 |                 kunit_log_append((test_or_suite)->log,  fmt "\n",       \
         |                                                 ^~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
>> drivers/gpu/drm/tests/drm_buddy_test.c:735:17: error: expected ')' before 'random_seed'
     735 |                 random_seed);
         |                 ^~~~~~~~~~~
   include/kunit/test.h:420:57: note: in definition of macro 'kunit_log'
     420 |                 kunit_log_append((test_or_suite)->log,  fmt "\n",       \
         |                                                         ^~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
   include/kunit/test.h:420:33: note: to match this '('
     420 |                 kunit_log_append((test_or_suite)->log,  fmt "\n",       \
         |                                 ^
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_buddy_test.c:734:9: note: in expansion of macro 'kunit_info'
     734 |         kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
         |         ^~~~~~~~~~
--
   In file included from include/kunit/assert.h:13,
                    from include/kunit/test.h:12,
                    from drivers/gpu/drm/tests/drm_mm_test.c:8:
   drivers/gpu/drm/tests/drm_mm_test.c: In function 'drm_mm_init_test':
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:9: error: expected ')' before 'random_seed'
    2218 |         random_seed, max_iterations, max_prime);
         |         ^~~~~~~~~~~
   include/linux/printk.h:381:42: note: in definition of macro '__printk_index_emit'
     381 |                 if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
         |                                          ^~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
   include/linux/printk.h:381:41: note: to match this '('
     381 |                 if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
         |                                         ^
   include/linux/printk.h:428:17: note: in expansion of macro '__printk_index_emit'
     428 |                 __printk_index_emit(_fmt, NULL, NULL);                  \
         |                 ^~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:9: error: expected ')' before 'random_seed'
    2218 |         random_seed, max_iterations, max_prime);
         |         ^~~~~~~~~~~
   include/linux/printk.h:390:61: note: in definition of macro '__printk_index_emit'
     390 |                                 .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
         |                                                             ^~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
   include/linux/printk.h:390:60: note: to match this '('
     390 |                                 .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
         |                                                            ^
   include/linux/printk.h:428:17: note: in expansion of macro '__printk_index_emit'
     428 |                 __printk_index_emit(_fmt, NULL, NULL);                  \
         |                 ^~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:9: error: expected ')' before 'random_seed'
    2218 |         random_seed, max_iterations, max_prime);
         |         ^~~~~~~~~~~
   include/linux/printk.h:390:70: note: in definition of macro '__printk_index_emit'
     390 |                                 .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
         |                                                                      ^~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
   include/linux/printk.h:390:69: note: to match this '('
     390 |                                 .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
         |                                                                     ^
   include/linux/printk.h:428:17: note: in expansion of macro '__printk_index_emit'
     428 |                 __printk_index_emit(_fmt, NULL, NULL);                  \
         |                 ^~~~~~~~~~~~~~~~~~~
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:9: error: expected ')' before 'random_seed'
    2218 |         random_seed, max_iterations, max_prime);
         |         ^~~~~~~~~~~
   include/linux/printk.h:429:25: note: in definition of macro 'printk_index_wrap'
     429 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
   include/linux/printk.h:429:24: note: to match this '('
     429 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                        ^
   include/linux/printk.h:457:26: note: in expansion of macro 'printk_index_wrap'
     457 | #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
         |                          ^~~~~~~~~~~~~~~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
>> include/linux/kern_levels.h:5:25: warning: format '%s' expects a matching 'char *' argument [-Wformat=]
       5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
         |                         ^~~~~~
   include/linux/printk.h:429:25: note: in definition of macro 'printk_index_wrap'
     429 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
         |                         ^~~~
   include/kunit/test.h:419:17: note: in expansion of macro 'printk'
     419 |                 printk(lvl fmt, ##__VA_ARGS__);                         \
         |                 ^~~~~~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   include/linux/kern_levels.h:14:25: note: in expansion of macro 'KERN_SOH'
      14 | #define KERN_INFO       KERN_SOH "6"    /* informational */
         |                         ^~~~~~~~
   include/kunit/test.h:438:22: note: in expansion of macro 'KERN_INFO'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |                      ^~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
>> include/kunit/test.h:420:49: error: request for member 'log' in something not a structure or union
     420 |                 kunit_log_append((test_or_suite)->log,  fmt "\n",       \
         |                                                 ^~
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:9: error: expected ')' before 'random_seed'
    2218 |         random_seed, max_iterations, max_prime);
         |         ^~~~~~~~~~~
   include/kunit/test.h:420:57: note: in definition of macro 'kunit_log'
     420 |                 kunit_log_append((test_or_suite)->log,  fmt "\n",       \
         |                                                         ^~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~
   include/kunit/test.h:420:33: note: to match this '('
     420 |                 kunit_log_append((test_or_suite)->log,  fmt "\n",       \
         |                                 ^
   include/kunit/test.h:425:9: note: in expansion of macro 'kunit_log'
     425 |         kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
         |         ^~~~~~~~~
   include/kunit/test.h:438:9: note: in expansion of macro 'kunit_printk'
     438 |         kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
         |         ^~~~~~~~~~~~
   drivers/gpu/drm/tests/drm_mm_test.c:2217:9: note: in expansion of macro 'kunit_info'
    2217 |         kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
         |         ^~~~~~~~~~


vim +735 drivers/gpu/drm/tests/drm_buddy_test.c

   728	
   729	static int drm_buddy_init_test(struct kunit *test)
   730	{
   731		while (!random_seed)
   732			random_seed = get_random_u32();
   733	
   734		kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
 > 735			random_seed);
   736	
   737		return 0;
   738	}
   739
kernel test robot Oct. 27, 2022, 8:29 a.m. UTC | #2
Hi Arthur,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-misc/drm-misc-next]
[also build test ERROR on drm-intel/for-linux-next drm-tip/drm-tip linus/master v6.1-rc2 next-20221027]
[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/Arthur-Grillo/drm-tests-Add-back-seed-value-information/20221027-051625
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:    https://lore.kernel.org/r/20221026211458.68432-1-arthurgrillo%40riseup.net
patch subject: [PATCH] drm/tests: Add back seed value information
config: arm64-randconfig-r002-20221026
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 791a7ae1ba3efd6bca96338e10ffde557ba83920)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/intel-lab-lkp/linux/commit/d4760e93f908692ad7af618d17c07aa709e6e3ca
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Arthur-Grillo/drm-tests-Add-back-seed-value-information/20221027-051625
        git checkout d4760e93f908692ad7af618d17c07aa709e6e3ca
        # 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=arm64 SHELL=/bin/bash drivers/gpu/drm/tests/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/tests/drm_buddy_test.c:735:3: error: expected ')'
                   random_seed);
                   ^
   drivers/gpu/drm/tests/drm_buddy_test.c:734:2: note: to match this '('
           kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:419:3: note: expanded from macro 'kunit_log'
                   printk(lvl fmt, ##__VA_ARGS__);                         \
                   ^
   include/linux/printk.h:457:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                            ^
   include/linux/printk.h:428:3: note: expanded from macro 'printk_index_wrap'
                   __printk_index_emit(_fmt, NULL, NULL);                  \
                   ^
   include/linux/printk.h:381:27: note: expanded from macro '__printk_index_emit'
                   if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
                                           ^
>> drivers/gpu/drm/tests/drm_buddy_test.c:735:3: error: expected ')'
                   random_seed);
                   ^
   drivers/gpu/drm/tests/drm_buddy_test.c:734:2: note: to match this '('
           kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:419:3: note: expanded from macro 'kunit_log'
                   printk(lvl fmt, ##__VA_ARGS__);                         \
                   ^
   include/linux/printk.h:457:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                            ^
   include/linux/printk.h:428:3: note: expanded from macro 'printk_index_wrap'
                   __printk_index_emit(_fmt, NULL, NULL);                  \
                   ^
   include/linux/printk.h:390:32: note: expanded from macro '__printk_index_emit'
                                   .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
                                                              ^
>> drivers/gpu/drm/tests/drm_buddy_test.c:735:3: error: expected ')'
                   random_seed);
                   ^
   drivers/gpu/drm/tests/drm_buddy_test.c:734:2: note: to match this '('
           kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:419:3: note: expanded from macro 'kunit_log'
                   printk(lvl fmt, ##__VA_ARGS__);                         \
                   ^
   include/linux/printk.h:457:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                            ^
   include/linux/printk.h:428:3: note: expanded from macro 'printk_index_wrap'
                   __printk_index_emit(_fmt, NULL, NULL);                  \
                   ^
   include/linux/printk.h:390:41: note: expanded from macro '__printk_index_emit'
                                   .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
                                                                       ^
>> drivers/gpu/drm/tests/drm_buddy_test.c:735:3: error: expected ')'
                   random_seed);
                   ^
   drivers/gpu/drm/tests/drm_buddy_test.c:734:2: note: to match this '('
           kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:419:3: note: expanded from macro 'kunit_log'
                   printk(lvl fmt, ##__VA_ARGS__);                         \
                   ^
   include/linux/printk.h:457:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                            ^
   include/linux/printk.h:429:10: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                          ^
>> drivers/gpu/drm/tests/drm_buddy_test.c:734:2: error: member reference base type 'char' is not a structure or union
           kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:420:35: note: expanded from macro 'kunit_log'
                   kunit_log_append((test_or_suite)->log,  fmt "\n",       \
                                    ~~~~~~~~~~~~~~~^ ~~~
>> drivers/gpu/drm/tests/drm_buddy_test.c:735:3: error: expected ')'
                   random_seed);
                   ^
   drivers/gpu/drm/tests/drm_buddy_test.c:734:2: note: to match this '('
           kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:420:19: note: expanded from macro 'kunit_log'
                   kunit_log_append((test_or_suite)->log,  fmt "\n",       \
                                   ^
   6 errors generated.
--
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:2: error: expected ')'
           random_seed, max_iterations, max_prime);
           ^
   drivers/gpu/drm/tests/drm_mm_test.c:2217:2: note: to match this '('
           kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:419:3: note: expanded from macro 'kunit_log'
                   printk(lvl fmt, ##__VA_ARGS__);                         \
                   ^
   include/linux/printk.h:457:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                            ^
   include/linux/printk.h:428:3: note: expanded from macro 'printk_index_wrap'
                   __printk_index_emit(_fmt, NULL, NULL);                  \
                   ^
   include/linux/printk.h:381:27: note: expanded from macro '__printk_index_emit'
                   if (__builtin_constant_p(_fmt) && __builtin_constant_p(_level)) { \
                                           ^
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:2: error: expected ')'
           random_seed, max_iterations, max_prime);
           ^
   drivers/gpu/drm/tests/drm_mm_test.c:2217:2: note: to match this '('
           kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:419:3: note: expanded from macro 'kunit_log'
                   printk(lvl fmt, ##__VA_ARGS__);                         \
                   ^
   include/linux/printk.h:457:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                            ^
   include/linux/printk.h:428:3: note: expanded from macro 'printk_index_wrap'
                   __printk_index_emit(_fmt, NULL, NULL);                  \
                   ^
   include/linux/printk.h:390:32: note: expanded from macro '__printk_index_emit'
                                   .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
                                                              ^
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:2: error: expected ')'
           random_seed, max_iterations, max_prime);
           ^
   drivers/gpu/drm/tests/drm_mm_test.c:2217:2: note: to match this '('
           kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:419:3: note: expanded from macro 'kunit_log'
                   printk(lvl fmt, ##__VA_ARGS__);                         \
                   ^
   include/linux/printk.h:457:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                            ^
   include/linux/printk.h:428:3: note: expanded from macro 'printk_index_wrap'
                   __printk_index_emit(_fmt, NULL, NULL);                  \
                   ^
   include/linux/printk.h:390:41: note: expanded from macro '__printk_index_emit'
                                   .fmt = __builtin_constant_p(_fmt) ? (_fmt) : NULL, \
                                                                       ^
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:2: error: expected ')'
           random_seed, max_iterations, max_prime);
           ^
   drivers/gpu/drm/tests/drm_mm_test.c:2217:2: note: to match this '('
           kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:419:3: note: expanded from macro 'kunit_log'
                   printk(lvl fmt, ##__VA_ARGS__);                         \
                   ^
   include/linux/printk.h:457:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
                            ^
   include/linux/printk.h:429:10: note: expanded from macro 'printk_index_wrap'
                   _p_func(_fmt, ##__VA_ARGS__);                           \
                          ^
>> drivers/gpu/drm/tests/drm_mm_test.c:2217:2: error: member reference base type 'char' is not a structure or union
           kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:420:35: note: expanded from macro 'kunit_log'
                   kunit_log_append((test_or_suite)->log,  fmt "\n",       \
                                    ~~~~~~~~~~~~~~~^ ~~~
>> drivers/gpu/drm/tests/drm_mm_test.c:2218:2: error: expected ')'
           random_seed, max_iterations, max_prime);
           ^
   drivers/gpu/drm/tests/drm_mm_test.c:2217:2: note: to match this '('
           kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
           ^
   include/kunit/test.h:438:2: note: expanded from macro 'kunit_info'
           kunit_printk(KERN_INFO, test, fmt, ##__VA_ARGS__)
           ^
   include/kunit/test.h:425:2: note: expanded from macro 'kunit_printk'
           kunit_log(lvl, test, KUNIT_SUBTEST_INDENT "# %s: " fmt,         \
           ^
   include/kunit/test.h:420:19: note: expanded from macro 'kunit_log'
                   kunit_log_append((test_or_suite)->log,  fmt "\n",       \
                                   ^
   6 errors generated.


vim +735 drivers/gpu/drm/tests/drm_buddy_test.c

   728	
   729	static int drm_buddy_init_test(struct kunit *test)
   730	{
   731		while (!random_seed)
   732			random_seed = get_random_u32();
   733	
 > 734		kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
 > 735			random_seed);
   736	
   737		return 0;
   738	}
   739
diff mbox series

Patch

diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c
index 62f69589a72d..83c8863bc643 100644
--- a/drivers/gpu/drm/tests/drm_buddy_test.c
+++ b/drivers/gpu/drm/tests/drm_buddy_test.c
@@ -731,6 +731,9 @@  static int drm_buddy_init_test(struct kunit *test)
 	while (!random_seed)
 		random_seed = get_random_u32();
 
+	kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n",
+		random_seed);
+
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c
index c4b66eeae203..492347069d58 100644
--- a/drivers/gpu/drm/tests/drm_mm_test.c
+++ b/drivers/gpu/drm/tests/drm_mm_test.c
@@ -2214,6 +2214,9 @@  static int drm_mm_init_test(struct kunit *test)
 	while (!random_seed)
 		random_seed = get_random_u32();
 
+	kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n",
+	random_seed, max_iterations, max_prime);
+
 	return 0;
 }
 
@@ -2251,6 +2254,5 @@  static struct kunit_suite drm_mm_test_suite = {
 };
 
 kunit_test_suite(drm_mm_test_suite);
-
 MODULE_AUTHOR("Intel Corporation");
 MODULE_LICENSE("GPL");