History log of /freebsd/usr.bin/cmp/tests/cmp_test2.sh (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b697835c 14-Nov-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

Improve reliability of stdout tests.

If the test runner is under heavy load, the command we are testing may
succeed in printing to stdout before the dummy receiver has terminated.
Add a short delay

Improve reliability of stdout tests.

If the test runner is under heavy load, the command we are testing may
succeed in printing to stdout before the dummy receiver has terminated.
Add a short delay to reduce the likelihood of this happening.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47572

show more ...


# 3c37828e 09-Oct-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

cmp: Check the status of stdout.

POSIX requires us to print an error message and exit non-zero if
writing to stdout fails. This can only happen if sflag is unset.

MFC after: 3 days
Sponsored by: K

cmp: Check the status of stdout.

POSIX requires us to print an error message and exit non-zero if
writing to stdout fails. This can only happen if sflag is unset.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47020

show more ...


# d350e8d7 09-Oct-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

cmp: Style and type issues.

MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: 0mp, markj
Differential Revision: https://reviews.freebsd.org/D47019


Revision tags: release/13.4.0, release/14.1.0, release/13.3.0, release/14.0.0
# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

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

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

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0
# f66b9b40 23-Sep-2021 Kyle Evans <kevans@FreeBSD.org>

cmp: add -b, --print-bytes

This is compatible with GNU cmp.

Reviewed by: bapt, markj (earlier version)
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32074


# 8d546b68 23-Sep-2021 Kyle Evans <kevans@FreeBSD.org>

cmp: add -i, --ignore-initial, an alternative to skip1/skip2 args

This is compatible with GNU cmp.

Reviewed by: markj
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D3

cmp: add -i, --ignore-initial, an alternative to skip1/skip2 args

This is compatible with GNU cmp.

Reviewed by: markj
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32073

show more ...


# 4e380e84 23-Sep-2021 Kyle Evans <kevans@FreeBSD.org>

cmp: add -n, --bytes to limit number of bytes to compare

This is compatible with GNU cmp.

Reviewed by: markj
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32072


# f6787614 23-Sep-2021 Kyle Evans <kevans@FreeBSD.org>

cmp: accept SI suffixes for skip1 and skip2

This is compatible with GNU cmp.

Reviewed by: bapt (earlier version), markj, imp
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd

cmp: accept SI suffixes for skip1 and skip2

This is compatible with GNU cmp.

Reviewed by: bapt (earlier version), markj, imp
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32071

show more ...


Revision tags: release/13.0.0
# 80445b7a 11-Jan-2021 Ed Maste <emaste@FreeBSD.org>

cmp: fix -s (silent) when used with skip offsets

-s causes cmp to print nothing for differing files, for use when only
the exit status is of interest.

-z compares the file size first, for regular f

cmp: fix -s (silent) when used with skip offsets

-s causes cmp to print nothing for differing files, for use when only
the exit status is of interest.

-z compares the file size first, for regular files, and fails the
comparison early if they do not match.

Prior to this change -s implied -z as an optimization, but this is not
valid when file offsets are specified. Now, enable the -z optimization
for -s only if both skip arguments are not provided / 0.

Note that using -z with differing skip values will currently always
fail. We may want to compare size1 - skip1 with size2 - skip2 instaead,
and in any case the man page should be clarified.

PR: 252542
Fixes: 3e6902efc802ab57fc4e9bf798f2d271b152e7f9
Reported by: William Ahern
Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D28071

show more ...


Revision tags: release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0
# 2aaf9152 18-Mar-2019 Alan Somers <asomers@FreeBSD.org>

MFHead@r345275


# 809a8352 11-Mar-2019 Alan Somers <asomers@FreeBSD.org>

Drop "All rights reserved" from the files I own

Also, add SPDX tags where needed.

MFC after: 2 weeks


# b18a4cca 05-Mar-2019 Enji Cooper <ngie@FreeBSD.org>

MFhead@r344786


# 844fc3e9 04-Mar-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r344549 through r344775.


# 2528b7e2 25-Feb-2019 Mark Johnston <markj@FreeBSD.org>

Fix handling of rights on stdio streams, take two.

Split the rights-limiting code into two cases: if one of the input
files isn't a regular file, use caph_limit_stream(3) instead of
open-coding the

Fix handling of rights on stdio streams, take two.

Split the rights-limiting code into two cases: if one of the input
files isn't a regular file, use caph_limit_stream(3) instead of
open-coding the same logic; if both input files are regular files,
and the initial attempts to map them succeed, we limit the rights on
those files to CAP_MMAP_R.

Add a regression test for PR 234885.

PR: 234885
Reviewed by: delphij
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19216

show more ...


# 88148a07 22-Jan-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r343202 through r343319.


# 109b5c10 21-Jan-2019 Mark Johnston <markj@FreeBSD.org>

Fix cmp(1) tests for "special" mode.

Test failures don't seem to propagate up if atf_check is run in
a pipeline. Thus, the tests continued to pass despite the bug reverted
in r343245.

MFC after: 1

Fix cmp(1) tests for "special" mode.

Test failures don't seem to propagate up if atf_check is run in
a pipeline. Thus, the tests continued to pass despite the bug reverted
in r343245.

MFC after: 1 week

show more ...


Revision tags: release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0
# 69415bc5 08-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r311546 through r311683.


# 4e354796 07-Jan-2017 Alan Somers <asomers@FreeBSD.org>

Fix file descriptor leaks in cmp(1)

Also, add a few test cases

Reported by: Coverity
CID: 271624 275338
Reviewed by: ngie
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision:

Fix file descriptor leaks in cmp(1)

Also, add a few test cases

Reported by: Coverity
CID: 271624 275338
Reviewed by: ngie
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D9074

show more ...