Commit 0c28759e authored by Brian Geffon's avatar Brian Geffon Committed by Linus Torvalds

selftests: add MREMAP_DONTUNMAP selftest

Add a few simple self tests for the new flag MREMAP_DONTUNMAP, they are
simple smoke tests which also demonstrate the behavior.

[akpm@linux-foundation.org: convert eight-spaces to hard tabs]
[bgeffon@google.com: v7]
  Link: http://lkml.kernel.org/r/20200221174248.244748-2-bgeffon@google.com
[akpm@linux-foundation.org: coding style fixes]
Signed-off-by: default avatarBrian Geffon <bgeffon@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: "Michael S . Tsirkin" <mst@redhat.com>
Cc: Brian Geffon <bgeffon@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Will Deacon <will@kernel.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Sonny Rao <sonnyrao@google.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Yu Zhao <yuzhao@google.com>
Cc: Jesse Barnes <jsbarnes@google.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: "Kirill A . Shutemov" <kirill@shutemov.name>
Cc: Lokesh Gidra <lokeshgidra@google.com>
Link: http://lkml.kernel.org/r/20200218173221.237674-2-bgeffon@google.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e346b381
...@@ -14,6 +14,7 @@ TEST_GEN_FILES += map_fixed_noreplace ...@@ -14,6 +14,7 @@ TEST_GEN_FILES += map_fixed_noreplace
TEST_GEN_FILES += map_populate TEST_GEN_FILES += map_populate
TEST_GEN_FILES += mlock-random-test TEST_GEN_FILES += mlock-random-test
TEST_GEN_FILES += mlock2-tests TEST_GEN_FILES += mlock2-tests
TEST_GEN_FILES += mremap_dontunmap
TEST_GEN_FILES += on-fault-limit TEST_GEN_FILES += on-fault-limit
TEST_GEN_FILES += thuge-gen TEST_GEN_FILES += thuge-gen
TEST_GEN_FILES += transhuge-stress TEST_GEN_FILES += transhuge-stress
......
This diff is collapsed.
...@@ -292,4 +292,19 @@ else ...@@ -292,4 +292,19 @@ else
exitcode=1 exitcode=1
fi fi
echo "------------------------------------"
echo "running MREMAP_DONTUNMAP smoke test"
echo "------------------------------------"
./mremap_dontunmap
ret_val=$?
if [ $ret_val -eq 0 ]; then
echo "[PASS]"
elif [ $ret_val -eq $ksft_skip ]; then
echo "[SKIP]"
exitcode=$ksft_skip
else
echo "[FAIL]"
exitcode=1
fi
exit $exitcode exit $exitcode
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment