lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP01T75UgmzoB=AiOzFz0jyrTAQ6F=r6rVPjjjhfX=Be9nc1uQ@mail.gmail.com>
Date: Thu, 13 Feb 2025 07:25:40 +0100
From: Kumar Kartikeya Dwivedi <memxor@...il.com>
To: Eduard Zingerman <eddyz87@...il.com>
Cc: bpf@...r.kernel.org, linux-kernel@...r.kernel.org, 
	Linus Torvalds <torvalds@...ux-foundation.org>, Peter Zijlstra <peterz@...radead.org>, 
	Will Deacon <will@...nel.org>, Waiman Long <llong@...hat.com>, Alexei Starovoitov <ast@...nel.org>, 
	Andrii Nakryiko <andrii@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Martin KaFai Lau <martin.lau@...nel.org>, "Paul E. McKenney" <paulmck@...nel.org>, Tejun Heo <tj@...nel.org>, 
	Barret Rhoden <brho@...gle.com>, Josh Don <joshdon@...gle.com>, Dohyun Kim <dohyunkim@...gle.com>, 
	linux-arm-kernel@...ts.infradead.org, kernel-team@...a.com
Subject: Re: [PATCH bpf-next v2 26/26] selftests/bpf: Add tests for rqspinlock

On Wed, 12 Feb 2025 at 01:14, Eduard Zingerman <eddyz87@...il.com> wrote:
>
> On Thu, 2025-02-06 at 02:54 -0800, Kumar Kartikeya Dwivedi wrote:
>
> [...]
>
> > +void test_res_spin_lock(void)
> > +{
> > +     if (test__start_subtest("res_spin_lock_success"))
> > +             test_res_spin_lock_success();
> > +     if (test__start_subtest("res_spin_lock_failure"))
> > +             test_res_spin_lock_failure();
> > +}
>
> Such organization makes it impossible to select sub-tests from
> res_spin_lock_failure using ./test_progs -t.
> I suggest doing something like below:
>
>         @@ -6,7 +6,7 @@
>          #include "res_spin_lock.skel.h"
>          #include "res_spin_lock_fail.skel.h"
>
>         -static void test_res_spin_lock_failure(void)
>         +void test_res_spin_lock_failure(void)
>          {
>                 RUN_TESTS(res_spin_lock_fail);
>          }
>         @@ -30,7 +30,7 @@ static void *spin_lock_thread(void *arg)
>                 pthread_exit(arg);
>          }
>
>         -static void test_res_spin_lock_success(void)
>         +void test_res_spin_lock_success(void)
>          {
>                 LIBBPF_OPTS(bpf_test_run_opts, topts,
>                         .data_in = &pkt_v4,
>         @@ -89,11 +89,3 @@ static void test_res_spin_lock_success(void)
>                 res_spin_lock__destroy(skel);
>                 return;
>          }
>         -
>         -void test_res_spin_lock(void)
>         -{
>         -       if (test__start_subtest("res_spin_lock_success"))
>         -               test_res_spin_lock_success();
>         -       if (test__start_subtest("res_spin_lock_failure"))
>         -               test_res_spin_lock_failure();
>         -}
>

Ack, will fix.

> [...]
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