Patchwork [libitm] fix reentrant.c testcase

login
register
mail settings
Submitter Patrick Marlier
Date Jan. 5, 2012, 12:54 a.m.
Message ID <4F04F4CE.5060302@gmail.com>
Download mbox | patch
Permalink /patch/134394/
State New
Headers show

Comments

Patrick Marlier - Jan. 5, 2012, 12:54 a.m.
In the reentrant.c testcase, the first transaction has no transactional 
access and thus removed.
In order to keep this transaction, I added a shared access inside.
Tested on i686.

OK to commit?
(I don't have an account, so thanks in advance to committer)
--
Patrick Marlier.
2012-01-04  Patrick Marlier  <patrick.marlier@gmail.com>

	* testsuite/libitm.c/reentrant.c: Adjust testcase.
Aldy Hernandez - Jan. 5, 2012, 2:14 p.m.
On 01/04/12 18:54, Patrick Marlier wrote:
> In the reentrant.c testcase, the first transaction has no transactional
> access and thus removed.
> In order to keep this transaction, I added a shared access inside.
> Tested on i686.
>
> OK to commit?
> (I don't have an account, so thanks in advance to committer)
> --
> Patrick Marlier.

OK, this is an obvious fix.

This is also the fix for PR51171.  I will commit and close the PR.

Thanks!

Patch

Index: testsuite/libitm.c/reentrant.c
===================================================================
--- testsuite/libitm.c/reentrant.c	(revision 182883)
+++ testsuite/libitm.c/reentrant.c	(working copy)
@@ -1,4 +1,4 @@ 
-/* { dg-do run { xfail *-*-* } }
+/* { dg-do run }
 /* { dg-options "-pthread" } */
 
 /* Tests that new transactions can be started from both transaction_pure and
@@ -36,7 +36,7 @@  int __attribute__((transaction_unsafe)) unsafe(int
 static void *thread (void *dummy __attribute__((unused)))
 {
   __transaction_atomic {
-    pure(1);
+    pure(x);
   }
   __transaction_relaxed {
     unsafe(1);