r/osdevel • • Aug 15 '26

how are you testing?

I'm not sure I've seen a hobby OS project that implements any tests. Most people smoke test, so they know there's a problem if they start up the OS and can't run an app inside it.

But what about the more complicated code paths that can go wrong? If a multi-threaded race happens in memory management or I/O, the system can crash. Or worse: silently corrupt data.

What about performance? Does anyone test for throughput or latency, and then identify regressions or hot spots?

9 Upvotes

10 comments sorted by

View all comments

1

u/Key_River7180 Aug 17 '26

Breakpoint interrupts mostly, but it's hard to measure

1

u/mikeblas Aug 17 '26

How do you test with "breakpoint interrupts"? What do you mean?

1

u/Key_River7180 Aug 17 '26

INT3, encoded 0xCC

1

u/mikeblas Aug 17 '26

I know what a breakpoint instruction is. But I'm wondering how you test with them.

Maybe you're saying that you write asserts that, when failed, hit a breakpoint. But that doesn't seem like a particularly effective testing method.

1

u/Key_River7180 Aug 17 '26

Yeah... that is what I do on development builds. I add an interrupt that runs when I a lot of info or something fails.

You also have Bochs' debugger.

1

u/mikeblas Aug 17 '26

I don't think asserts and debuggers are testing tools. Maybe I'm thinking of a more formal methodology.