test/syscalls: fix the duplicate test case

Currently, the NoSigBusOnPagesBeforeEOF and NoSigBusOnPageContainingEOF
test cases are identical. This patch corrects the addr accessed in the
former test to match the corresponding comment.

Signed-off-by: Tianyu Zhou <albert.zty@antgroup.com>
This commit is contained in:
Tianyu Zhou
2025-03-07 17:43:07 +08:00
parent 9581066c30
commit 970259d162
+1 -1
View File
@@ -1481,7 +1481,7 @@ TEST_P(MMapFileParamTest, NoSigBusOnPagesBeforeEOF) {
SyscallSucceeds());
// The test passes if this survives.
auto* start = reinterpret_cast<volatile char*>(addr + (kPageSize / 2) + 1);
auto* start = reinterpret_cast<volatile char*>(addr);
size_t len = strlen(kFileContents);
if (prot() & PROT_WRITE) {
std::copy(kFileContents, kFileContents + len, start);