From 5d8daf55f718e6aee3234f016453b016b340b430 Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Sat, 10 Nov 2007 22:44:41 -0500 Subject: [PATCH] add compile+execute test which exercises mmap --- t-mmap.sh | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) mode change 100755 => 100644 t-mmap.sh diff --git a/t-mmap.sh b/t-mmap.sh old mode 100755 new mode 100644 index 9868bf0..24eca5a --- a/t-mmap.sh +++ b/t-mmap.sh @@ -42,6 +42,20 @@ d $LOWER_DIR3 FILES } +function afterfiles_exec { +cat </dev/null + dd if=/dev/zero of=$LOWER_DIR1/b bs=4096 count=4 2>/dev/null + mount_union "" $LOWER_DIR0 $LOWER_DIR1=ro + echo 'int main() { exit(0); }' > $MOUNTPOINT/foo.c + cc -o $MOUNTPOINT/a.out $MOUNTPOINT/foo.c 2> /dev/null || exit $? + $MOUNTPOINT/a.out || exit $? + echo -n "[exec] " + unmount_union + ( afterfiles_exec ) | check_hierarchy $TOP_LOWER_DIR +} + test_ro # skip on file systems which do not allow writeable mappings case "$FS0" in jffs2 | ramfs ) ;; - * ) test_rw ;; + * ) + test_rw + test_exec + ;; esac complete_test -- 2.43.0