From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2E62B1F4B4 for ; Sat, 26 Dec 2020 18:49:39 +0000 (UTC) Received: from localhost ([::1]:55358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktEdG-0001at-0P for normalperson@yhbt.net; Sat, 26 Dec 2020 13:49:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktEdD-0001am-4e for bug-gnulib@gnu.org; Sat, 26 Dec 2020 13:49:35 -0500 Received: from mo4-p01-ob.smtp.rzone.de ([81.169.146.167]:34574) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktEdA-0008Ee-IP for bug-gnulib@gnu.org; Sat, 26 Dec 2020 13:49:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1609008569; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:From: Subject:Sender; bh=AebFAyH6Z2fkZuEHBLFDTuNkSNx/gEAerqzG6dQOEcc=; b=tno1+Hdvt8NziYp93PjiHstdMROHURWktznPO7W4HyvCYiJ9cOEc/mTfSP1FYyLwyH K3ahesjkVRPglPAko1eFUKyYruacvl8QC92YON9QVm0XCEseB5kEyBvWbefLE3AaGQlC Mn1lj3oY+KWP6uwYEksQTBNH6LR++o+tFJpB+5vW5pt6n07M7OLVyhF107NlhuUDGu3M 6bzESF7hQ+FJ4KHbopijryj/1TKkJJo2+AJIFWnO/u1wi1sSLnKJve/fv8GcZr+RHzCf mIiquy7toBxbUNgYt0jvvUNJRm7mrU0R/UYLAf7Vnf8Bk5o4E44b/LwDMfqGRhtWe6WF oFpg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOHqfzyPs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.10.7 DYNA|AUTH) with ESMTPSA id e012d5wBQInS9kh (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sat, 26 Dec 2020 19:49:28 +0100 (CET) From: Bruno Haible To: Simon Josefsson Subject: Re: cmp/diff Date: Sat, 26 Dec 2020 19:49:27 +0100 Message-ID: <4087542.9Ba499KVGE@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <87ft3spgax.fsf@latte.josefsson.org> References: <878s9k8rhw.fsf@latte.josefsson.org> <2437960.L2bZbQ6S5l@omega> <87ft3spgax.fsf@latte.josefsson.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=81.169.146.167; envelope-from=bruno@clisp.org; helo=mo4-p01-ob.smtp.rzone.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, NICE_REPLY_A=-1.619, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Simon, > > 'cmp' and 'diff' are among the programs that a 'configure' script and a Makefile > > can assume to be present, see the GNU Coding Standards > > . > > Hi Bruno. Thanks for the pointer! I believe this resolves my concern. > > It would be nice to reduce that set of tools. Well, both 'cmp' and 'diff' are part of POSIX: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cmp.html https://pubs.opengroup.org/onlinepubs/9699919799/utilities/diff.html They have been listed at this place in the GNU Coding Standards since at least 2004. But, of course, you are free to write to https://lists.gnu.org/mailman/listinfo/bug-standards > Is there any automated purpose for diff other than a fancy cmp? Makefile rules are written both for automated execution and for the developers of a package. While for the automated execution of a unit test, "cmp expected.out actual.out" is sufficient, for a developer, "diff expected.out actual.out" is definitely nicer. Especially if the log of the unit test is created on a machine on which the developer has no direct access (such as a contributor's machine or a build farm), "diff expected.out actual.out" has information that is essential for debugging. Bruno