Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Jan 2020 20:12:31 +0800
From:      Li-Wen Hsu <lwhsu@freebsd.org>
To:        Mark Johnston <markj@freebsd.org>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all <svn-src-all@freebsd.org>,  svn-src-head <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r356695 - head/usr.bin/diff
Message-ID:  <CAKBkRUz1ARm6jVw%2B%2BC=apEx4zG8FpnVpHE9u1PSatPO1zCiddg@mail.gmail.com>
In-Reply-To: <202001131829.00DITmev016747@repo.freebsd.org>
References:  <202001131829.00DITmev016747@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 14, 2020 at 2:29 AM Mark Johnston <markj@freebsd.org> 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 <fnoyanisi@yahoo.com> (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?

Thanks,
Li-Wen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKBkRUz1ARm6jVw%2B%2BC=apEx4zG8FpnVpHE9u1PSatPO1zCiddg>