[LTP] [PATCH v9 1/2] cpuset02: Convert the test6 from cpuset_memory_testset.sh to C code

Petr Vorel pvorel@suse.cz
Mon Mar 31 12:25:40 CEST 2025


> On Mon, Mar 31, 2025 at 11:20 AM Wei Gao <wegao@suse.com> wrote:

> > Improvements compare with test6 shell test:
> > * Remove /bin/echo $load_balance > $path/cpuset.sched_load_balance
> > since test focus on verify huge page is really allocated in the correct
> > node, task no need bind to specific cpuset.
> > * Directly keep 1 hpage reserved in each node otherwise test case has
> > chance to fail, since `echo 1 > /proc/sys/vm/nr_hugepages` will try to
> > reserve 1 pages from a NUMA node randomly.

> > Signed-off-by: Wei Gao <wegao@suse.com>
> > Reviewed-by: Petr Vorel <pvorel@suse.cz>
> > Suggested-by: Li Wang <liwang@redhat.com>


> Reviewed-by: Li Wang <liwang@redhat.com>


> > +static void child(void)
> > +{
> > +       char *p;
> > +       int fd_hugepage;
> > +
> > +       fd_hugepage = SAFE_OPEN(HUGE_PAGE_FILE, O_CREAT | O_RDWR, 0755);



> > +TST_EXP_PASS_SILENT(system("cat /proc/meminfo"));


> This line is for debugging purposes, I guess, and it should be removed in
> the formal patch.

+1

With that changed you can keep my RBT. I hope v10 could be final.

Kind regards,
Petr


More information about the ltp mailing list