Bug 252096 - fusefs tests depend on maxphys
Summary: fusefs tests depend on maxphys
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Alan Somers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-24 03:18 UTC by Alan Somers
Modified: 2021-06-17 21:17 UTC (History)
2 users (show)

See Also:
asomers: mfc-stable12-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer freebsd_triage 2020-12-24 03:18:02 UTC
Several of the fusefs tests began to fail just after the svn commit that made MAXPHYS a tunable, and raised the default value to 1MB.  This is most likely a bug in the tests, not in the fusefs module itself.

First failing test run: https://ci.freebsd.org/job/FreeBSD-head-amd64-test/17331/testReport/junit/sys.fs.fusefs/write/main/
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-12-28 18:58:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f928dbcb167c7440212e420687de813fc92c06a4

commit f928dbcb167c7440212e420687de813fc92c06a4
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2020-12-24 06:03:06 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2020-12-28 18:56:17 +0000

    fusefs: fix the tests for a wider range of maxphys

    maxphys is now a tunable, ever since r368124.  The default value is also
    larger than it used to be.  That broke several fusefs tests that made
    assumptions about maxphys.

    * WriteCluster.clustering used the MAXPHYS compile-time constant.

    * WriteBackAsync.direct_io_partially_overlaps_cached_block implicitly
      depended on the default value of maxphys.  Fix it by making the
      dependency explicit.

    * Write.write_large implicitly assumed that maxphys would be no more
      than twice maxbcachebuf.  Fix it by explicitly setting m_max_write.

    * WriteCluster.clustering and several others failed because the MockFS
      module did not work for max_write > 128KB (which most tests would set
      when maxphys > 256KB).  Limit max_write accordingly.  This is the same
      as fusefs-libs's behavior.

    * Bmap's tests were originally written for MAXPHYS=128KB.  With larger
      values, the simulated file size was too small.

    PR:             252096
    Reviewed by:    emaste
    Differential Revision:  https://reviews.freebsd.org/D27769

 tests/sys/fs/fusefs/bmap.cc   | 12 ++++++++----
 tests/sys/fs/fusefs/mockfs.cc |  2 +-
 tests/sys/fs/fusefs/mockfs.hh | 21 +++++++++++++++++++--
 tests/sys/fs/fusefs/utils.cc  | 13 ++++++-------
 tests/sys/fs/fusefs/utils.hh  |  3 +--
 tests/sys/fs/fusefs/write.cc  | 18 +++++++++++++++++-
 6 files changed, 52 insertions(+), 17 deletions(-)
Comment 2 Alan Somers freebsd_committer freebsd_triage 2020-12-28 19:07:10 UTC
Fixed in head. Needs MFC.
Comment 3 Alan Somers freebsd_committer freebsd_triage 2021-06-17 21:17:03 UTC
Not worthwhile to MFC this one to stable/12, since it's only tests, no FUSE development is happening on stable/12, and MAXPHYS is rarely changed on that branch.