1# 2# Copyright (c) 2022 Dmitry Chagin <dchagin@FreeBSD.org> 3# 4# SPDX-License-Identifier: BSD-2-Clause 5# 6# Simple test of MAP_32BIT flag w/wo ASLR 7 8map_32bit_w_aslr_head() 9{ 10 atf_set descr "MAP_32BIT with ASLR" 11 atf_set require.progs proccontrol 12} 13 14map_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 20map_32bit_wo_aslr_head() 21{ 22 atf_set descr "MAP_32BIT without ASLR" 23 atf_set require.progs proccontrol 24} 25 26map_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 33atf_init_test_cases() 34{ 35 atf_add_test_case map_32bit_w_aslr 36 atf_add_test_case map_32bit_wo_aslr 37} 38