aboutsummaryrefslogtreecommitdiff
path: root/tests/sys/vm/mmap_map_32bit_test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sys/vm/mmap_map_32bit_test.sh')
-rw-r--r--tests/sys/vm/mmap_map_32bit_test.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/sys/vm/mmap_map_32bit_test.sh b/tests/sys/vm/mmap_map_32bit_test.sh
new file mode 100644
index 000000000000..2df53e78f1b7
--- /dev/null
+++ b/tests/sys/vm/mmap_map_32bit_test.sh
@@ -0,0 +1,37 @@
+#
+# Copyright (c) 2022 Dmitry Chagin <dchagin@FreeBSD.org>
+#
+# SPDX-License-Identifier: BSD-2-Clause
+#
+# Simple test of MAP_32BIT flag w/wo ASLR
+
+map_32bit_w_aslr_head()
+{
+ atf_set descr "MAP_32BIT with ASLR"
+ atf_set require.progs proccontrol
+}
+
+map_32bit_w_aslr_body()
+{
+ atf_check -s exit:0 -x proccontrol -m aslr -s enable \
+ $(atf_get_srcdir)/mmap_map_32bit_helper
+}
+
+map_32bit_wo_aslr_head()
+{
+ atf_set descr "MAP_32BIT without ASLR"
+ atf_set require.progs proccontrol
+}
+
+map_32bit_wo_aslr_body()
+{
+ atf_check -s exit:0 -x proccontrol -m aslr -s disable \
+ $(atf_get_srcdir)/mmap_map_32bit_helper
+}
+
+
+atf_init_test_cases()
+{
+ atf_add_test_case map_32bit_w_aslr
+ atf_add_test_case map_32bit_wo_aslr
+}