All of lore.kernel.org
 help / color / mirror / Atom feed
* [bvanassche:thread-safety 57/98] drivers/gpu/drm/ttm/tests/ttm_bo_test.c:227:31: error: macro 'KUNIT_ASSERT_EQ' requires 3 arguments, but only 2 given
@ 2026-04-07  3:55 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-07  3:55 UTC (permalink / raw)
  To: Bart Van Assche; +Cc: oe-kbuild-all

tree:   https://github.com/bvanassche/linux thread-safety
head:   dbf3e2d8d5ab9b4a26ad41d244565a4970faec68
commit: aac85b2b324f8d3c2713ee49c1258f6718fa34a5 [57/98] drm/ttm: Check the dma_resv_lock() return value
config: loongarch-randconfig-002-20260404 (https://download.01.org/0day-ci/archive/20260404/202604042032.4DPjmCo6-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260404/202604042032.4DPjmCo6-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/202604042032.4DPjmCo6-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/gpu/drm/ttm/tests/ttm_bo_test.c: In function 'ttm_bo_reserve_interrupted':
>> drivers/gpu/drm/ttm/tests/ttm_bo_test.c:227:31: error: macro 'KUNIT_ASSERT_EQ' requires 3 arguments, but only 2 given
     227 |         KUNIT_ASSERT_EQ(err, 0);
         |                               ^
   In file included from include/drm/drm_kunit_helpers.h:10,
                    from drivers/gpu/drm/ttm/tests/ttm_kunit_helpers.h:13,
                    from drivers/gpu/drm/ttm/tests/ttm_bo_test.c:17:
   include/kunit/test.h:1411:9: note: macro 'KUNIT_ASSERT_EQ' defined here
    1411 | #define KUNIT_ASSERT_EQ(test, left, right) \
         |         ^~~~~~~~~~~~~~~
>> drivers/gpu/drm/ttm/tests/ttm_bo_test.c:227:9: error: 'KUNIT_ASSERT_EQ' undeclared (first use in this function); did you mean 'KUNIT_ASSERTION'?
     227 |         KUNIT_ASSERT_EQ(err, 0);
         |         ^~~~~~~~~~~~~~~
         |         KUNIT_ASSERTION
   drivers/gpu/drm/ttm/tests/ttm_bo_test.c:227:9: note: each undeclared identifier is reported only once for each function it appears in


vim +/KUNIT_ASSERT_EQ +227 drivers/gpu/drm/ttm/tests/ttm_bo_test.c

   211	
   212	static void ttm_bo_reserve_interrupted(struct kunit *test)
   213	{
   214		struct ttm_buffer_object *bo;
   215		struct task_struct *task;
   216		int err;
   217	
   218		bo = ttm_bo_kunit_init(test, test->priv, BO_SIZE, NULL);
   219	
   220		task = kthread_create(threaded_ttm_bo_reserve, bo, "ttm-bo-reserve");
   221	
   222		if (IS_ERR(task))
   223			KUNIT_FAIL(test, "Couldn't create ttm bo reserve task\n");
   224	
   225		/* Take a lock so the threaded reserve has to wait */
   226		err = dma_resv_lock(bo->base.resv, NULL);
 > 227		KUNIT_ASSERT_EQ(err, 0);
   228	
   229		wake_up_process(task);
   230		msleep(20);
   231		err = kthread_stop(task);
   232	
   233		dma_resv_unlock(bo->base.resv);
   234	
   235		KUNIT_ASSERT_EQ(test, err, -ERESTARTSYS);
   236	}
   237	#endif /* IS_BUILTIN(CONFIG_DRM_TTM_KUNIT_TEST) */
   238	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-07  3:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07  3:55 [bvanassche:thread-safety 57/98] drivers/gpu/drm/ttm/tests/ttm_bo_test.c:227:31: error: macro 'KUNIT_ASSERT_EQ' requires 3 arguments, but only 2 given kernel test robot

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.