From unknown Sat Jun 21 10:43:25 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#70473 <70473@debbugs.gnu.org> To: bug#70473 <70473@debbugs.gnu.org> Subject: Status: [PATCH] tests: fix stdin tests Reply-To: bug#70473 <70473@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:43:25 +0000 retitle 70473 [PATCH] tests: fix stdin tests reassign 70473 diffutils submitter 70473 Tanmay severity 70473 normal tag 70473 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 08:10:04 2024 Received: (at submit) by debbugs.gnu.org; 19 Apr 2024 12:10:04 +0000 Received: from localhost ([127.0.0.1]:58221 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxn46-0000DX-2j for submit@debbugs.gnu.org; Fri, 19 Apr 2024 08:10:03 -0400 Received: from lists.gnu.org ([2001:470:142::17]:37924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxn1m-0008Mv-S7 for submit@debbugs.gnu.org; Fri, 19 Apr 2024 08:07:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rxn1T-0004dv-6i for bug-diffutils@gnu.org; Fri, 19 Apr 2024 08:07:19 -0400 Received: from mail-oa1-x30.google.com ([2001:4860:4864:20::30]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxn1R-0004il-HS for bug-diffutils@gnu.org; Fri, 19 Apr 2024 08:07:18 -0400 Received: by mail-oa1-x30.google.com with SMTP id 586e51a60fabf-2348a5d1584so880503fac.2 for ; Fri, 19 Apr 2024 05:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713528436; x=1714133236; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=Jj+VZG7ouhn7G0eB1E++cOVLkjE40nMyn5yEhz6up0o=; b=ah3ct57E/Drbhxfgqn9J0eTY8xM6Sw7xQEVLVRwRn1E9SEWEBD1CjP+aekfKCT2j48 1f1xZjR6nwXc3TegKleAvlpMSr9s7xZ3B86yI1nP4GL7iH8RHATHnfmATot5zJ5Ue+fj GHWk2OTeYlf24yJDs0JmIfErdjRDDArMtTflwrnF8q9qwOHUD9tQibQW0Oav0ovh3wOA 4ixOiCx2N9tftetiKGtH7PeOlGS3dc5KYHD+yD/AOc9wF5Df2V05d+aC4k3a0Hm022zz FcM8HUgxLQmWxSkhl1EZKQ28apJp+Ocltff0a6vqSrw+WvIiRm7V6x6F7MOmAFpnY+1q fTHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713528436; x=1714133236; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=Jj+VZG7ouhn7G0eB1E++cOVLkjE40nMyn5yEhz6up0o=; b=rc1FKa04mWbVihrD8A4CoyCjX+U5SMaUtIqV4TYBQcNjQT3I1AE5dsQU1C/3K6dgNM JQU4uACRlpdMiQLrq56pwQCrEnsZDb/Br4S3a4RsutvOQpcZwsMYZaCJKhl0naSilyjp LJs+dNfqe3hgVl+LuIGlB9hDUukjgVl/t4kalLt+Jl0gOSyXbQD3rK8sQQ+rV9Tv/9GG mWJ6dNlPgza/vwDBVMUqv+J/xy2k8b3sSXJ9jaSXVDcLEPv7utSHqwkzOb+OCCEv1NzH tckN3/GEQgoTEgU2oiIs6oiRBOo+SlZse0vCcvrVeByl++R6dxgQMh7MKw/NxoJpl7Im cgsA== X-Gm-Message-State: AOJu0YwJ77Y1PLYH5ltb4iOQkNJ4HyaaeKncOQpc1D9AFN3OiFIQ/1S9 dQ1PpcNy/vwCSYoI1WEqR4OWSRyGVaEfSzhZFKBje2XIaPem01/FEziIvsw7D//bIxOF7MDdvIw 5+t5e5JJGOSL7aWHBQH0Bt1dDajVN7ENQ/5A= X-Google-Smtp-Source: AGHT+IHa7K/PSkUaFkohYvvFQQTlw91cusXMh1AgByveAvWltSupgWn7DX0A8s0zO3bluExEtw0+pKZADMPMd+pYpC4= X-Received: by 2002:a05:6871:4183:b0:22e:caed:bc2 with SMTP id lc3-20020a056871418300b0022ecaed0bc2mr2371635oab.8.1713528435802; Fri, 19 Apr 2024 05:07:15 -0700 (PDT) MIME-Version: 1.0 From: Tanmay Date: Fri, 19 Apr 2024 17:37:04 +0530 Message-ID: Subject: [PATCH] tests: fix stdin tests To: bug-diffutils@gnu.org Content-Type: multipart/alternative; boundary="000000000000ba8f10061671edb6" Received-SPF: pass client-ip=2001:4860:4864:20::30; envelope-from=tanmaynpatil105@gmail.com; helo=mail-oa1-x30.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi, I noticed that in the tests/stdin directory, we were taking input directly from the 'd' directory, which seems incorrect. tests/stdin:31 diff -u - a out 2>err || fail=1 Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tanmaynpatil105[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (tanmaynpatil105[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 HTML_MESSAGE BODY: HTML included in message X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 19 Apr 2024 08:10:01 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) --000000000000ba8f10061671edb6 Content-Type: text/plain; charset="UTF-8" Hi, I noticed that in the tests/stdin directory, we were taking input directly from the 'd' directory, which seems incorrect. tests/stdin:31 diff -u - a out 2>err || fail=1 I'm not sure how the tests were working with input directly from the 'd' directory. I'm including a patch which fixes it. Thanks, Tanmay >From 021148712cb01efb954e9c1a6961b2df9cdfcf04 Mon Sep 17 00:00:00 2001 From: Tanmay Patil Date: Fri, 19 Apr 2024 17:20:39 +0530 Subject: [PATCH] tests: fix stdin tests Signed-off-by: Tanmay Patil --- tests/stdin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/stdin b/tests/stdin index 0fd9e7e..dda076b 100755 --- a/tests/stdin +++ b/tests/stdin @@ -24,7 +24,7 @@ compare /dev/null err || fail=1 mkdir d || framework_failure_ echo a >d/a || framework_failure_ -diff -u - a out 2>err || fail=1 +diff -u - a out 2>err || fail=1 compare /dev/null out || fail=1 compare /dev/null err || fail=1 -- 2.40.1 --000000000000ba8f10061671edb6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I noticed that in the te= sts/stdin directory, we were taking input directly from the 'd' dir= ectory, which seems incorrect.

