Page MenuHomeFreeBSD

stress2: Use the proper type for the getopt(3) return value
ClosedPublic

Authored by markj on May 25 2024, 5:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 3, 11:59 AM
Unknown Object (File)
May 27 2024, 4:48 PM
Subscribers

Details

Summary

On arm platforms "char" is typically unsigned, in which case the test
"(c = getopt(...)) != -1" does not behave as desired.

Diff Detail

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

Event Timeline

markj requested review of this revision.May 25 2024, 5:29 PM

Nice catch. LGTM.
I have obviously never run tests on arm. Would it be useful if I looked into doing that?

This revision is now accepted and ready to land.May 26 2024, 7:50 AM
In D45365#1034916, @pho wrote:

Nice catch. LGTM.
I have obviously never run tests on arm. Would it be useful if I looked into doing that?

Do you have a suitable hardware platform available? I've been running it in an arm64 QEMU VM just to see how far it gets. After a day and a half I got to 20240526 04:23:50 all (230/908): killpg4.sh before it got stuck. The scripts I'm using to build and run the VM image didn't enable the QEMU gdb stub so I couldn't really debug.

QEMU isn't an ideal platform for running stress2: it's very slow. I will try bhyve soon now that it supports arm64 and I have a large test system. How long does stress2 typically take on hardware in your experience?

Last time I ran stress2 on arm64 it ran for days before i got tired of the server noise... maybe 18 months ago.

I do not have any arm hardware, but will take a look at bhyve. I already have a setup for building amd64/i386 images for bhyve.
stress2 runs for two days and some hours on mercat1 (Intel(R) Xeon(R) CPU E5-1650, 6 cores and 32GB of ram).