[F/G][F/OEM-5.6][SRU][PATCH 0/1] selftests/memfd: Fix implicit declaration warnings

Po-Hsu Lin po-hsu.lin at canonical.com
Fri Mar 19 07:30:49 UTC 2021


[Impact]
While debugging bug 1910277, I found that the test compilation will
print some warnings:
  memfd_test.c:64:7: warning: implicit declaration of function ‘open’;
  memfd_test.c:90:6: warning: implicit declaration of function ‘fcntl’
  memfd_test.c:397:6: warning: implicit declaration of function ‘fallocate’;
  fuse_test.c:67:6: warning: implicit declaration of function ‘fcntl’
  fuse_test.c:261:7: warning: implicit declaration of function ‘open’;

It's harmless but fixing this we can make the test report easier to
read.

[Fix]
* 1c49e3783f8899 ("selftests/memfd: Fix implicit declaration warnings")

This fix can be cherry-picked into F/F-oem-5.6/G and compiled without
any problem. Older kernel does not have this issue since they're
missing some other commits.

[Test Case]
Build the memfd test in tools/testing/selftests/ with:
  sudo make TARGETS=memfd

With this fix, these warnings will be gone.

[Where problems could occur]
This fix is just for fixing the test case compilation, so it's not
affecting real kernel functionality.

Michael Ellerman (1):
  selftests/memfd: Fix implicit declaration warnings

 tools/testing/selftests/memfd/fuse_test.c  | 2 +-
 tools/testing/selftests/memfd/memfd_test.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.7.4




More information about the kernel-team mailing list