From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24624 invoked by alias); 26 Apr 2012 14:31:29 -0000 Received: (qmail 24615 invoked by uid 22791); 26 Apr 2012 14:31:27 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 26 Apr 2012 14:31:14 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2E6E11C6F38; Thu, 26 Apr 2012 10:31:14 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ZJBqguffOVa4; Thu, 26 Apr 2012 10:31:14 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E85DF1C6E79; Thu, 26 Apr 2012 10:31:13 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id CE0C4145616; Thu, 26 Apr 2012 07:30:51 -0700 (PDT) Date: Thu, 26 Apr 2012 14:34:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: FYI: fixlet for linux-dp.exp Message-ID: <20120426143051.GL10958@adacore.com> References: <8762cndijg.fsf@fleche.redhat.com> <4F9955CD.5040106@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F9955CD.5040106@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00909.txt.bz2 > Bigger items > ============ > ... > * Use a throw-away slave interpreter for running each test case. > > I think the trouble would be globals that _are_ supposed to be persistent > across tests, like e.g., "portnum", or whatever other globals board > files can come up with. We'd need some common way to make > those "master interp" owned variables (through aliases or env vars?). > Alternatively, we could save/restore globals, but there's no globals > standard naming scheme in place to make that remotely sane. In AdaCore's testsuite, we addressed this sort of problem by assigning IDs to each slave run. For instance, I routinely run our testsuite at -j24 on my quad-core laptop, and the main loop creates a pool of 24 slave processes, and each have a numeric ID going from 1 to 24. When one is done with a testcase, a new one with the same ID is started again. For something like "portnum", I'm guessing that it would be easy to calculate it instead of treating as a persistent global. It also happens that we have a way for the main loop to transmit data from the main loop down to the slave (based on JSON), but we do not allow the slave to change globals back in the main loop. The only data that we read back are the testcase results. -- Joel