[commit: testsuite] master: Add test to check stack is not executable, to prevent #703 regressions. (0f31b19)

Edward Z. Yang ezyang at MIT.EDU
Tue Jul 9 09:55:23 CEST 2013


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : master

https://github.com/ghc/testsuite/commit/0f31b197f4fba916c12d03c80d7a6c59d2724242

>---------------------------------------------------------------

commit 0f31b197f4fba916c12d03c80d7a6c59d2724242
Author: Edward Z. Yang <ezyang at mit.edu>
Date:   Tue Jul 9 00:54:33 2013 -0700

    Add test to check stack is not executable, to prevent #703 regressions.
    
    Signed-off-by: Edward Z. Yang <ezyang at mit.edu>

>---------------------------------------------------------------

 tests/driver/Makefile                  |    6 ++++++
 tests/{rts/T7227.hs => driver/T703.hs} |    0 
 tests/driver/all.T                     |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tests/driver/Makefile b/tests/driver/Makefile
index 382ecf0..18cf596 100644
--- a/tests/driver/Makefile
+++ b/tests/driver/Makefile
@@ -544,3 +544,9 @@ T6037:
 T2507:
 	-LC_ALL=C "$(TEST_HC)" $(TEST_HC_OPTS_NO_RECOMP) -c T2507.hs
 
+.PHONY: T703
+T703:
+	$(RM) -rf T703
+	[ ! -d T703 ]
+	"$(TEST_HC)" $(TEST_HC_OPTS) --make T703.hs -v0
+	! readelf -W -l T703 2>/dev/null | grep 'GNU_STACK' | grep -q 'RWE'
diff --git a/tests/rts/T7227.hs b/tests/driver/T703.hs
similarity index 100%
copy from tests/rts/T7227.hs
copy to tests/driver/T703.hs
diff --git a/tests/driver/all.T b/tests/driver/all.T
index 6a0317f..d18d9ae 100644
--- a/tests/driver/all.T
+++ b/tests/driver/all.T
@@ -377,3 +377,4 @@ test('T2507',
      run_command,
      ['$MAKE -s --no-print-directory T2507'])
 
+test('T702', normal, run_command, ['$MAKE -s --no-print-directory T703'])





More information about the ghc-commits mailing list