tests/stdin:31 diff -u - a <d >= out 2>err || fail=3D1

I'm not sure how the test= s were working with input directly from the 'd' directory. I'm = including a patch which fixes it.


Thanks,
<= /div>
Tanmay

From 021148712cb01efb954e9c1a6961b2df9cdfcf04 Mon S= ep 17 00:00:00 2001
From: Tanmay Patil <tanmaynpatil105@gmail.com>
Date: Fri, 19 Apr 2024= 17:20:39 +0530
Subject: [PATCH] tests: fix stdin tests

Signed-of= f-by: Tanmay Patil <tanmayn= patil105@gmail.com>
---
=C2=A0tests/stdin | 2 +-
=C2=A01 fi= le changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/stdin b= /tests/stdin
index 0fd9e7e..dda076b 100755
--- a/tests/stdin
+++ b= /tests/stdin
@@ -24,7 +24,7 @@ compare /dev/null err || fail=3D1
=C2= =A0mkdir d || framework_failure_
=C2=A0echo a >d/a || framework_failu= re_
=C2=A0
-diff -u - a <d >out 2>err || fail=3D1
+diff -= u - a <d/a >out 2>err || fail=3D1
=C2=A0compare /dev/null out |= | fail=3D1
=C2=A0compare /dev/null err || fail=3D1
=C2=A0
--
2= .40.1

