History log of /freebsd-current/lib/libc/tests/gen/getmntinfo_test.c
Revision Date Author Comments
# 559a218c 01-Nov-2023 Warner Losh <imp@FreeBSD.org>

libc: Purge unneeded cdefs.h

These sys/cdefs.h are not needed. Purge them. They are mostly left-over
from the $FreeBSD$ removal. A few in libc are still required for macros
that cdefs.h defines. Keep those.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D42385


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

Remove $FreeBSD$: one-line .c pattern

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


# 1f4e8790 13-Jul-2020 Li-Wen Hsu <lwhsu@FreeBSD.org>

Revert r351416 to let lib.libc.gen.getmntinfo_test.getmntinfo_test get more test

This is supposed to be fixed by r363068

PR: 240049
Sponsored by: The FreeBSD Foundation


# 877b6cbb 22-Aug-2019 Li-Wen Hsu <lwhsu@FreeBSD.org>

lib.libc.gen.getmntinfo_test.getmntinfo_test is unstable since 8/20, skip it
in CI env temporarily for more offline diagnosis

PR: 240049
Sponsored by: The FreeBSD Foundation


# 5a28df2e 25-Aug-2017 Conrad Meyer <cem@FreeBSD.org>

getmntinfo(3): Scale faster, and return sooner

getmntinfo(3) is designed around a relatively static or slow growing set of
current mounts. It tried to detect a race with somewhat concurrent mount
and re-call getfsstat(2) in that case, looping indefinitely. It also
allocated space for a single extra mount as slop.

In the case where the user has a large number of mounts and is adding them
at a rapid pace, it fell over.

This patch makes two functional changes:

1. Allocate even more slop. Double whatever the last getfsstat(2) returned.

2. Abort and return some known results after looping a few times
(arbitrarily, 3). If the list is constantly changing, we can't guarantee
we return a full result to the user at any point anyways.

While here, add very basic functional tests for getmntinfo(3) to the libc
suite.

PR: 221743
Submitted by: Peter Eriksson <peter AT ifm.liu.se> (earlier version)
Sponsored by: Dell EMC Isilon