| Message ID | 20260314231618.338113-3-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1773530251; bh=imyl06+0O+tINyF/l8ltI/lVExxyA9oAy0v7i+ctajY=; 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=Fov/D/LHiL13E0ady/IXAW2NrNkB7POY3hX+03j7OQpRj7W+EFIfZaEW5SpP9OMks UqJ1QG2r3ZwVQZ13tVe1HqR4BcSNwpxaM9bsGhKm3FLCNNw4M3Lw/z7J7zbVUjM0PB bLUUaTEBu7vUWcr1lZ9UBeYNx+6NpW4HppJ/96W3CvtslN9yi30jp8KeGNHYDjIMIB WQ9UFsTdw2osIWFvMb9zjJrs9eeoHNXkG23wabEps3rvzu8775YVYkRRy/ngOqfEiq 3+4zbNN+xp/m9439VuhRGY6R+vVFPQH3m8kSw3Ws0V4VKUOCHn5k6M6abYoy8B4zO3 GeBgyZ/4WwbGA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B84A06A033 for <u-boot-concept@u-boot.org>; Sat, 14 Mar 2026 17:17:31 -0600 (MDT) 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 jIt6d6zJ0J2u for <u-boot-concept@u-boot.org>; Sat, 14 Mar 2026 17:17:31 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530251; bh=imyl06+0O+tINyF/l8ltI/lVExxyA9oAy0v7i+ctajY=; 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=Fov/D/LHiL13E0ady/IXAW2NrNkB7POY3hX+03j7OQpRj7W+EFIfZaEW5SpP9OMks UqJ1QG2r3ZwVQZ13tVe1HqR4BcSNwpxaM9bsGhKm3FLCNNw4M3Lw/z7J7zbVUjM0PB bLUUaTEBu7vUWcr1lZ9UBeYNx+6NpW4HppJ/96W3CvtslN9yi30jp8KeGNHYDjIMIB WQ9UFsTdw2osIWFvMb9zjJrs9eeoHNXkG23wabEps3rvzu8775YVYkRRy/ngOqfEiq 3+4zbNN+xp/m9439VuhRGY6R+vVFPQH3m8kSw3Ws0V4VKUOCHn5k6M6abYoy8B4zO3 GeBgyZ/4WwbGA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A6E6C69FF7 for <u-boot-concept@u-boot.org>; Sat, 14 Mar 2026 17:17:31 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530249; bh=eT5xQ5yqjCly0rOKn4BpzsLdSwaw3S8tQEG+Z8g673E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iO3KXD7TWJ1l93H9hlCqd2Fe1yNkcdAry2RIvqvkWoY+Mph2BFzLaREx132H5rUmz aBaFuN/gHF/KAe8H24tr3IqVVqdFGZRYftfbVXeyHeWIEpTRSBdEujJJjsTMvs/wWz I7q+MeQxz6Fta11YNtEe0jk/oZsyG2xsK24VKdO5irZMdPEY5/5JxVcXo0/Cfzf+KS F0nRsCJptpzyiXXC3tNYw1XKaUQ9gblWtYbpxMhTpYs+SR1dlPHBgKBzkrmuLuayBQ gN76OVK1B9St83+h48cVKO9+1n0Yf5V12yKiT1VrigFUF+97Fmiy4nkuD+GfF3p796 SSxDoDYKaCZ9w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 81E026A033; Sat, 14 Mar 2026 17:17:29 -0600 (MDT) 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 BSGyyafa7fnh; Sat, 14 Mar 2026 17:17:29 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1773530249; bh=rmrLZbhZEpLhvg+58PehJttkr5el9YAZLdHhOSXZn98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mCjN19xDkI0TMLgRQfHPiMmnTiAUeGtJ3sVNaDXIxTD+SjP5BhfyJnZx+MEyoYCms f2HC6EpUmwakKmrDSrJY2OU/mPXm0g6nk/1zwYHN5SL53Ap01kK3YIRcWY1vSZTr2T 3gU0PuZvKsanpx4rZZ0Y2vBgpvHF5831S7NRyMMDIZLgMie40mesx+CamjRbPkVdge R9k5KM62rJ06UvboGwOwX3CuNE3vvUKzk1RWD5BYxgGjPmHS3Imo0IILCqeS6JCE0A DHtPDpkdx4LPYVqhFJ/tyysMDxJMGmMlueLZKoKorGW4dDQY+ZprZRaBuJP3ls17ir BEgZaNckaIM8Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id CA5B46A032; Sat, 14 Mar 2026 17:17:28 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Sat, 14 Mar 2026 17:15:53 -0600 Message-ID: <20260314231618.338113-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260314231618.338113-1-sjg@u-boot.org> References: <20260314231618.338113-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 2XS5YVUWDMQADSUN7UDJRDWXLQNFWNMF X-Message-ID-Hash: 2XS5YVUWDMQADSUN7UDJRDWXLQNFWNMF 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 <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 02/19] sandbox: Use sandbox_exit() for -c command path List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/2XS5YVUWDMQADSUN7UDJRDWXLQNFWNMF/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
test: Fix pytest inter-test side effects
|
|
Commit Message
Simon Glass
March 14, 2026, 11:15 p.m. UTC
From: Simon Glass <sjg@chromium.org> The -c command path calls os_exit() directly, bypassing state_uninit(). This means cleanup actions like writing the malloc dump are skipped. Use sandbox_exit() instead, which calls state_uninit() before exiting. Now that sandbox_exit() accepts an exit code, the command return value is still propagated correctly. Signed-off-by: Simon Glass <sjg@chromium.org> --- arch/sandbox/cpu/start.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index b9f48376d22..7c9f0a99654 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -158,7 +158,7 @@ int sandbox_main_loop_init(void) 0); #endif if (!state->interactive) - os_exit(retval); + sandbox_exit(retval); } return 0; @@ -583,7 +583,7 @@ void __efi_runtime EFIAPI efi_reset_system( unsigned long data_size, void *reset_data) { if (reset_type == EFI_RESET_SHUTDOWN) - sandbox_exit(); + sandbox_exit(0); else sandbox_reset(); }