From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8296 invoked by alias); 30 Sep 2011 12:57:15 -0000 Received: (qmail 8287 invoked by uid 22791); 30 Sep 2011 12:57:14 -0000 X-SWARE-Spam-Status: No, hits=-7.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SARE_SUB_OBFU_Q0,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Sep 2011 12:56:56 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8UCuuvv032720 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 30 Sep 2011 08:56:56 -0400 Received: from dhcp-lab-190.englab.brq.redhat.com (dhcp-2-245.brq.redhat.com [10.34.2.245]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p8UCutb9011894 for ; Fri, 30 Sep 2011 08:56:55 -0400 Message-ID: <4E85BD14.2070600@redhat.com> Date: Fri, 30 Sep 2011 12:57:00 -0000 From: Pavel Tisnovsky User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: mauve-discuss@sourceware.org Subject: RFC: fix for a test gnu/testlet/java/awt/Container/addImpl.java & its helper class gnu/testlet/java/awt/Container/DisabledEventQueue.java Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact mauve-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sourceware.org X-SW-Source: 2011-q3/txt/msg00030.txt.bz2 Greetings, the Mauve test gnu/testlet/java/awt/Container/addImpl.java in its current implementation left opened frame on the desktop, which caused some other AWT-related tests to fail. Here's a (quite obvious) fix for this test: --- mauve/gnu/testlet/java/awt/Container/addImpl.java_old 2006-03-15 16:22:05.000000000 +0100 +++ mauve/gnu/testlet/java/awt/Container/addImpl.java 2011-09-30 13:46:05.000000000 +0200 @@ -233,7 +233,8 @@ c.setSize(100,100); f.add(a); f.pack(); - f.show(); + f.show(); + harness.check(a.isShowing(), true); harness.check(c.isShowing(), true); harness.check(l.isShowing(), true); @@ -241,5 +242,8 @@ harness.check(c.isLightweight(), true); harness.check(a.isLightweight(), false); harness.check(l.isLightweight(), false); + + // clean up the frame from desktop + f.dispose(); } } However the mentioned test uses its own implementation of EventQueue named DisabledEventQueue. This implementation "eats" all events, including events sent by X Window system during disposing frame which means that the method f.dispose() lock up (because the X Window can not cooperate with the frame in both directions). As a result also DisableEventQueue class should be updated, which is quite easy because we only want to "eat" paint events, not other events (and this class is not used by other test). Here's proposed fix: --- mauve/gnu/testlet/java/awt/Container/DisabledEventQueue.java_old 2005-11-02 16:16:38.000000000 +0100 +++ mauve/gnu/testlet/java/awt/Container/DisabledEventQueue.java 2011-09-30 12:51:40.000000000 +0200 @@ -36,7 +36,14 @@ */ protected void dispatchEvent(AWTEvent ev) { - // Do nothing. + if (ev instanceof java.awt.event.PaintEvent) + { + // Do nothing. + } + else + { + super.dispatchEvent(ev); + } } /** @@ -44,6 +51,13 @@ */ public void postEvent(AWTEvent ev) { - // Do nothing. + if (ev instanceof java.awt.event.PaintEvent) + { + // Do nothing. + } + else + { + super.postEvent(ev); + } } } Can anybody please review this change? (it's been tested, of course ;) Pavel