#53 memfd_test build failed in Rawhide with errors: implicit declaration of function
Opened by mattf. Modified

When I ran the default kernel tests on 6.10.0-0.rc5.20240628git5bbd9b249880.47.fc41.x86_64 and earlier in Rawhide/41 KDE live images, the memfd_test build failed with three errors: implicit declaration of function.

Starting test ./default/memfd
memfd_test.c: In function ‘mfd_assert_get_seals’:
memfd_test.c:67:13: error: implicit declaration of function ‘fcntl’ [-Wimplicit-function-declaration]
67 | r = fcntl(fd, F_GET_SEALS);
| ^~~~~
memfd_test.c: In function ‘mfd_assert_open’:
memfd_test.c:190:13: error: implicit declaration of function ‘open’; did you mean ‘popen’? [-Wimplicit-function-declaration]
190 | r = open(buf, flags, mode);
| ^~~~
| popen
memfd_test.c: In function ‘mfd_assert_write’:
memfd_test.c:315:13: error: implicit declaration of function ‘fallocate’; did you mean ‘alloca’? [-Wimplicit-function-declaration]
315 | r = fallocate(fd,
| ^~~~~~~~~
| alloca
memfd_test build failed.

The memfd test still passed. The change https://fedoraproject.org/wiki/Changes/PortingToModernC removed implicit function declarations via -Werror=implicit-function-declaration


The memfd test actually seemed to be skipped when I ran the tests again. The last error I reported being crossed-out when shown on the pagure page was unintentional.

Still happens for me, is this error to be exptected?

Date: Mo 14. Jul 08:34:20 CEST 2025
Test set: default
Kernel: 6.15.6-200.fc42.x86_64
Release: Fedora release 42 (Adams)
Result: FAIL
Failed Tests: ./default/cachedrop
Warned Tests: None
============================================================
Starting test ./default/cachedrop
100+0 records in
100+0 records out
104857600 bytes (105 MB, 100 MiB) copied, 0,10358 s, 1,0 GB/s
10+0 records in
10+0 records out
10485760 bytes (10 MB, 10 MiB) copied, 0,0129527 s, 810 MB/s
TestError: Can't free dentries and inodes and pagecache
2125972 2072128
Could not run tests
Starting test ./default/insert_leap_second
Setting time to speed up testing
Running for 1 iterations. Press ctrl-c to stop
Setting time to Tue Jul 15 01:59:50 2025
Scheduling leap second for Tue Jul 15 02:00:00 2025
Tue Jul 15 01:59:57 2025 +    110 us (37)   TIME_INS
Tue Jul 15 01:59:57 2025 + 500246 us (37)   TIME_INS
Tue Jul 15 01:59:58 2025 +    414 us (37)   TIME_INS
Tue Jul 15 01:59:58 2025 + 500562 us (37)   TIME_INS
Tue Jul 15 01:59:59 2025 +    713 us (37)   TIME_INS
Tue Jul 15 01:59:59 2025 + 500854 us (37)   TIME_INS
Tue Jul 15 01:59:59 2025 +   1446 us (38)   TIME_OOP
Tue Jul 15 01:59:59 2025 + 501852 us (38)   TIME_OOP
Tue Jul 15 02:00:00 2025 +   1987 us (38)   TIME_WAIT
Tue Jul 15 02:00:00 2025 + 502352 us (38)   TIME_WAIT
Tue Jul 15 02:00:01 2025 +   2518 us (38)   TIME_WAIT
Tue Jul 15 02:00:01 2025 + 502730 us (38)   TIME_WAIT
Tue Jul 15 02:00:02 2025 +   2925 us (38)   TIME_WAIT
Leap complete
Starting test ./default/libhugetlbfs
Starting test ./default/memfd
memfd_test.c: In function mfd_assert_get_seals’:
memfd_test.c:67:13: error: implicit declaration of function fcntl [-Wimplicit-function-declaration]
   67 |         r = fcntl(fd, F_GET_SEALS);
      |             ^~~~~
memfd_test.c: In function mfd_assert_open’:
memfd_test.c:190:13: error: implicit declaration of function open; did you mean popen? [-Wimplicit-function-declaration]
  190 |         r = open(buf, flags, mode);
      |             ^~~~
      |             popen
memfd_test.c: In function mfd_assert_write’:
memfd_test.c:315:13: error: implicit declaration of function fallocate; did you mean alloca? [-Wimplicit-function-declaration]
  315 |         r = fallocate(fd,
      |             ^~~~~~~~~
      |             alloca
memfd_test build failed.
Starting test ./default/modsign
Successfully loaded signed module
Successfully loaded unsigned module
Starting test ./default/mq-memory-corruption
Test PASSED 
Test PASSED 
Test PASSED 
Test PASSED 
Test PASSED 
Test PASSED 
Test PASSED 
Test PASSED 
Test PASSED 
Test PASSED 
Starting test ./default/paxtest
Starting test ./default/posix_timers
Testing posix timers. False negative may happen on CPU execution 
based timers if other threads run on the CPU...
Check itimer virtual... [OK]
Check itimer prof... [OK]
Check itimer real... [OK]
Check timer_create() per thread... [OK]
Check timer_create() per process... [OK]
Starting test ./default/selinux-dac-controls
<no matches>
Starting test ./default/stack-randomness
Starting test ./default/sysfs-perms
Starting test ./default/timer-overhead
cc   timer-test.o   -o timer-test
Metadata