History log of /freebsd-current/tests/sys/kern/kern_descrip_test.c
Revision Date Author Comments
# 6dced2c6 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

tests: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4661f8af 08-Oct-2019 Eric van Gyzen <vangyzen@FreeBSD.org>

Fix problems in the kern_maxfiles__increase test

ATF functions such as ATF_REQUIRE do not work correctly in child processes.
Use plain C functions to report errors instead.

In the parent, check for the untimely demise of children. Without this,
the test hung until the framework's timeout.

Raise the resource limit on the number of open files. If this was too low,
the test hit the two problems above.

Restore the kern.maxfiles sysctl OID in the cleanup function.
The body prematurely removed the symlink in which the old value was saved.

Make the test more robust by opening more files. In fact, due to the
integer division by 4, this was necessary to make the test valid with
some initial values of maxfiles. Thanks, asomers@.

wait() for children instead of sleeping.

Clean up a temporary file created by the test ("afile").

Reviewed by: asomers
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D21900


# 079375d1 11-May-2016 Conrad Meyer <cem@FreeBSD.org>

kern_descrip_test: Fix trivial buffer overrun with readlink(2)

Reported by: Coverity
CID: 1229965, 1229972
Sponsored by: EMC / Isilon Storage Division


# a31faec3 19-Mar-2014 Peter Holm <pho@FreeBSD.org>

Added sysctl kern.maxfiles increase test, do not use /etc/passwd for tests
and use volatile sig_atomic_t for signal handler variable.

Reviewed by: asomers (previous version)
Sponsored by: EMC / Isilon storage division


# f8eccd0a 05-Mar-2014 Peter Holm <pho@FreeBSD.org>

Preserve naming consistency for test cases.

Pointed out by: jmmv
Sponsored by: EMC / Isilon storage division


# af7b51e6 04-Mar-2014 Peter Holm <pho@FreeBSD.org>

Changed name of test case to a more descriptive one and moved
comment to the "descr" property.

Suggested by: jmmv
Sponsored by: EMC / Isilon storage division


# 276ffe2d 26-Feb-2014 Peter Holm <pho@FreeBSD.org>

Added a regression test for r234131.

Discussed with: asomers
Sponsored by: EMC / Isilon storage division