All of lore.kernel.org
 help / color / mirror / Atom feed
* [chao:feature/test/cache 14/14] fs/f2fs/cache_test.c:280:27: error: implicit declaration of function 'f2fs_cache_test_and_set_referenced'; did you mean 'f2fs_cache_test_and_clear_referenced'?
@ 2026-09-02  4:02 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-02  4:02 UTC (permalink / raw)
  To: Chao Yu; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git feature/test/cache
head:   80184bf033f71e094078e92116db41b8329e136a
commit: 80184bf033f71e094078e92116db41b8329e136a [14/14] f2fs: cache: introduce KUnit test suite
config: sh-randconfig-r062-20260901 (https://download.01.org/0day-ci/archive/20260902/202609021227.BGM2MWwj-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260902/202609021227.BGM2MWwj-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/202609021227.BGM2MWwj-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/err.h:5,
                    from include/kunit/assert.h:12,
                    from include/kunit/test.h:12,
                    from fs/f2fs/cache_test.c:9:
   fs/f2fs/cache_test.c: In function 'test_cache_block_states_and_bitlocks':
>> fs/f2fs/cache_test.c:280:27: error: implicit declaration of function 'f2fs_cache_test_and_set_referenced'; did you mean 'f2fs_cache_test_and_clear_referenced'? [-Werror=implicit-function-declaration]
     280 |  KUNIT_EXPECT_FALSE(test, f2fs_cache_test_and_set_referenced(entry));
         |                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/compiler.h:76:40: note: in definition of macro 'likely'
      76 | # define likely(x) __builtin_expect(!!(x), 1)
         |                                        ^
   include/kunit/test.h:810:2: note: in expansion of macro 'KUNIT_UNARY_ASSERTION'
     810 |  KUNIT_UNARY_ASSERTION(test,            \
         |  ^~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:1017:2: note: in expansion of macro 'KUNIT_FALSE_MSG_ASSERTION'
    1017 |  KUNIT_FALSE_MSG_ASSERTION(test,            \
         |  ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/kunit/test.h:1014:2: note: in expansion of macro 'KUNIT_EXPECT_FALSE_MSG'
    1014 |  KUNIT_EXPECT_FALSE_MSG(test, condition, NULL)
         |  ^~~~~~~~~~~~~~~~~~~~~~
   fs/f2fs/cache_test.c:280:2: note: in expansion of macro 'KUNIT_EXPECT_FALSE'
     280 |  KUNIT_EXPECT_FALSE(test, f2fs_cache_test_and_set_referenced(entry));
         |  ^~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +280 fs/f2fs/cache_test.c

   241	
   242	/* Module 5: F2FS_BLOCK_* block states and bit-locks */
   243	static void test_cache_block_states_and_bitlocks(struct kunit *test)
   244	{
   245		struct f2fs_cache_test_ctx *ctx = test->priv;
   246		struct f2fs_cached_block_list *cache = META_CACHE(&ctx->sbi);
   247		struct f2fs_cached_block *entry;
   248	
   249		entry = f2fs_grab_cache(cache, 1, F2FS_CACHE_CREATE);
   250		KUNIT_ASSERT_FALSE(test, IS_ERR(entry));
   251	
   252		/* Lock / Trylock / Unlock */
   253		KUNIT_EXPECT_TRUE(test, f2fs_trylock_cache(entry));
   254		KUNIT_EXPECT_TRUE(test, f2fs_cache_test_locked(entry));
   255		KUNIT_EXPECT_FALSE(test, f2fs_trylock_cache(entry));
   256		f2fs_unlock_cache(entry);
   257		KUNIT_EXPECT_FALSE(test, f2fs_cache_test_locked(entry));
   258	
   259		/* Uptodate */
   260		KUNIT_EXPECT_FALSE(test, f2fs_cache_test_uptodate(entry));
   261		f2fs_cache_set_uptodate(entry);
   262		KUNIT_EXPECT_TRUE(test, f2fs_cache_test_uptodate(entry));
   263		f2fs_cache_clear_uptodate(entry);
   264		KUNIT_EXPECT_FALSE(test, f2fs_cache_test_uptodate(entry));
   265	
   266		/* Dirty */
   267		KUNIT_EXPECT_FALSE(test, f2fs_cache_test_dirty(entry));
   268		f2fs_mark_cache_dirty(entry);
   269		KUNIT_EXPECT_TRUE(test, f2fs_cache_test_dirty(entry));
   270		KUNIT_EXPECT_TRUE(test, f2fs_cache_test_and_clear_dirty(entry));
   271		KUNIT_EXPECT_FALSE(test, f2fs_cache_test_dirty(entry));
   272	
   273		/* Inline */
   274		f2fs_cache_set_inline(entry);
   275		KUNIT_EXPECT_TRUE(test, f2fs_cache_test_inline(entry));
   276		f2fs_cache_clear_inline(entry);
   277		KUNIT_EXPECT_FALSE(test, f2fs_cache_test_inline(entry));
   278	
   279		/* Referenced */
 > 280		KUNIT_EXPECT_FALSE(test, f2fs_cache_test_and_set_referenced(entry));
   281		KUNIT_EXPECT_TRUE(test, f2fs_cache_test_and_set_referenced(entry));
   282		KUNIT_EXPECT_TRUE(test, f2fs_cache_test_and_clear_referenced(entry));
   283		KUNIT_EXPECT_FALSE(test, f2fs_cache_test_and_clear_referenced(entry));
   284	}
   285	

--
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-09-02  4:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02  4:02 [chao:feature/test/cache 14/14] fs/f2fs/cache_test.c:280:27: error: implicit declaration of function 'f2fs_cache_test_and_set_referenced'; did you mean 'f2fs_cache_test_and_clear_referenced'? 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.