Bug 506076 - unimplemented fcntl command: 1028 (F_CREATED_QUERY)
Summary: unimplemented fcntl command: 1028 (F_CREATED_QUERY)
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: 3.25.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alexandra Hajkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-23 21:59 UTC by Mark Wielaard
Modified: 2025-07-04 14:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
patch (2.26 KB, patch)
2025-07-04 12:43 UTC, Alexandra Hajkova
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Wielaard 2025-06-23 21:59:27 UTC
The ltp tests fcntl40 and fcntl40_64 fail with:

$ make ltpchecks TESTS="fcntl40 fcntl40_64

[1/2] Testing fcntl40 ...
[2/2] Testing fcntl40_64 ...
fcntl40: unempty log2.filtered:
==1809471== Warning: unimplemented fcntl command: 1028
==1809471== Warning: unimplemented fcntl command: 1028
==1809471== Warning: unimplemented fcntl command: 1028
fcntl40: diff -u log1err log2err:
--- log1err	2025-06-23 23:42:25.709098170 +0200
+++ log2err	2025-06-23 23:42:25.900099032 +0200
@@ -3,13 +3,13 @@
 tst_test.c:1956: TINFO: 
 tst_kconfig.c:88: TINFO: 
 tst_test.c:1774: TINFO: 
-fcntl40.c:26: TPASS: 
-fcntl40.c:31: TPASS: 
-fcntl40.c:37: TPASS: 
+fcntl40.c:26: TFAIL: 
+fcntl40.c:31: TFAIL: 
+fcntl40.c:37: TFAIL: 
 
 Summary:
-passed   3
-failed   0
+passed   0
+failed   3
 broken   0
 skipped  0
 warnings 0
fcntl40_64: unempty log2.filtered:
==1809472== Warning: unimplemented fcntl command: 1028
==1809472== Warning: unimplemented fcntl command: 1028
==1809472== Warning: unimplemented fcntl command: 1028
fcntl40_64: diff -u log1err log2err:
--- log1err	2025-06-23 23:42:25.710661718 +0200
+++ log2err	2025-06-23 23:42:25.900099032 +0200
@@ -3,13 +3,13 @@
 tst_test.c:1956: TINFO: 
 tst_kconfig.c:88: TINFO: 
 tst_test.c:1774: TINFO: 
-fcntl40.c:26: TPASS: 
-fcntl40.c:31: TPASS: 
-fcntl40.c:37: TPASS: 
+fcntl40.c:26: TFAIL: 
+fcntl40.c:31: TFAIL: 
+fcntl40.c:37: TFAIL: 
 
 Summary:
-passed   3
-failed   0
+passed   0
+failed   3
 broken   0
 skipped  0
 warnings 0

1028 is F_CREATED_QUERY
See /usr/include/linux/fcntl.h and /usr/include/bits/fcntl-linux.h

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=820a185896b77814557302b981b092a9e7b36814

This might be as simple as defining the constant in include/vki/vki-linux.h
And finding the right place in coregrind/m_syswrap/syswrap-linux.c under PRE(sys_fcntl) to handle it.
Comment 1 Alexandra Hajkova 2025-07-04 12:43:37 UTC
Created attachment 182947 [details]
patch

commit fa5cdc7fcd24f09adcfb7d44ee87b96b3350994d (HEAD -> fcntl)
Author: Alexandra Hájková <ahajkova@redhat.com>
Date:   Fri Jul 4 07:35:13 2025 -0400

    Implement fcntl F_CREATED_QUERY
    
    Define VKI_F_CREATED_QUERY in vki-linux.h.
    Recognize it in PRE(sys_fcntl).
    This fixes ltp tests failures. When running:
    make ltpchecks TESTS="fcntl40 fcntl40_64
    the tests would fail with:
    fcntl40: unempty log2.filtered:
    ==1809471== Warning: unimplemented fcntl command: 1028
    
    https://bugs.kde.org/show_bug.cgi?id=506076
Comment 2 Mark Wielaard 2025-07-04 14:12:36 UTC
commit 7615845dcd2166d98cb246e1ca7d4496cfcdfc4f
Author: Alexandra Hájková <ahajkova@redhat.com>
Date:   Fri Jul 4 07:35:13 2025 -0400

    Implement fcntl F_CREATED_QUERY
   
    Define VKI_F_CREATED_QUERY in vki-linux.h.
    Recognize it in PRE(sys_fcntl).
    This fixes ltp tests failures. When running:
    make ltpchecks TESTS="fcntl40 fcntl40_64
    the tests would fail with:
    fcntl40: unempty log2.filtered:
    ==1809471== Warning: unimplemented fcntl command: 1028
   
    https://bugs.kde.org/show_bug.cgi?id=506076