* [openeuler:OLK-6.6 2976/2976] fs/nfs/enfs/pm_ping.c:196:6: warning: no previous prototype for function 'enfs_test_reconnect_time'
@ 2025-10-17 2:58 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-10-17 2:58 UTC (permalink / raw)
To: kernel; +Cc: oe-kbuild-all
tree: https://gitee.com/openeuler/kernel.git OLK-6.6
head: 65461ffb14372269f333f0e18867775c14741e76
commit: 1c9eb515727c21c6c7b8212f40c006d656473bb6 [2976/2976] nfs/enfs: introduce reconnect time KUnit tests
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20251017/202510171010.KAuyBISF-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251017/202510171010.KAuyBISF-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/202510171010.KAuyBISF-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/nfs/enfs/pm_ping.c:196:6: warning: no previous prototype for function 'enfs_test_reconnect_time' [-Wmissing-prototypes]
196 | bool enfs_test_reconnect_time(void)
| ^
fs/nfs/enfs/pm_ping.c:196:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
196 | bool enfs_test_reconnect_time(void)
| ^
| static
1 warning generated.
vim +/enfs_test_reconnect_time +196 fs/nfs/enfs/pm_ping.c
194
195 #if IS_ENABLED(CONFIG_ENFS_KUNIT_TEST)
> 196 bool enfs_test_reconnect_time(void)
197 {
198 bool ret = true;
199 bool match;
200 s64 begin_ms = ktime_to_ms(ktime_get());
201 s64 ms;
202 unsigned int cookie = 1;
203 struct enfs_reconnect_time time = {
204 .head = 0,
205 .tail = 0,
206 .xprt_cookie = 0,
207 };
208
209 enfs_log_info("begin time: %lld ms\n", begin_ms);
210
211 ms = begin_ms;
212 enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
213 enfs_update_reconnect_time(&time, ms, cookie);
214 match = enfs_is_time_buf_empty(&time);
215 if (!match)
216 return false;
217
218 ms = begin_ms + 1000;
219 cookie += 1;
220 enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
221 enfs_update_reconnect_time(&time, ms, cookie);
222 match = time.head == 1 && time.tail == 0;
223 if (!match)
224 return false;
225
226 ms = begin_ms + 2000;
227 cookie += 1;
228 enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
229 enfs_update_reconnect_time(&time, ms, cookie);
230 match = time.head == 2 && time.tail == 0;
231 if (!match)
232 return false;
233
234 ms = begin_ms + 3000;
235 cookie += 1;
236 enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
237 enfs_update_reconnect_time(&time, ms, cookie);
238 match = time.head == 3 && time.tail == 0;
239 if (!match)
240 return false;
241
242 ms = begin_ms + 4000;
243 cookie += 1;
244 enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
245 enfs_update_reconnect_time(&time, ms, cookie);
246 match = time.head == 0 && time.tail == 1;
247 if (!match)
248 return false;
249 match = enfs_is_time_buf_full(&time);
250 if (!match)
251 return false;
252
253 ms = begin_ms + 5000;
254 /* cookie remains unchanged */
255 enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
256 enfs_update_reconnect_time(&time, ms, cookie);
257 match = time.head == 0 && time.tail == 1;
258 if (!match)
259 return false;
260
261 ms = begin_ms + 5000 + ENFS_UNSTABLE_STATE_TIMEOUT * 1000 + 1;
262 cookie += 1;
263 enfs_log_info("%lld ms, cookie:%d\n", ms, cookie);
264 enfs_update_reconnect_time(&time, ms, cookie);
265 match = time.head == 1 && time.tail == 0;
266 if (!match)
267 return false;
268
269 return ret;
270 }
271 #endif
272
--
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:[~2025-10-17 2:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-17 2:58 [openeuler:OLK-6.6 2976/2976] fs/nfs/enfs/pm_ping.c:196:6: warning: no previous prototype for function 'enfs_test_reconnect_time' 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.