HomeFreeBSD

pjdfstest: Fix link count test

Description

pjdfstest: Fix link count test

This UFS-only test verifies that attempting to create more links than
permitted by the file system returns EMLINK, but has been broken ever
since UFS_LINK_MAX was increased because a) it hardcodes the previous
value of UFS_LINK_MAX, and b) the new value requires more space than
the test allocates, so it ends up getting ENOSPC instead of EMLINK.

  • Switch to retrieving {PC_LINK_MAX} at runtime.
  • Stop the test when we reach {PC_LINK_MAX} links. This ensures that we don't go on for hours if the actual limit turns out to be much higher than we anticipated (e.g. INT64_MAX on ZFS).
  • Double the size of the test filesystem.

MFC after: 3 days
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Fixes: 35a301555bff ("Increase UFS/FFS maximum link count from 32767 to 65530.")
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D53442

(cherry picked from commit 6c86379b0d0deb2750a662579f63d71ffa519e81)

Details

Provenance
desAuthored on Thu, Oct 30, 8:18 PM
Reviewer
markj
Differential Revision
D53442: pjdfstest: Fix link count test
Parents
rG05a3f80efe91: id: Fix WITHOUT_AUDIT build
Branches
Unknown
Tags
Unknown