Page MenuHomeFreeBSD

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

Authored by glebius on Thu, May 2, 3:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 10, 8:44 PM
Unknown Object (File)
Mon, May 6, 7:04 PM
Unknown Object (File)
Sun, May 5, 9:48 PM
Unknown Object (File)
Sat, May 4, 11:31 PM
Unknown Object (File)
Thu, May 2, 12:52 PM
Unknown Object (File)
Thu, May 2, 12:52 PM
Unknown Object (File)
Thu, May 2, 9:46 AM
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.Mon, May 6, 12:38 PM