History log of /freebsd-current/bin/ls/tests/ls_tests.sh
Revision Date Author Comments
# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

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


# 3bfbb521 18-Jul-2023 Minsoo Choo <minsoochoo0122@proton.me>

ls: Improve POSIX compatibility for -g and -n.

- Change -g (ignored for BSD 4.3 compatibility since BSD 4.4)
to use POSIX semantics of implying -l but omitting the owner's
name.

- Change -n to imply -l.

The -o option remains unchanged (POSIX defines -o as a complement to
-g that implies -l but omits group names whereas BSD defines -o to add
file flags to -l). This compromise is the same used by both NetBSD
and OpenBSD.

PR: 70813
Reviewed by: jhb, Pau Amma <pauamma@gundo.com>
Co-authored-by: John Baldwin <jhb@FreeBSD.org>
Differential Revision: https://reviews.freebsd.org/D34747


# e2662256 23-Oct-2022 Aymeric Wibo <obiwac@gmail.com>

ls(1): add a -v flag to sort naturally

Add a -v flag for ls which sorts entries following a natural ordering
using strverscmp(3) (e.g. "bloem1 bloem9 bloem10" as opposed to
"bloem1 bloem10 bloem9").

Update the manual page and add a test case.

Reviewed by: pauamma, bcr
Tested by: pstef
Differential Revision: https://reviews.freebsd.org/D36407


# f698b621 15-Dec-2016 Alan Somers <asomers@FreeBSD.org>

Fix ls_tests:o_flag with ZFS TMPDIR

Unlike UFS or TMPFS, ZFS sets uarch automatically whenever a file is
updated. The test must explicitly clear uarch to be portable across
filesystems. Also, it doesn't need to run as root.

PR: 215179
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8741


# 647672e2 24-Aug-2016 Julio Merino <jmmv@FreeBSD.org>

Skip ls tests that use sparse files if these are not supported.

Some of the ls(1) tests create really large sparse files to validate
the number formatting features of ls(1). Unfortunately, those tests fail
if the underlying test file system does not support sparse files, as is the
case when /tmp is mounted on tmpfs.

Before running these tests, check if the test file system supports sparse
files by using getconf(1) and skip them if not. Note that the support for
this query was just added to getconf(1) in r304694.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D7609


# 482537c7 28-May-2016 Enji Cooper <ngie@FreeBSD.org>

Use require.progs with bc instead of require.files with /usr/bin/bc

This will make things more flexible if the program path changes in the future,
and the test in and of itself doesn't call /usr/bin/bc -- it just calls bc

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division


# 7b0d44bc 06-Dec-2015 Enji Cooper <ngie@FreeBSD.org>

Enable bin/ls testcases disabled previously because of issues with how
kyua 0.11's version of report-junit was rendering non-printable characters

Upgrade to kyua 0.12 to obtain a fixed version of the command

Output verified with python 2.7.10's xml.dom.minidom module

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division


# 8e5bdf76 30-Oct-2015 Ed Maste <emaste@FreeBSD.org>

Update ls -l tests to use mtime, not birthtime

PR: 204155
Reviewed by: ngie, rodrigc
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D4040


# c62b7463 09-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Remove all of the syncs

They're unnecessary as shown by further testing on my VM

Requested by: jhb


# 20dbf8ef 05-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Call sync consistently using atf_check

Remove superfluous sync's


# 910be139 05-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Explicitly set BLOCKSIZE to 512 in the environment


# f46d1be6 05-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Add some more syncs to quiesce the filesystem after creating the
files to see if this fixes deterministic Jenkin failures


# a0abe9cd 04-Oct-2015 Enji Cooper <ngie@FreeBSD.org>

Merge additional testcases and improvements to bin/ls/ls_tests from
^/user/ngie/more-tests.

- Additional testcases added:
-- ls -D
-- ls -F
-- ls -H
-- ls -L
-- ls -R
-- ls -S
-- ls -T
-- ls -b
-- ls -d
-- ls -f
-- ls -g
-- ls -h
-- ls -i
-- ls -k
-- ls -l
-- ls -m
-- ls -n
-- ls -o
-- ls -p
-- ls -q/ls -w
-- ls -r
-- ls -s
-- ls -t
-- ls -u
-- ls -y
- Socket file creation is limited to the ls -F testcase, greatly speeding up
the test process
- The ls -C testcase was made more robust by limiting the number of columns
via COLUMNS and by dynamically formulating the columns/lines.
- Add `atf_test_case` before all testcase `head` functions.

X-MFC with: r284388, r288330, r288423
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division


# 14044e16 30-Sep-2015 Enji Cooper <ngie@FreeBSD.org>

Skip the B_flag testcase to stop blowing up freebsd-current@ with
"test failure emails" because kyua report-jenkins doesn't properly
escape non-printable chars


# c36a2f46 27-Sep-2015 Enji Cooper <ngie@FreeBSD.org>

Add initial testcases for bin/ls

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division