From patchwork Mon Jan 19 20:40:57 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1634 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768855336; bh=z6ABGwOGiiSONTOjwqoAuKHBpTbmi9sS3B2VgMtn+50=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=a5cUaRO4D8Suk56nEN7+5a13sv5hyb5KPk8rznQcPy6IjC/HM0G0QCJaqDhXClD72 btjaMy4HPrdbSTS1lXZVqb2JrhgcOjufaqlrAku7NysLhGuTRoWMi9pBX5Q5O8X+s9 LAvhA9Gx4kt96KJ2WzoX9tT8YbRglDvZHyxG/P6SPt0cNKD75PKClKE6VaIAJJca/a FBgut477PISi4sn9rNeZ+DhXzzsDlvmhxVWxLwVp35Ee1WeBTB0R2wvXcKmZYcnOF8 mB5V+oWeBHvDhQv6AqZOHC19JRerEhcDl/y6Gu7LcSw4XJC/1C/RjqQkPfZOG0csTN eHi5TDW/O+diQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 403F76951C for ; Mon, 19 Jan 2026 13:42:16 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id XE8WNkHzRBz6 for ; Mon, 19 Jan 2026 13:42:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768855335; bh=z6ABGwOGiiSONTOjwqoAuKHBpTbmi9sS3B2VgMtn+50=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=KKZwu8GjGstqNGK+/5wpWvbbAvJ61z/pyhZP/SICuivMFxGZfOZP6S7mlgd910bLZ yLAmffTdrdARXZZbUiObmAgACOXOkUQuQH/8pvE5of9rarsXFM1JN3h6tgwp0N2nKO UTVjXSJZ2It5+3cd1rCvsszsou1d8YmO1OqucJFI8Zcbi9IZMPSZiQm52rdm3TEJ0b XJwWYmHRj/wdnhcms4LUATcqX4Dj5BpgfDzsCV/jdL/J+4JA68o91SajHCWmNQ3bNY x/gUXRBn6GXflWMFlvTiIFGaMx9aIAl/OR85LiXKLsXl5h70+vQHJH6XbRJck5Tm09 DcU88C5I2am8w== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3A10F694CE for ; Mon, 19 Jan 2026 13:42:15 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768855333; bh=NY4izJIMEcN8xnzb+ZUe+86xT3KQmK336d6VZE1IJjA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QYHRfnwMYsgJngJDiBqEXZxV3K+vBUZLbngISf9i92qE9M5DzEobDlU9qr2zEvcz5 INKpj6mWMqJD2li/QSnbeR2Fgqk3kqp/FP69bgN+odvRv84+s1IrY5sdTzTpadzYdp 5JWv6TrnRqlgbylJ7hoq/aX62Fk1WiB9KZdJy6aKVn1lM3GijWIYbfaYfQUpQ42JkP s82Pqr29tLaU1LPNDjpl0FMeq4J21sTbEqwFX781PGJ0lMuW2DRWF2b40AQbvpmnAA s0iCV7nQe3+5AbJ/HYEI+V98w8nECDbhwHjA/UIcOTq7h2kcReOn8TvrEaqkT26zYb zOoqOaclOjriQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1B8D0693BA; Mon, 19 Jan 2026 13:42:13 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id AoU4xrlH3wwd; Mon, 19 Jan 2026 13:42:13 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768855329; bh=3sTbFFC/2fxjMGWfQVGT3MATTaXonds3IHz9AcjKpuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=isnSwCsNkPEctoR2xW0sh+G6+8zyh0sm6l7xvYKJbmqz10y/hTjhYHQF+jebh0wlo h/rJI1p9I8hx5pi9dfPAtaUao0zCj60ZvDKOg8hmdUgaixk7wokd1/KEwfGBVXLQwk +1dHHOe2x0FrJJG7Kq4gzmwDgTQ43s6z4WwMMPDOfT8/OHYobg323ugt2gZcR/f1Jq YFAG9kILkBpLYmZOvSmD96DjpFE+qr5gen7SZBeUmSMA+O7MZ2DO5VJpsUXoYMPuEv 5Nn5IuyUpPK5yz+l3ffmnJNJACVM0K2+O2h0oGbGIJHtnLdCh4V+DfOv0wU1qQRcHZ Zhu8ZQ7xATHjw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id B606B69504; Mon, 19 Jan 2026 13:42:08 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Mon, 19 Jan 2026 13:40:57 -0700 Message-ID: <20260119204130.3972647-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119204130.3972647-1-sjg@u-boot.org> References: <20260119204130.3972647-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: HGEEBMEWSJPVM7HHBBRVF3XLT2WHHZIG X-Message-ID-Hash: HGEEBMEWSJPVM7HHBBRVF3XLT2WHHZIG X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 04/27] test: trace: Remove stale trace file before saving List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The sandbox filesystem's host save command does not truncate existing files. If a previous test run created a larger trace file, the extra data remains when a smaller trace is written, causing proftool to fail with "Cannot read trace file" when it tries to read past the actual data. Fix this by removing any existing trace file before saving. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- test/py/tests/test_trace.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/py/tests/test_trace.py b/test/py/tests/test_trace.py index fcdcbe2c6db..0bddf408833 100644 --- a/test/py/tests/test_trace.py +++ b/test/py/tests/test_trace.py @@ -65,6 +65,8 @@ def collect_trace(ubman): out = ubman.run_command(f'trace calls {addr:x} {size:x}') print(out) fname = os.path.join(TMPDIR, 'trace') + if os.path.exists(fname): + os.unlink(fname) out = ubman.run_command( 'host save hostfs - %x %s ${profoffset}' % (addr, fname)) return fname, int(dm_f_time[0])