Commit graph

11 commits

Author SHA1 Message Date
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Xin LI d101656818 hexdump: Partial lines cannot be repetitions of earlier lines.
When checking for repetitions of earlier lines, we compare the
first nread bytes of the line against the saved line. However,
when we read a partial line, it should never be treated as a
repetition of an earlier line, even if the first bytes match.

This change fixes a bug where a partial line could be
incorrectly identified as a repetition of an earlier line.

Reported-by:	Mark Adler <madler@alumni.caltech.edu>
PR:		118723
Reviewed-by:	emaste
MFC-after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D40471
2023-06-08 18:39:05 -07:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Kyle Evans 8a9f144c9e hexdump: tests: take into account byte order
Hexdump test was failling on big endian systems when testing decimal, octal
and hexa outputs as the tests were designed on a little endian system. This
revision adds the two distinct flavors of output expected and determines at
runtime which to compare against.

Submitted by:	Renato Riolino <renato.riolino_eldorado.org.br>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D23191
2020-03-02 18:40:34 +00:00
Conrad Meyer 8fb93ac95d hexdump(1): Exit gracefully on format strings missing conversion
PR:		237263
Submitted by:	Bojan Petrovic <bojan_petrovic AT fastmail.fm>
2019-04-13 16:51:48 +00:00
Kyle Evans f0fb94abca Standardize SPDX tag on files I've added 2018-05-09 16:52:28 +00:00
Kyle Evans 450c7a04f7 od(1): Fix mis-patch from r328188
od_test.sh got duplicated erroneously when it was added in r328188. Dedup.
2018-01-20 03:50:56 +00:00
Kyle Evans 6bb764934c od(1): Fix wrong output for some corner cases in multibyte locales.
Restore the original character to print if we used the look-ahead
buffer, but that didn't help -- we either got an illegal sequence
or still can't complete.

PR:		224552
Submitted by:	Yuri Pankov
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D13963
2018-01-20 02:49:32 +00:00
Bryan Drewery 3806950135 DIRDEPS_BUILD: Connect new directories.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:04:07 +00:00
Kyle Evans 7b9f317cf3 hexdump: Remove expected test failures for now succeeding tests
r323990 fixed the -s flag breakage reported by PR 219173. Mark the
corresponding hexdump tests accordingly, since they should now both succeed.

PR:		222781
Reported by:	ngie
Reviewed by:	emaste, ngie
Approved by:	emaste (mentor)
Differential Revision:	https://reviews.freebsd.org/D12590
2017-10-04 18:11:00 +00:00
Kyle Evans b5ddde39ac Add some basic tests for hexdump(1)'s various output flags. Formatting
tests are omitted for this initial run as there are still some bugs to work
out there.

This covers -s flag testing on devices and non-devices that would have
caught breakage found in PR 219173 as well as other subtle breakage caused
locally.

Reviewed by:	cem, ngie
Approved by:	cem (acting co-mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D11279
2017-07-13 03:52:54 +00:00