Migrating the libhugetlbfs/testcases/truncate_above_4GB.c test
PATCH v4 1/1 Migrating the libhugetlbfs/testcases/truncate_above_4GB.c test
Changes in v4:
- Fixed make check errors
- Used SAFE_MMAP instead on mmap64
- Used SAFE_FTRUNCATE instaed of ftruncate64
- Used only test_pass flag
- Removed check "truncate_point % hpage_size > 0"
Signed-off-by Pavithra <[email protected]>
--- runtest/hugetlb | 1 + testcases/kernel/mem/.gitignore | 1 + .../kernel/mem/hugetlb/hugemmap/hugemmap36.c | 153 ++++++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 testcases/kernel/mem/hugetlb/hugemmap/hugemmap36.c
runtest/hugetlb +1 -0
@@ -36,6 +36,7 @@ hugemmap30 hugemmap30 hugemmap31 hugemmap31 hugemmap32 hugemmap32 hugemmap34 hugemmap34 +hugemmap36 hugemmap36 hugemmap05_1 hugemmap05 -m hugemmap05_2 hugemmap05 -s hugemmap05_3 hugemmap05 -s -m
testcases/kernel/mem/.gitignore +1 -0
@@ -36,6 +36,7 @@ /hugetlb/hugemmap/hugemmap31 /hugetlb/hugemmap/hugemmap32 /hugetlb/hugemmap/hugemmap34 +/hugetlb/hugemmap/hugemmap36 /hugetlb/hugeshmat/hugeshmat01 /hugetlb/hugeshmat/hugeshmat02 /hugetlb/hugeshmat/hugeshmat03
testcases/kernel/mem/hugetlb/hugemmap/hugemmap36.c new file +153 -0
153 lines not on this page · raw message
Signature · 5 lines
2.53.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi!
testcases/kernel/mem/hugetlb/hugemmap/hugemmap36.c line 48
Quoted 3 lines
testcases/kernel/mem/hugetlb/hugemmap/hugemmap36.c new file +3
-0+static void run_test (void ) +{ +static long long buggy_offset, truncate_point;
^
Looking closer at the code this variable is used uninitialized.
But there is a variable with the same name in the test setup. Wasn't this supposed to be a global variable set in the test setup()?
Or we can get rid of the variable completely and use the FOURGIG instead both in the setup and here.
Signature · 5 lines
Cyril Hrubis [email protected] -- Mailing list info: https://lists.linux.it/listinfo/ltp