From 970259d1623fad451c0cadd6d18c9beb1e7ed48f Mon Sep 17 00:00:00 2001 From: Tianyu Zhou Date: Fri, 7 Mar 2025 17:43:07 +0800 Subject: [PATCH] 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 --- test/syscalls/linux/mmap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/syscalls/linux/mmap.cc b/test/syscalls/linux/mmap.cc index b07c3e4a3..020d7020d 100644 --- a/test/syscalls/linux/mmap.cc +++ b/test/syscalls/linux/mmap.cc @@ -1481,7 +1481,7 @@ TEST_P(MMapFileParamTest, NoSigBusOnPagesBeforeEOF) { SyscallSucceeds()); // The test passes if this survives. - auto* start = reinterpret_cast(addr + (kPageSize / 2) + 1); + auto* start = reinterpret_cast(addr); size_t len = strlen(kFileContents); if (prot() & PROT_WRITE) { std::copy(kFileContents, kFileContents + len, start);