From owner-freebsd-bugs@freebsd.org Thu Jan 7 22:37:45 2021 Return-Path: Delivered-To: freebsd-bugs@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 A59A74DDCAB for ; Thu, 7 Jan 2021 22:37:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 4DBh2K3b7Kz4QmD for ; Thu, 7 Jan 2021 22:37:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 751A94DDCAA; Thu, 7 Jan 2021 22:37:45 +0000 (UTC) Delivered-To: bugs@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 6C1924DDC49 for ; Thu, 7 Jan 2021 22:37:45 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DBh2J1chtz4Qpd for ; Thu, 7 Jan 2021 22:37:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2BCB218E19 for ; Thu, 7 Jan 2021 22:37:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 107Mbf67096677 for ; Thu, 7 Jan 2021 22:37:41 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 107MbfZq096676 for bugs@FreeBSD.org; Thu, 7 Jan 2021 22:37:41 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 252446] egrep bug with trailing backslash (\) Date: Thu, 07 Jan 2021 22:37:41 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: kevans@freebsd.org X-Bugzilla-Flags: mfc-stable12? mfc-stable11? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 22:37:46 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252446 --- Comment #2 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D4832d2e8ae1df6f907ac00275764f8135= 722cb7e commit 4832d2e8ae1df6f907ac00275764f8135722cb7e Author: Kyle Evans AuthorDate: 2021-01-05 21:33:06 +0000 Commit: Kyle Evans CommitDate: 2021-01-07 22:36:31 +0000 du: tests: fix the H_flag test (primarily grep usage) This test attempts to use \t (tab intended) in a grep expression. With= the former /usr/bin/grep (i.e. gnugrep), this was interpreted as a literal = 't'. The expression would work anyways because the tr(1) usage would ultimat= ely replace all of the spaces with a single newline, and they would match t= he paths whether they were correctly fromatted or not. Current /usr/bin/grep (i.e. bsdgrep) is less-tolerant of ordinary-escap= es, a property of the underlying regex(3) engine, to make it easier to identi= fy when stuff like this happens. In-fact, this expression broke after the switch happened. This revision does the bare basics to fix the usage by using a printf to get a literal tab character to insert into the expression. It also swaps out the manual insertion of the line prefix into the grep expression by pulling that part out of $sep and reusing it for the leading path. The secondary issue was the tr(1) usage, since tr would only replace the first character of string1 with the first character of string2. This h= as instead been replaced by a sed expression, which similary understands \= n to be a newline on all supported versions of FreeBSD. Each path now gets prefixed with the appropriate context that should be there (i.e. numeric sequence followed by a tab). PR: 252446 Reviewed by: emaste, ngie Differential Revision: https://reviews.freebsd.org/D27983 usr.bin/du/tests/du_test.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --=20 You are receiving this mail because: You are on the CC list for the bug.=