]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Suppress unimplemented fcntl command warning with -q
authorMark Wielaard <mark@klomp.org>
Wed, 9 Jul 2025 16:27:17 +0000 (18:27 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 10 Jul 2025 12:21:11 +0000 (14:21 +0200)
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.

coregrind/m_syswrap/syswrap-linux.c

index 1eaa2621e6354c39d6b9d17afc5c968336f4095a..a5e1f9d65680122f17b7b0b51facb95e4fe655a7 100644 (file)
@@ -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;
    }