--000000000000ba8f10061671edb6-- From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 11:52:36 2024 Received: (at 70473-done) by debbugs.gnu.org; 19 Apr 2024 15:52:36 +0000 Received: from localhost ([127.0.0.1]:58873 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxqXT-00014Y-PZ for submit@debbugs.gnu.org; Fri, 19 Apr 2024 11:52:36 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:36376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxqXR-00013e-8v for 70473-done@debbugs.gnu.org; Fri, 19 Apr 2024 11:52:35 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 07F643C0140A0; Fri, 19 Apr 2024 08:52:13 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id ggU1AnYRNbkY; Fri, 19 Apr 2024 08:52:12 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id ABCFF3C0140A4; Fri, 19 Apr 2024 08:52:12 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu ABCFF3C0140A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1713541932; bh=sS34a5FAvNlYxD426Gde7eyq84fSvtWy0NCkhIRSTCE=; h=Message-ID:Date:MIME-Version:To:From; b=OIEzOgvuZ2wQh2QvYTgRHqW26r5+RkX5/oCkEr66PbcnK4W29RaTDO+D0AoudH1Of sQ25E15COzFFT3Oc2ISe8dChCQGk6MNSK6CfBF09dTYNYjX8JYaHraaMoRYqfvIvsd G71vel8TEjfzE/7sjhBj0xVcXBlENSm4ZGtB/FBFvFGxT0Ng59JalfN3huoIq2YNn9 p4ullkpC/gvRn7cLJkb6N72j8aWdPvOCfqEKchHHbzzkhaM1CfwLtxx8KkFjtYIYp7 pemMi72x0j5YhheeD/L3k2kLjgcVtSMWccohR7i5pR1b0i0VknZ/6xiNITEdO3jbKc GIregvEEWwKww== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id n2vx-M8nQ8MJ; Fri, 19 Apr 2024 08:52:12 -0700 (PDT) Received: from [192.168.254.12] (unknown [47.154.17.165]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 9005C3C0140A0; Fri, 19 Apr 2024 08:52:12 -0700 (PDT) Message-ID: Date: Fri, 19 Apr 2024 08:52:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [bug-diffutils] bug#70473: [PATCH] tests: fix stdin tests To: Tanmay References: Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70473-done Cc: 70473-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 2024-04-19 05:07, Tanmay wrote: > I noticed that in the tests/stdin directory, we were taking input directly > from the 'd' directory, which seems incorrect. > > tests/stdin:31 diff -u - a out 2>err || fail=1 I don't see a bug there. In general 'diff DIRECTORY FILE' acts like 'diff DIRECTORY/FILE FILE'; here 'diff - a ) id 1rxsz8-0002oM-6u for submit@debbugs.gnu.org; Fri, 19 Apr 2024 14:29:18 -0400 Received: from mail.cs.ucla.edu ([131.179.128.66]:46512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxsz6-0002ny-FY for 70473@debbugs.gnu.org; Fri, 19 Apr 2024 14:29:17 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 086533C0140A0; Fri, 19 Apr 2024 11:28:56 -0700 (PDT) Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10032) with ESMTP id 859LRBtTLMYD; Fri, 19 Apr 2024 11:28:55 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.cs.ucla.edu (Postfix) with ESMTP id 7973D3C0140A4; Fri, 19 Apr 2024 11:28:55 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.cs.ucla.edu 7973D3C0140A4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=9D0B346E-2AEB-11ED-9476-E14B719DCE6C; t=1713551335; bh=gITF2l0Lcf4rjCWuWonF/YaRFtqhziTzg9gIFPtXyRE=; h=Message-ID:Date:MIME-Version:To:From; b=CeP7Zx+Y7/DJzZFni5iRkt4I0l4gw9Avv4RkP6b0Vi3q8zlhi6+4NEqwTSbEboEaF e08hNPuDHbhLJBDrQQT4L88WFeYTbPisBZtyvV/uC/kAybC9h+XkA58nXjtUshRdQc 0s9o0AS6gSbynmVMW8JRvEbcFADoVbFEq2uoLc/HeAaStHCfGR4Ed4Qx4dBkOJ070D w3p8sxB2kTHrMIi+3M0Rws3+ZGcNrG2OMB1qiyNBINXFrIAEIc/HodpNoH8scBDedF LLdNpWMxN5tkUILMkGpuHDf0RnCseC+t9CHBohbRKIfsyLpm749bhnk18wdlislcwk P4cWCgNbIjgWg== X-Virus-Scanned: amavis at mail.cs.ucla.edu Received: from mail.cs.ucla.edu ([127.0.0.1]) by localhost (mail.cs.ucla.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id I8wqt_Sb8cy0; Fri, 19 Apr 2024 11:28:55 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by mail.cs.ucla.edu (Postfix) with ESMTPSA id 59CD83C0140A0; Fri, 19 Apr 2024 11:28:55 -0700 (PDT) Message-ID: <37efd4fe-2ed8-4d08-9abe-e46aad796784@cs.ucla.edu> Date: Fri, 19 Apr 2024 11:28:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [bug-diffutils] bug#70473: [PATCH] tests: fix stdin tests To: Tanmay References: Content-Language: en-US From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 70473 Cc: 70473@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On 4/19/24 11:17, Tanmay wrote: > I've grown more curious about how this feature is implemented to handle > stdin. Oh, that's one big advantage of free software: you can read the source code, and change it if it doesn't meet your needs. GNU diff implements this feature by using openat. See: https://git.savannah.gnu.org/cgit/diffutils.git/tree/src/diff.c#n1541 From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 19 19:05:36 2024 Received: (at 70473-done) by debbugs.gnu.org; 19 Apr 2024 23:05:36 +0000 Received: from localhost ([127.0.0.1]:60863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxxII-0001oG-Qr for submit@debbugs.gnu.org; Fri, 19 Apr 2024 19:05:32 -0400 Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]:52469) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rxsoP-0001Yi-P8 for 70473-done@debbugs.gnu.org; Fri, 19 Apr 2024 14:18:14 -0400 Received: by mail-ot1-x336.google.com with SMTP id 46e09a7af769-6ea2375d8d0so1888408a34.0 for <70473-done@debbugs.gnu.org>; Fri, 19 Apr 2024 11:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713550673; x=1714155473; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=59XNqgHvos7CgO3YA3FvdnBcoCiBGqbKo5NU+LIlJ1Q=; b=QgGDxqTVr1eHSyf4vMHSlhyU2pu5+96Atm02ld4x16pzTnBEAGjBbTxDBRJqSZUQpU 1cReCoUliobmCJz1qh1yN7mFAseRfCuuwlKAMWox6Du5w+rNOPrI0vGnIWhvSZCAnmBC TyyIUneK09m+Ko15kphw4/Gu3Mcv7kYk7kYr4Yk0Ib41w+Ar3DO6oWR/EQ0vsHhEor6e fw+rG7mv8daogi8nZYsYdJJuqJGzut6wDA5bvsTfAc5LhCmKqs3TykaCkVUZkB8g/zir y05aq8spsqbUYDGa0qgLrR+461+mFr5I+NlaqP6Tj5uI2olA/LakQAzTDXx+PA3a399P ZOZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713550673; x=1714155473; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=59XNqgHvos7CgO3YA3FvdnBcoCiBGqbKo5NU+LIlJ1Q=; b=ee978EJcmFEBi45hz+Ap6d8LWdNDgGjAT/jr56Me2n3zShoRw50kaO+pumt8yChNGz kBF0OJqK5XUsuua62cVpDxOr7ckJ+BjQlfPq8q7cnbOZH0mepHEfamCtuWWTrFvbLsmZ B2XBQRBgFN0ZonrcSyKPoq9CIO89Poq1MR6ubkPGLb47d4y53/4wg+WLYADLGtMkfqI4 Vas9vW2KzD0xMGSlOz271o8f6Vi/CRAGuMSdPlfwE+tkjJsveMPEHQxHaEYPRWBQboGl kN4FVe9JxHGzmwjzlfMoqhw/QX5yHNzhz0+GR3ineILttUlxi6Umg43WUGDp91igX+4Q 0A9A== X-Gm-Message-State: AOJu0Ywf8EFUjoVgT603FETgWK9mECpdfnZFLIBx9zxyk093ymkUTw0g h9quoyTNY0RfREFmI1GqIneFZijBDE3+51xXF4AD48T4u9PXamkgNb+P/v8rrghYkD0CGCIrorb OJLIrOurEg6vYgEAuEXUiHC8BIpA= X-Google-Smtp-Source: AGHT+IGmlihF5Vnkw4Ssh9UkvthEmyRoPPw1slVjIcYEEL25TX/9XQ8RyCgfEiDrtFKbNPDbo8hi724g6DOFFjf9200= X-Received: by 2002:a05:6870:212:b0:233:2f5e:f527 with SMTP id j18-20020a056870021200b002332f5ef527mr3409639oad.19.1713550673529; Fri, 19 Apr 2024 11:17:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tanmay Date: Fri, 19 Apr 2024 23:47:42 +0530 Message-ID: Subject: Re: [bug-diffutils] bug#70473: [PATCH] tests: fix stdin tests To: Paul Eggert Content-Type: multipart/alternative; boundary="0000000000003358030616771bdc" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 70473-done X-Mailman-Approved-At: Fri, 19 Apr 2024 19:05:09 -0400 Cc: 70473-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --0000000000003358030616771bdc Content-Type: text/plain; charset="UTF-8" Hi, Thanks for replying! I was using an older version (3.8) of diffutils on my machine, and I believe this feature was introduced recently. So, I thought it might be a bug. Now, I've grown more curious about how this feature is implemented to handle stdin. Implementing it without stdin seems fairly straightforward. Looking forward to your response. Thanks, Tanmay On Fri, 19 Apr 2024 at 21:22, Paul Eggert wrote: > On 2024-04-19 05:07, Tanmay wrote: > > I noticed that in the tests/stdin directory, we were taking input > directly > > from the 'd' directory, which seems incorrect. > > > > tests/stdin:31 diff -u - a out 2>err || fail=1 > > I don't see a bug there. In general 'diff DIRECTORY FILE' acts like > 'diff DIRECTORY/FILE FILE'; here 'diff - a --0000000000003358030616771bdc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

Thanks for reply= ing!

I was using an older version (3.8) of diffutils on my mac= hine,=20 and I believe this feature was introduced recently. So, I thought it might be a bug. Now, I've grown more curious about how this feature= =20 is implemented to handle stdin. Implementing it without stdin seems fairly = straightforward.

Looking forward to your response.
<= br>
Thanks,
Tanmay

On Fri, 19 Apr 2024 at 21:22, Paul Egge= rt <eggert@cs.ucla.edu> wro= te:
On 2024-04-1= 9 05:07, Tanmay wrote:
> I noticed that in the tests/stdin directory, we were taking input dire= ctly
> from the 'd' directory, which seems incorrect.
>
> tests/stdin:31 diff -u - a <d >out 2>err || fail=3D1

I don't see a bug there. In general 'diff DIRECTORY FILE' acts = like
'diff DIRECTORY/FILE FILE'; here 'diff - a <d' acts like= 'diff d/a a'.
--0000000000003358030616771bdc-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 20 00:41:18 2024 Received: (at 70473) by debbugs.gnu.org; 20 Apr 2024 04:41:18 +0000 Received: from localhost ([127.0.0.1]:34135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ry2XN-0000Cr-QH for submit@debbugs.gnu.org; Sat, 20 Apr 2024 00:41:18 -0400 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]:48597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ry2XM-0000Bo-8L for 70473@debbugs.gnu.org; Sat, 20 Apr 2024 00:41:17 -0400 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-5aa1e9527d1so2031237eaf.1 for <70473@debbugs.gnu.org>; Fri, 19 Apr 2024 21:41:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713588056; x=1714192856; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=13y/WzHjl0K5M+wLlLM7XGitGS70paRRwpD14wE1uDo=; b=AaMbFKr/N6XeVyC0G+OGy506AORdTjq21lWBpMS7E6xLDfXecs5kDLloygpECBTj9C xOt+qrRbmzPkodkf9qnSQNoSkSVGx6y/XkDV9rChzed7V1hT/D+yPRT0cQ4WJ+ctFr2B 0ilLbtyTu67xHqTYX05SUllDFMW2BQDX7ivgMET9FkNRG69oyIFnj1/bqPoto+t/43tz EvQEwzJhgXIykeGLsi+A9teJobb6KMc9uqvNSNBKF7xegJL60fsKPIx+Jvs3ejVw/I5p LoGpFE0yBYKcjnr0TNEfGSweLZ4jES6y2epA49km5pGoIi/TKn8Fzosdbg1ipnRFX9ZG MsCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713588056; x=1714192856; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=13y/WzHjl0K5M+wLlLM7XGitGS70paRRwpD14wE1uDo=; b=DJ/B6aN51acrotaLJiSG9DI7K1CGCC8UUiz5zcFZ7QciWO/73H/PP356i60g8rICo7 P7sAzL6QR662lLkGI7KOk6PKeYvDTNZz7OYj68higuc95P9vo9Lz5Dx91b/9LSWF+Vyh lKT9giGiyOVr90JfQsig80KsV93TmQ9zzyHpuTaQgddWuOi7512sqeZn6G6ccCzhE69d UC8/v6fRlxP74x4y+hgemAWHvhHEzrFDuzzDZFS4/Gp/ci/xV7LBdOLQHKRPz15OyR1m KX6UynqCfk/l5CHZtgtvVEezyyeOoINHa6QMWNn+HHoKjMOonB4e9RW7BOhAB1lh6rF0 fhog== X-Gm-Message-State: AOJu0YxRH7zUcCI8sRUYeNJUEzSlahDY9UZP9bfitRyNhoGFKJSNxhyO msR/TMaMd0rNokglKxqXNoTr7iZzJfH8LivbPvxL1pptXfRN8rEHlZFcfXCrWqMcxfWC9IcFDFA 1jiGjJqVPb/w8D+z5yFapPU3lHag= X-Google-Smtp-Source: AGHT+IG2DR39padI5V6JKp0EJ4yj3Hmv0DG7bQ6UmflyQ2tTRquuY02QquIVJb3DtZ2O5cj/fHUubZI9JSdZy1wRxDs= X-Received: by 2002:a4a:ac89:0:b0:5a1:cefd:73d6 with SMTP id b9-20020a4aac89000000b005a1cefd73d6mr4600327oon.7.1713588055759; Fri, 19 Apr 2024 21:40:55 -0700 (PDT) MIME-Version: 1.0 References: <37efd4fe-2ed8-4d08-9abe-e46aad796784@cs.ucla.edu> In-Reply-To: <37efd4fe-2ed8-4d08-9abe-e46aad796784@cs.ucla.edu> From: Tanmay Date: Sat, 20 Apr 2024 10:10:44 +0530 Message-ID: Subject: Re: [bug-diffutils] bug#70473: [PATCH] tests: fix stdin tests To: Paul Eggert Content-Type: multipart/alternative; boundary="0000000000005ae5c806167fcf00" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 70473 Cc: 70473@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --0000000000005ae5c806167fcf00 Content-Type: text/plain; charset="UTF-8" > > Oh, that's one big advantage of free software: you can read the source > code, and change it if it doesn't meet your needs. > Indeed, that's the reason we all love Free Software. Thank you very much for directing me to that piece of code. I was struggling a bit to understand it. Thanks, Tanmay On Fri, 19 Apr 2024 at 23:58, Paul Eggert wrote: > On 4/19/24 11:17, Tanmay wrote: > > I've grown more curious about how this feature is implemented to handle > > stdin. > > Oh, that's one big advantage of free software: you can read the source > code, and change it if it doesn't meet your needs. GNU diff implements > this feature by using openat. See: > > https://git.savannah.gnu.org/cgit/diffutils.git/tree/src/diff.c#n1541 > --0000000000005ae5c806167fcf00 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Oh,= that's one big advantage of free software: you can read the source code, and change it if it doesn't meet your needs.
Indeed, that's the reason we all love Free Software.

Thank you = very much for directing me to that piece of code. I was struggling a bit to= understand it.

Thanks,
Tanmay
On Fri, = 19 Apr 2024 at 23:58, Paul Eggert <eggert@cs.ucla.edu> wrote:
On 4/19/24 11:17, Tanmay wrote:
> I've grown more curious about how this feature is implemented to h= andle
> stdin.

Oh, that's one big advantage of free software: you can read the source =
code, and change it if it doesn't meet your needs. GNU diff implements =
this feature by using openat. See:

https://git.savannah.gnu.org/cg= it/diffutils.git/tree/src/diff.c#n1541
--0000000000005ae5c806167fcf00-- From unknown Sat Jun 21 10:43:25 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 18 May 2024 11:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator