Skip to contentSkip to conversation

Migrating the libhugetlbfs/testcases/truncate_above_4GB.c test

PATCH Superseded Geetika 1 participant 1 message Sep 29, 2023

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Geetika

author
#0 lore raw

PATCH 1/1 Migrating the libhugetlbfs/testcases/truncate_above_4GB.c test

Test Description:

A misconversion of hugetlb_vmtruncate_list to a prio_tree meant that on 32-bit machines, truncates at or above 4GB could truncate lower pages, resulting in BUG_ON()s. This kernel bug was fixed with 'commit 856fc2950555'.

The purpose of this test is to check whether huge pages are handled correctly when a file is truncated above the 4GB boundary. It ensures that the memory is not corrupted or lost during the truncation process, and that the expected data is still present in the memory after truncation.

---
 runtest/hugetlb                               |   1 +
 testcases/kernel/mem/.gitignore               |   1 +
 .../kernel/mem/hugetlb/hugemmap/hugemmap39.c  | 171 ++++++++++++++++++
 3 files changed, 173 insertions(+)
 create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap39.c
runtest/hugetlb +1 -0
index 299c07ac9..7b7c44b77 100644
@@ -35,6 +35,7 @@ hugemmap29 hugemmap29
 hugemmap30 hugemmap30
 hugemmap31 hugemmap31
 hugemmap32 hugemmap32
+hugemmap37 hugemmap37
 hugemmap05_1 hugemmap05 -m
 hugemmap05_2 hugemmap05 -s
 hugemmap05_3 hugemmap05 -s -m
testcases/kernel/mem/.gitignore +1 -0
index 7258489ed..7b923c8fd 100644
@@ -34,6 +34,7 @@
 /hugetlb/hugemmap/hugemmap30
 /hugetlb/hugemmap/hugemmap31
 /hugetlb/hugemmap/hugemmap32
+/hugetlb/hugemmap/hugemmap37
 /hugetlb/hugeshmat/hugeshmat01
 /hugetlb/hugeshmat/hugeshmat02
 /hugetlb/hugeshmat/hugeshmat03
testcases/kernel/mem/hugetlb/hugemmap/hugemmap39.c new file +171 -0

171 lines not on this page · raw message

Signature · 5 lines
2.39.2 (Apple Git-143)


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp