Re: [LTP] [PATCH 2/2] Add test for ASLRn't bug

Petr Vorel
2024-01-30T16:31:04Z

Hi Martin,

> + if (!hpsize) {
> + tst_res(TCONF, "Hugepage support appears to be missing");
> + } else if (libsize < hpsize) {
> + tst_res(TCONF, "The largest dynamic library is smaller than "
> + "hugepage size");
> + tst_res(TCONF, "Please use LD_PRELOAD to add larger library");
very tiny detail: I overlook these 2 TCONF. I understand that your original
version is readable, but I found little confusing:

aslr01.c:161: TCONF: The largest dynamic library is smaller than hugepage size
aslr01.c:162: TCONF: Please use LD_PRELOAD to add larger library
...
Summary:
passed 1
failed 0
broken 0
skipped 2

If you don't mind, I'll join it before merge to a single line:

if (!hpsize) {
tst_res(TCONF, "Hugepage support appears to be missing");
} else if (libsize < hpsize) {
tst_res(TCONF, "The largest dynamic library is smaller than hugepage size, "
"please use LD_PRELOAD to add larger library");
}

aslr01.c:161: TCONF: The largest dynamic library is smaller than hugepage size, please use LD_PRELOAD to add larger library