]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
memfd test should be memfd_create test
authorDi Chen <dichen@redhat.com>
Tue, 29 Mar 2022 23:59:25 +0000 (07:59 +0800)
committerMark Wielaard <mark@klomp.org>
Wed, 6 Apr 2022 22:36:41 +0000 (00:36 +0200)
Currently, syscall memfd_create was tested by this:

$ perl tests/vg_regtest memcheck/tests/linux/memfd.vgtest

Since memfd_secret introduced in kernel 5.14, valgrind should rename
the "memfd" test to "memfd_create" test to avoid the ambiguity, so that
user will not get confused with the "memfd_secret" test.

After this change, syscall memfd_create will be tested by:

$ perl tests/vg_regtest memcheck/tests/linux/memfd_create.vgtest

.gitignore
memcheck/tests/linux/Makefile.am
memcheck/tests/linux/memfd.vgtest [deleted file]
memcheck/tests/linux/memfd_create.c [moved from memcheck/tests/linux/memfd.c with 100% similarity]
memcheck/tests/linux/memfd_create.stderr.exp [moved from memcheck/tests/linux/memfd.stderr.exp with 57% similarity]
memcheck/tests/linux/memfd_create.vgtest [new file with mode: 0644]

index 86416f576c937ddc33f1139c92842bc0403ccd98..5026fcbc788b4ea3405ee08bab9be02c622589d0 100644 (file)
 /memcheck/tests/linux/lsframe2
 /memcheck/tests/linux/Makefile
 /memcheck/tests/linux/Makefile.in
-/memcheck/tests/linux/memfd
+/memcheck/tests/linux/memfd_create
 /memcheck/tests/linux/rfcomm
 /memcheck/tests/linux/sigqueue
 /memcheck/tests/linux/stack_changes
index 4f0d838434907cce60a38fd7ca80267d6a33472a..d5991dc5e5b7523bbe0c401c4767c3e30ff0681c 100644 (file)
@@ -15,7 +15,7 @@ EXTRA_DIST = \
        ioctl-tiocsig.vgtest ioctl-tiocsig.stderr.exp \
        lsframe1.vgtest lsframe1.stdout.exp lsframe1.stderr.exp \
        lsframe2.vgtest lsframe2.stdout.exp lsframe2.stderr.exp \
-       memfd.vgtest memfd.stderr.exp \
+       memfd_create.vgtest memfd_create.stderr.exp \
        rfcomm.vgtest rfcomm.stderr.exp \
        sigqueue.vgtest sigqueue.stderr.exp \
        stack_changes.stderr.exp stack_changes.stdout.exp \
@@ -62,7 +62,7 @@ check_PROGRAMS += sys-openat
 endif
 
 if HAVE_MEMFD_CREATE
-check_PROGRAMS += memfd
+check_PROGRAMS += memfd_create
 endif
 
 if HAVE_COPY_FILE_RANGE
diff --git a/memcheck/tests/linux/memfd.vgtest b/memcheck/tests/linux/memfd.vgtest
deleted file mode 100644 (file)
index 4096401..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-prereq: test -e memfd
-vgopts: -q --track-origins=yes
-prog: memfd
similarity index 57%
rename from memcheck/tests/linux/memfd.stderr.exp
rename to memcheck/tests/linux/memfd_create.stderr.exp
index 13009d8ae40fa5c20fe1ecfd2f07a75cccd3c3d0..27ccbfe494f38ae5ecb79a4594a27ca97acd576a 100644 (file)
@@ -1,6 +1,6 @@
 Syscall param fcntl(arg) contains uninitialised byte(s)
    ...
-   by 0x........: main (memfd.c:72)
+   by 0x........: main (memfd_create.c:72)
  Uninitialised value was created by a client request
-   at 0x........: main (memfd.c:71)
+   at 0x........: main (memfd_create.c:71)
 
diff --git a/memcheck/tests/linux/memfd_create.vgtest b/memcheck/tests/linux/memfd_create.vgtest
new file mode 100644 (file)
index 0000000..13b9563
--- /dev/null
@@ -0,0 +1,3 @@
+prereq: test -e memfd_create
+vgopts: -q --track-origins=yes
+prog: memfd_create