Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/tests/sys/vm/mmap_map_32bit_test.sh
39534 views
1
#
2
# Copyright (c) 2022 Dmitry Chagin <[email protected]>
3
#
4
# SPDX-License-Identifier: BSD-2-Clause
5
#
6
# Simple test of MAP_32BIT flag w/wo ASLR
7
8
map_32bit_w_aslr_head()
9
{
10
atf_set descr "MAP_32BIT with ASLR"
11
atf_set require.progs proccontrol
12
}
13
14
map_32bit_w_aslr_body()
15
{
16
atf_check -s exit:0 -x proccontrol -m aslr -s enable \
17
$(atf_get_srcdir)/mmap_map_32bit_helper
18
}
19
20
map_32bit_wo_aslr_head()
21
{
22
atf_set descr "MAP_32BIT without ASLR"
23
atf_set require.progs proccontrol
24
}
25
26
map_32bit_wo_aslr_body()
27
{
28
atf_check -s exit:0 -x proccontrol -m aslr -s disable \
29
$(atf_get_srcdir)/mmap_map_32bit_helper
30
}
31
32
33
atf_init_test_cases()
34
{
35
atf_add_test_case map_32bit_w_aslr
36
atf_add_test_case map_32bit_wo_aslr
37
}
38
39