From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ZNKAJU8hjGr1szsAWB0awg (envelope-from ) for ; Mon, 24 Aug 2026 06:47:43 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UPIsGtTS; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 600001E033; Mon, 24 Aug 2026 06:47:43 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 41A031E033 for ; Mon, 24 Aug 2026 06:47:42 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 91AF54BA7999 for ; Mon, 24 Aug 2026 10:47:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 91AF54BA7999 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UPIsGtTS Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 093674BA2E1C for ; Mon, 24 Aug 2026 10:47:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 093674BA2E1C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 093674BA2E1C Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787568431; cv=none; b=oJvARt+DkPclJak345JIlq1Ky2OLCAe5OmdgY4Xa9AfNRpdRqouedhQH73t92jaWly/+Vzw2uMRUwD0XO9oCSClRTnieYqQ1yjdmK/TP4jsVVL5+jh2qL5l+e+VzrmFYjJYQF0UvjHDahpQVKnaheSmM9T/aE0kk0JmxFkuJOI8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787568431; c=relaxed/simple; bh=5DO0/hTdAHAxJrCQtZLvgy51nIOG13OJqA7Ec9o2kNY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=V+lDz4v6FyUwi3vkvwvU72q9h4GtCfHFb6M2xEUwy//u+K4Ys+KS4qnUjLzlydeWqJ/IoaKuDvtB5lCchC47OLoOMWbcUC75GLMa6YgI3qJfB7bpbE9PdhcTunBsxQsfyI49Npz2JLDvnnZ+poLPAhEHsrpfCLrcOuSCDEeHwc0= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=UPIsGtTS DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 093674BA2E1C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1787568430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=k3h5u+S5JaLJcacICIH1+lVN7sraEVFpaIymomkTPzg=; b=UPIsGtTSFUA+whUAHxSJRm7pAJBQ1tcNx5lTxSmn2qgcVlviqzb+6vblD1+5buBagP+eAq Nna/9qqL7fWPsZGZ1mFmeJ1b4QyN5VsPV0ajWnFm9c+gg/rbvbtNcmyrhkHlh8brU9azJ0 xZmwIMPhJSt6FsWGOSPJcAMz5cThkXA= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-331-Xqu4ChnTOa6v-qBziUs1mA-1; Mon, 24 Aug 2026 06:47:08 -0400 X-MC-Unique: Xqu4ChnTOa6v-qBziUs1mA-1 X-Mimecast-MFC-AGG-ID: Xqu4ChnTOa6v-qBziUs1mA_1787568427 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-4955843c6cdso28177815e9.1 for ; Mon, 24 Aug 2026 03:47:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787568427; x=1788173227; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=k3h5u+S5JaLJcacICIH1+lVN7sraEVFpaIymomkTPzg=; b=D/yH+x8ZNrf85BGf7arbac9MGtB4S2vG1sfdkZhr3GK8O+pq3gnU5ztpxIfRQQS82i oQttOfmc1/cD1yauGe+3s9GyOrX/W+jJyhfClxImJTel3mI8ukRTvkTpSARihuoAZhlB iY0rti6INCf0DCP0NkcabxRWkZRyrQvs9UBQi9CtqtFZDbK31J2u0Mc4g9ZjD80CjEf6 aplnE3rAOyh7GgclE/CcJ/sfMXwZ0RMw2kwxPrMZ1UCcBh77a6r5ZTAYVIwT5vuEJNY+ rIY13up3bsjno+Tuo9lMopjXfvi0uqua1QspuPzUFHSsXSYe0WTKoIYoxcUZz6QWaRp7 DvjQ== X-Forwarded-Encrypted: i=1; AHgh+RqiPMyprVv2T2NhiBjdTvd1o5B1ZytlrhVsAjH1uzeQalOnOZFfjK8J836Dk1iHiZpnl2cBDDGzhiO5hg==@sourceware.org X-Gm-Message-State: AFuF++kl2+AThd9wI1GFRDbqDUSU16Buk6C/t4ptXN5TCEx0f7TmdxSe 5xXvHdTsKfTaopR3U6sZFLwf90M68I0izNqABJTnPb9Bo6JJDABpXohK+u/FIbpZXKpzJdwGG1n +SFZ7XoJaA/yKViycHrFUFYktwtNdithUzqhDsS73l+Fj3RR6zuSHWJcJN4MwkZWeZ28Gq7I= X-Gm-Gg: AR+sD11A3CEmyQe7J9w78EU6ZNhKgnRKaevyDPvGzIVojWSNcIxXLFZDwPESM/RX4J/ DjuG5/TU0YxL1lXbSYE0cbpDz1aIPsQKzRF1i989u/csEabgVy8yGlYcegdEronN0DNFi8eY93K POJum/O3xbD8iaI0JexX2roCDnv9NOs1KSoqK+pe6H71ofhWPvn5AYgOn4qQXm7dxFP/CsCq/9O kobw0eix5QFKOa9zOW2DaTQOo3aYNjygRcNELGwLPdRR19XogLfDEe5b+zQh4Y9MqBvG+m80hL4 75RZ+VpEWF0FZuNPvqHmiZV1DR8yzaGgIkKy0i5J2ZqjhCsLjS0/oYnaoBim0yZLBiPVrK2yYhS Y8JfZw79wS4z2YViH5TZ5XOac0NU= X-Received: by 2002:a05:600c:a47:b0:499:79b9:e220 with SMTP id 5b1f17b1804b1-499b8454ba7mr323375125e9.10.1787568427455; Mon, 24 Aug 2026 03:47:07 -0700 (PDT) X-Received: by 2002:a05:600c:a47:b0:499:79b9:e220 with SMTP id 5b1f17b1804b1-499b8454ba7mr323373615e9.10.1787568426739; Mon, 24 Aug 2026 03:47:06 -0700 (PDT) Received: from localhost (128.223.159.143.dyn.plus.net. [143.159.223.128]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-499b9ba5139sm70166905e9.2.2026.08.24.03.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2026 03:47:06 -0700 (PDT) From: Andrew Burgess To: Jan Dubiec , gdb-patches@sourceware.org Cc: Jan Dubiec Subject: Re: [PATCH] H8/300: sim: testsuite: Use the correct file descriptor for stdout. In-Reply-To: <20260822104502.1569137-1-jdx@o2.pl> References: <20260822104502.1569137-1-jdx@o2.pl> Date: Mon, 24 Aug 2026 11:47:05 +0100 Message-ID: <871pbn23ti.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -vOKIKwQRYSIAklVa83j1VI85D10yzgwtXjxoyj4PFA_1787568427 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org Hi Jan, Thanks for fixing this. Note: your subject lines ends with a period. The GDB/sim style is to drop the period from the subject line. Jan Dubiec writes: > This is obviously a typo, because the file descriptor for stdout is 1 on > both Linux and Windows. As a result, the test cases returned nothing > on Windows, i.e. neither "pass" nor "fail". Which, BTW, raises the > question of why 0 works on Linux. For over 20 years... On Linux, FDs 0, 1, and 2 are usually all pointing at the same underlying device which is opened for bi-directional I/O. FD 1 might get line or block buffering from libc, but once the write actually goes out to the kernel, it's all going to the same underlying pseudo-terminal device which is bi-directional. As a result, writing to stdin will work just fine. Obviously none of this is true if the parent process goes out of its way to adjust 0, 1, and 2 prior to exec-ing the simulator. But for normal use, that's why this is working on Linux. > > Signed-off-by: Jan Dubiec Please remove this tag. This has no meaning for GDB/simulator right now, but might in the future, in which case it would be good to keep the commit history free of these tags. You might want to update the commit message to mention why this was working fine on Linux. But with the subject line period removed, and the Signed-off-by tag removed: Approved-By: Andrew Burgess Thanks, Andrew > --- > sim/testsuite/h8300/testutils.inc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sim/testsuite/h8300/testutils.inc b/sim/testsuite/h8300/testutils.inc > index 63d27d45c14..1e2c7c31c7b 100644 > --- a/sim/testsuite/h8300/testutils.inc > +++ b/sim/testsuite/h8300/testutils.inc > @@ -85,7 +85,7 @@ _main: > > ; Output "pass\n" > .macro pass > - mov.w #0, r0 ; fd == stdout > + mov.w #1, r0 ; fd == stdout > .if (sim_cpu == h8300) > mov.w #pass_str, r1 ; buf == "pass\n" > mov.w #5, r2 ; len == 5 > @@ -98,7 +98,7 @@ _main: > > ; Output "fail\n" > .macro fail > - mov.w #0, r0 ; fd == stdout > + mov.w #1, r0 ; fd == stdout > .if (sim_cpu == h8300) > mov.w #fail_str, r1 ; buf == "fail\n" > mov.w #5, r2 ; len == 5 > -- > 2.55.0