From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13925 invoked by alias); 22 Jul 2011 15:06:54 -0000 Received: (qmail 13916 invoked by uid 22791); 22 Jul 2011 15:06:53 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate3.uk.ibm.com (HELO mtagate3.uk.ibm.com) (194.196.100.163) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Jul 2011 15:06:39 +0000 Received: from d06nrmr1307.portsmouth.uk.ibm.com (d06nrmr1307.portsmouth.uk.ibm.com [9.149.38.129]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p6MF6bWC010807 for ; Fri, 22 Jul 2011 15:06:37 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p6MF6aRf2416806 for ; Fri, 22 Jul 2011 16:06:37 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p6MF6as5024403 for ; Fri, 22 Jul 2011 09:06:36 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p6MF6ZwN024363 for ; Fri, 22 Jul 2011 09:06:35 -0600 Message-Id: <201107221506.p6MF6ZwN024363@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 22 Jul 2011 17:06:35 +0200 Subject: Remote testsuite problem: invalid executable cache To: gdb-patches@sourceware.org Date: Fri, 22 Jul 2011 15:22:00 -0000 From: "Ulrich Weigand" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2011-07/txt/msg00611.txt.bz2 Hello, when running the test suite in remote mode against a gdbserver target, the executable under test is built on the host using a cross-compiler and then downloaded to the target before the test starts. Apparently in an attempt to reduce test times across a slow download connection, the gdbserver_download_current_prog skips that download if it thinks the executable is already on the target (e.g. if a test case restarts GDB on the same executable multiple times). This case is detected by comparing file name and time stamp of the executable under test against those values remembered from the last executable that was downloaded. This seems fine at first glance, but actually doesn't quite work: - Some tests, in particular multiple gdb.python tests, re-compile the executable under test several times, reusing the same name. For example, py-value.exp recompiles the same source file first using the C compiler and then using the C++ compiler, and runs a couple of tests on each. - The gdbserver_download_current_prog time stamp check uses Tcl [file mtime ...], which only provides a resolution of 1 second. If the test runs fast enough, the second rebuild of the executable might happen to carry the same time stamp as the first one. - This may cause the test suite to erroneously skip copying the C++ executable, and run the C++ tests on the C executable (which will usually fail since GDB on the host side does use the new binary, so that instruction addresses will not match up). Some options to fix this problem might include: - Rewrite the Pyhton tests to not overwrite the same exectuable file (just use different names). - Remove the cache. (How bad it the download time problem, really?) - Use better markers to identify unchanged executables (more precise timestamp? checksum?). Any hints on how to portably implement something along those lines in Tcl would be appreciated! - Create some sort of hook that would allow "gdb_compile" to notify the executable cache that a file was just rebuilt. Thoughts? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com