https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252446
--- Comment #3 from commit-h...@freebsd.org --- A commit in branch stable/12 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4b74a4d4e26788ae8e47ec10172ac80ce435dbb5 commit 4b74a4d4e26788ae8e47ec10172ac80ce435dbb5 Author: Kyle Evans <kev...@freebsd.org> AuthorDate: 2021-01-05 21:33:06 +0000 Commit: Kyle Evans <kev...@freebsd.org> CommitDate: 2021-01-24 04:04:55 +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 ultimately replace all of the spaces with a single newline, and they would match the paths whether they were correctly fromatted or not. Current /usr/bin/grep (i.e. bsdgrep) is less-tolerant of ordinary-escapes, a property of the underlying regex(3) engine, to make it easier to identify 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 has 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 (cherry picked from commit 4832d2e8ae1df6f907ac00275764f8135722cb7e) usr.bin/du/tests/du_test.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ freebsd-bugs@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"