[LTP] [PATCH v3] Hugetlb: Migrating libhugetlbfs shm-perms
Cyril Hrubis
chrubis@suse.cz
Wed Nov 6 10:44:01 CET 2024
Hi!
> > +static void compare_free_hugepage_memory(long free_end, long free_start)
> > +{
> > + if (free_end != free_start)
> > + tst_res(TFAIL, "Free hugepages after attaching multiple
> > threads differ from initial allocation");
> >
>
> We cannot make such an assumption for TFAIL because the system
> may be using hugepages in the background by other processes, and
> this test is not alone in occupying huge page so that would be possible
> get false positive in the real testing.
We already have similar assumptions in the rest of the hugepage tests,
however at least it's clear from the message that is being printed that
it may fail if we run more than one test in parallel or if system
allocates hugepages for something.
But I guess that we can do better, we can look at the HugetlbPages:
field in the "/proc/self/status" instead and check that it's incremented
and decremented properly as the test runs.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list