[LTP] [PATCH 1/1] test_zero_hugepage.sh: Detect errors write to /proc/sys/vm/nr_hugepages
Petr Vorel
pvorel@suse.cz
Mon Nov 8 11:17:37 CET 2021
Hi Li,
> On Fri, Nov 5, 2021 at 12:45 AM Petr Vorel <pvorel@suse.cz> wrote:
> > Fix running make test-c as non-root.
> > Fixes: 057d6b046 ("lib/tst_hugepage: Fix .request_hugepages = 0 bug")
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Hi,
> > maybe echo "128" would not have to be checked.
> Agreed, If the system memory is too fragmental to keep
> enough hpages, there won't be an error returned.
OK, wait little longer and then merge with keeping
echo "128" > /proc/sys/vm/nr_hugepages
...
> > -echo "128" > /proc/sys/vm/nr_hugepages
> > +if ! echo "128" > /proc/sys/vm/nr_hugepages; then
> > + tconf "Failed to write /proc/sys/vm/nr_hugepages"
> > +fi
Thanks for your review!
Kind regards,
Petr
More information about the ltp
mailing list