On 28/07/2023 08:55, Chaitanya S Prakash wrote:
In fact, I wonder if we shouldn't simply use mmap_verified() whenever we expect mmap() to succeed, as that function already takes care of the standard checks (return value, tag, permissions). Maybe we could add another helper (in this file) for the cases where we expect mmap() to fail, adding an argument specifying the expected error. I'm suggesting this as the casts in ASSERT_EQ() in that case are rather cumbersome.
I'm assuming you meant we *should* use mmap_verified() whenever mmap is expected to succeed?
That's an option yes, I don't have a strong opinion on this though.
Kevin