From owner-svn-src-all@freebsd.org Tue Jan 14 14:05:35 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 694791EBFA8; Tue, 14 Jan 2020 14:05:35 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47xsg3284Yz4BR4; Tue, 14 Jan 2020 14:05:35 +0000 (UTC) (envelope-from byond.lenox@gmail.com) Received: by mail-qv1-f47.google.com with SMTP id p2so5681069qvo.10; Tue, 14 Jan 2020 06:05:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zuTvbQJtwlE01s3PWNmAfORT7vTg7RAcdTuZGUrpN/o=; b=o8E9YWHUUDm1aYqvZeU/RvKcP0VFCIaMjJ1Y2y4Dv4f915Ds6OaLsjYkPcVVAlqY0s k2XSqoLRZW07PTWC8wex6l+I5yvZFpvQ2/VdRjQxuALAH7LtOHeGje6dfhqkDv6tu+yC d9tPBDMMzQJ48qw+6ioOCneQV78/OR4PuUZSDc97M1XbDydyVdBkH1LolyT32K2Zr9iS 7nobMQfkuRs5/CYvmKtgIbJ+N+IabImNLhRJmD6B2ty9OOuzSULDfn9Fw1Ds0WDUsgSm KXLzaOBdT4gswiAidEQV+vMkcqGvfoCrhp6RXnPA7aIM1N8s+Go0rZ19vPdnOcWW8Oiz l5EQ== X-Gm-Message-State: APjAAAXQAZSj2iCUh8FWiR1YkJIx6QOgWUIKP1I3CYRBW9VHXBtv3x6U +gxvg2d0E2LVSOcVmM3022qD3v/a X-Google-Smtp-Source: APXvYqyP09ddqDxZHYC+uW6/FCmSgENpYhwspg+aD4T36VeUcUXTYHS2smiTgNvzln92sJPEU4l1iw== X-Received: by 2002:a05:6214:1090:: with SMTP id o16mr21105151qvr.105.1579010733962; Tue, 14 Jan 2020 06:05:33 -0800 (PST) Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com. [209.85.219.49]) by smtp.gmail.com with ESMTPSA id v7sm7675852qtk.89.2020.01.14.06.05.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Jan 2020 06:05:33 -0800 (PST) Received: by mail-qv1-f49.google.com with SMTP id o18so5690652qvf.1; Tue, 14 Jan 2020 06:05:33 -0800 (PST) X-Received: by 2002:ad4:46e4:: with SMTP id h4mr21355889qvw.181.1579010733459; Tue, 14 Jan 2020 06:05:33 -0800 (PST) MIME-Version: 1.0 References: <202001131829.00DITmev016747@repo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Tue, 14 Jan 2020 08:05:21 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r356695 - head/usr.bin/diff To: Li-Wen Hsu Cc: Mark Johnston , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 47xsg3284Yz4BR4 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jan 2020 14:05:35 -0000 On Tue, Jan 14, 2020 at 6:12 AM Li-Wen Hsu wrote: > > On Tue, Jan 14, 2020 at 2:29 AM Mark Johnston wrote: > > > > Author: markj > > Date: Mon Jan 13 18:29:47 2020 > > New Revision: 356695 > > URL: https://svnweb.freebsd.org/changeset/base/356695 > > > > Log: > > Optimize diff -q. > > > > Once we know whether the files differ, we don't need to do any further > > work. > > > > PR: 242828 > > Submitted by: fehmi noyan isi (original version) > > Reviewed by: bapt, kevans > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D23152 > > > > Modified: > > head/usr.bin/diff/diffreg.c > > > > Modified: head/usr.bin/diff/diffreg.c > > ============================================================================== > > --- head/usr.bin/diff/diffreg.c Mon Jan 13 18:26:27 2020 (r356694) > > +++ head/usr.bin/diff/diffreg.c Mon Jan 13 18:29:47 2020 (r356695) > > @@ -349,6 +349,11 @@ diffreg(char *file1, char *file2, int flags, int capsi > > goto closem; > > } > > > > + if (diff_format == D_BRIEF) { > > + rval = D_DIFFER; > > + status |= 1; > > + goto closem; > > + } > > if ((flags & D_FORCEASCII) == 0 && > > (!asciifile(f1) || !asciifile(f2))) { > > rval = D_BINARY; > > Hi Mark, > > This one seems breaks test case usr.sbin.etcupdate.fbsdid_test.main: > > https://ci.freebsd.org/job/FreeBSD-head-amd64-test/13920/testReport/junit/usr.sbin.etcupdate/fbsdid_test/main/ > > Revert this can get the case pass. Can you check if the code or the > test needs to be fixed? > Whoops... that was a bit of an oversight. We can only short-circuit if ignore_pats == NULL, otherwise we need to regress back to doing line-by-line comparison. That should still see a benefit for the majority of cases, though, I would think.