Page MenuHomeFreeBSD

tests/fusefs: fix all tests that depend on kern.maxphys
ClosedPublic

Authored by glebius on May 2 2024, 3:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 15 2024, 4:28 AM
Unknown Object (File)
Nov 15 2024, 3:43 AM
Unknown Object (File)
Nov 1 2024, 3:52 PM
Unknown Object (File)
Sep 23 2024, 6:13 AM
Unknown Object (File)
Sep 9 2024, 3:46 AM
Unknown Object (File)
Sep 7 2024, 11:59 PM
Unknown Object (File)
Sep 7 2024, 3:11 PM
Unknown Object (File)
Sep 4 2024, 1:36 PM
Subscribers

Details

Summary

The tests try to read kern.maxphys sysctl into int value, while
unsigned long is required. Not sure when this was broken, seems like
since cd8537910406e.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

u_long

tests/sys/fs/fusefs/write.cc
182

This is getting close to a fence, and probably over it with custom maxphys setting.

In D45053#1027303, @kib wrote:

u_long

The whole test set doesn't use this style, that's why I used unsigned long. I'd leave this decision to Alan.

tests/sys/fs/fusefs/write.cc
182

What do you mean by "fence"?

tests/sys/fs/fusefs/write.cc
182

I mean that it is not too far from the default MAXPHYS value, and since maxphys is the dynamic boot parameter, user might cause the maxhphys to exceed m_maxwrite unknowingly.

asomers added inline comments.
tests/sys/fs/fusefs/write.cc
182

Ok, fair point. We can change the expression to "2 * m_maxphys". I can do that in a follow up if @glebius doesn't.

This revision is now accepted and ready to land.May 6 2024, 12:38 PM