The preferred style convention here is two-space indent. Tabs are
generally allowed in two cases:
1) For Makefiles, where they're required.
2) In code imported from Apple or other external sources.
In general, preexisting code has not been detabbed, but tabs had
inappropriately leaked into some recently added or modified code.
This change removes them.
TESTED:
No changes reported by "diff -b".
This permits optionally running the thread-time test long enough to
observe 31-bit (32-bit signed) overflow in the syscall value (prior to
fixing the bug).
Thanks to Un1q32@github for the bug report.
TESTED:
Passes on all platforms.
With -SSSSS, fails without the fix, and passes with it.
In addition to the known complete brokenness of this version of
realpath() on 10.15, it's also a bit flaky on 11.x. So we expand the
exemption to include that.
TESTED:
Passes on all platforms.
Link counts for directories aren't safe to compare, since they're
actually entry counts. This easily matters when tests are being run
in parallel, so we suppress comparing it for directories.
Also adds additional output - names of initial [f]stat() targets
(verbose only), and details of stat miscompares.
TESTED:
Now reliably passes on all platforms.
Moving this test to the automatic category was premature. Although it
now works fine with all the compilers normally used, it fails with GCC
10+, for as-yet-undetermined reasons. This doesn't affect normal
usage, but it does interfere with broad-spectrum compiler testing, so
we move it back to manual, until such time as the GCC issue is sorted
out.
TESTED:
Tests pass on all platforms, including stpncpy_chk when run as a
manual test.
Previously, there were no tests for the "at" versions of the
[gs]etattrlist() functions. This implements those as a third mode in
the attrlist tests.
TESTED:
Passes on all platforms, including new tests.
This optionally tests various combinations of timestamp setting, and
illustrates the known OS bug related to setting atime alone on
non-APFS filesystems.
TESTED:
Passes on all platforms by default.
Optionally illustrates timestamp bugs.
This creates a single test function for the "f" and "non-f" flavors,
reducing code duplication. To assist with this, it also creates
"switched" wrappers for the OS functions.
It also adjusts the indentations of the messages, and adds deletion
messages.
TESTED:
Passes on all platforms.
This adjusts the condition for allowing the Apple setattrlist() bug
that doesn't correctly set atime without mtime, accepting either an
unchanged atime, or a "now" atime. Previously, sporadic failures were
observed.
TESTED:
Passes on all platforms.
This test had inherited multiple misconceptions about the correct
attribute buffer format from the old test. That didn't cause
failures, though it would have if the test had checked that the
attributes were set as intended. The format is now correct.
TESTED:
Passes on all platforms.
This now does a proper range check on the resulting timestamp. In the
non-APFS case, the "before" timestamp is rounded down to a one-second
boundary, to accomodate the one-second timestamp resolution.
TESTED:
Passes on all platforms.
This has been replaced by the new test_utimens. The old version has
been retained as a manual test in case anyone wants to run it.
TESTED:
Works as manual test.
This is a completely rewritten test, not relying on an Apple test
written for an unpublished test framework and then kludged.
It also accommodates the correct reason for the nanoseconds mismatch
on non-APFS filesystems.
It also adds formerly missing tests for futimens().
TESTED:
Passes on all platforms.
This adds additional test cases where the length of the attribute
buffer is zero, with and without requested attributes. This illustrated
a bug in [f]setattrlist() in 10.5-10.7 (prior to its fix).
Also adds a nonposix variant.
TESTED:
Passes on all platforms, with fix present.
When the option to suppress the packet timestamp fixes is used, don't
treat the expected failures as errors. This allows the 'nofix' tests
to be included in the automatic tests.
TESTED:
Tests pass on all platforms.
Due to some other changes, these tests are no longer problematic, and
no longer need to be relegated to the manual category.
The similar strncpy_chk tests are still excessively warning-prone, but
the feature they test has never been provided by legacy-support, and
they were only added to provide a basis for comparison for the
stpncpy_chk tests. Hence, they remain manual.
TESTED:
Passes on all platforms, with all compatible SDKs.
Makes created directory name unique.
Also make verbosity optional.
Also adds success/failure message.
TESTED:
Passes on all platforms, including running in parallel.
Makes created directory name unique.
Also makes verbosity optional.
Also adds success/failure message.
TESTED:
Passes on all platforms, including running in parallel.
Since this is a manual test, it belongs in the manual_tests directory.
Also removes the Makefile message suggesting it, since this is only
one of many manual-only tests that may sometimes be appropriate.
Also moves the TMP dir to be under tst_data.
NOTE: Aside from the well-known issue where this test doesn't work on
10.4, it also doesn't work under Rosetta. It's not yet known whether
this is a library issue or a test issue.
TESTED:
Works as expected on all platforms, except as noted above.
As with the library builds, putting build targets in a separate
directory simplifies clean, simplifies .gitignore, and is more
completion-friendly.
Also renames some manual C++ tests to make the C++ more obvious (and
avoid collisions in the new tbin directory).
Also adds an "all" target for the manual packet tests.
Also fixes a bug in the st?ncpy_chk sources.
TESTED:
Works as intended on all platforms.