From: Mark W. <ma...@so...> - 2025-07-10 12:22:05
|
https://sourceware.org/cgit/valgrind/commit/?id=aec4871f7c9deed31f5d5606e4f9d07b43a448ec commit aec4871f7c9deed31f5d5606e4f9d07b43a448ec Author: Mark Wielaard <ma...@kl...> Date: Wed Jul 9 18:27:17 2025 +0200 Suppress unimplemented fcntl command warning with -q LTP tests fcntl13 and fcntl13_64 fail because even with -q valgrind emits warnings about unknown (999) fcntl commands. Don't emit that message with -q, just fail with EINVAL. Diff: --- coregrind/m_syswrap/syswrap-linux.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index 1eaa2621e6..a5e1f9d656 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -7202,8 +7202,9 @@ PRE(sys_fcntl) default: PRINT("sys_fcntl[UNKNOWN] ( %" FMT_REGWORD "u, %" FMT_REGWORD "u, %" FMT_REGWORD "u )", ARG1, ARG2, ARG3); - VG_(umsg)("Warning: unimplemented fcntl command: %" FMT_REGWORD "u\n", - ARG2); + if (VG_(clo_verbosity) >= 1) + VG_(umsg)("Warning: unimplemented fcntl command: %" FMT_REGWORD "u\n", + ARG2); SET_STATUS_Failure( VKI_EINVAL ); break; } |