[commit: ghc] master: Update UnsafeReenter test (3cc3edf)

git at git.haskell.org git at git.haskell.org
Mon Sep 10 08:15:29 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3cc3edf30f37b11940d1f9c4afca8c5e9ccaa8f6/ghc

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

commit 3cc3edf30f37b11940d1f9c4afca8c5e9ccaa8f6
Author: Ömer Sinan Ağacan <omeragacan at gmail.com>
Date:   Mon Sep 10 11:14:46 2018 +0300

    Update UnsafeReenter test
    
    Only run the test in non-threaded, compiled mode. It hangs with threaded
    runtime (which stage 2 compiler uses, so disable it for ghci too).
    
    Reviewers: simonmar, alpmestan, bgamari
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #14912
    
    Differential Revision: https://phabricator.haskell.org/D5136


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

3cc3edf30f37b11940d1f9c4afca8c5e9ccaa8f6
 testsuite/tests/ffi/should_fail/all.T | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/testsuite/tests/ffi/should_fail/all.T b/testsuite/tests/ffi/should_fail/all.T
index ce72f17..3bd7b5d 100644
--- a/testsuite/tests/ffi/should_fail/all.T
+++ b/testsuite/tests/ffi/should_fail/all.T
@@ -15,15 +15,10 @@ test('T7506', normal, compile_fail, [''])
 test('T7243', normal, compile_fail, [''])
 test('T10461', normal, compile_fail, [''])
 
-# UnsafeReenter seems to just hang instead of erroring out
-# with the threaded1, threaded2 and profthreaded ways,
-# see #14912.
+# UnsafeReenter tests implementation of an undefined behavior (calling Haskell
+# from an unsafe foreign function) and only makes sense in non-threaded way
+# (threaded runtime will hang). See #14912.
 test('UnsafeReenter',
-     [omit_ways(['ghciext', 'ghci']),
-      exit_code(1),
-      expect_broken_for(14912, ['threaded1', 'threaded2', 'profthreaded'])
-     ], compile_and_run, ['-v0 UnsafeReenterC.c'])
-test('UnsafeReenterGhci',
-     [exit_code(1), extra_files(['UnsafeReenter.hs', 'UnsafeReenterC.c']), expect_broken(13730)],
-     run_command,
-     ['$MAKE -s --no-print-directory UnsafeReenterGhci'])
+     [omit_ways(threaded_ways), exit_code(1)],
+     compile_and_run,
+     ['UnsafeReenterC.c'])



More information about the ghc-commits mailing list