selftests-vm-add-process_mrelease-tests.patch removed from -mm tree
The quilt patch titled
Subject: selftests: vm: add process_mrelease tests
has been removed from the -mm tree. Its filename was
selftests-vm-add-process_mrelease-tests.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Suren Baghdasaryan <[email protected]>
Subject: selftests: vm: add process_mrelease tests
Date: Wed, 18 May 2022 13:43:16 -0700
Introduce process_mrelease syscall sanity tests which include tests which expect to fail:
- process_mrelease with invalid pidfd and flags inputs
- process_mrelease on a live process with no pending signals
and valid process_mrelease usage which is expected to succeed. Because process_mrelease has to be used against a process with a pending SIGKILL, it's possible that the process exits before process_mrelease gets called. In such cases we retry the test with a victim that allocates twice more memory up to 1GB. This would require the victim process to spend more time during exit and process_mrelease has a better chance of catching the process before it exits and succeeding.
On success the test reports the amount of memory the child had to allocate for reaping to succeed. Sample output:
$ mrelease_test Success reaping a child with 1MB of memory allocations
On failure the test reports the failure. Sample outputs:
$ mrelease_test All process_mrelease attempts failed!
$ mrelease_test process_mrelease: Invalid argument
---
tools/testing/selftests/vm/.gitignore | 1 tools/testing/selftests/vm/Makefile | 1 tools/testing/selftests/vm/mrelease_test.c | 200 +++++++++++++++++++ tools/testing/selftests/vm/run_vmtests.sh | 2 4 files changed, 204 insertions(+)
tools/testing/selftests/vm/.gitignore renamed from tools/testing/selftests/vm/.gitignore~selftests-vm-add-process_mrelease-tests +1 -0
@@ -10,6 +10,7 @@ map_populate thuge-gen compaction_test mlock2-tests +mrelease_test mremap_dontunmap mremap_test on-fault-limit
tools/testing/selftests/vm/Makefile renamed from tools/testing/selftests/vm/Makefile~selftests-vm-add-process_mrelease-tests +1 -0
@@ -44,6 +44,7 @@ TEST_GEN_FILES += memfd_secret TEST_GEN_FILES += migration TEST_GEN_FILES += mlock-random-test TEST_GEN_FILES += mlock2-tests +TEST_GEN_FILES += mrelease_test TEST_GEN_FILES += mremap_dontunmap TEST_GEN_FILES += mremap_test TEST_GEN_FILES += on-fault-limit
tools/testing/selftests/vm/mrelease_test.c new file +200 -0
200 lines not on this page · raw message
tools/testing/selftests/vm/run_vmtests.sh renamed from tools/testing/selftests/vm/run_vmtests.sh~selftests-vm-add-process_mrelease-tests +2 -0
@@ -141,6 +141,8 @@ run_test ./mlock-random-test run_test ./mlock2-tests +run_test ./mrelease_test + run_test ./mremap_test run_test ./thuge-gen
_
Patches currently in -mm which might be from [email protected] are