Re: [PATCHv6 bpf-next 14/16] selftests/bpf: Scale down uprobe multi consumer test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 10, 2024 at 1:12 PM Jiri Olsa <jolsa@xxxxxxxxxx> wrote:
>
> We have currently 2 uprobes and 2 uretprobes and we are about
> to add sessions uprobes in following change, which makes the
> test time unsuitable for CI even with threads.
>
> It's enough for the test to have just 1 uprobe and 1 uretprobe.
>
> Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
> ---
>  .../bpf/prog_tests/uprobe_multi_test.c        | 57 ++++++++-----------
>  .../bpf/progs/uprobe_multi_consumers.c        | 16 +-----
>  2 files changed, 25 insertions(+), 48 deletions(-)
>

[...]

>         /* 'before' is each, we attach uprobe for every set idx */
> -       for (idx = 0; idx < 4; idx++) {
> +       for (idx = 0; idx < 1; idx++) {
>                 if (test_bit(idx, before)) {
>                         if (!ASSERT_OK(uprobe_attach(skel, idx), "uprobe_attach_before"))
>                                 goto cleanup;
> @@ -866,18 +858,18 @@ static int consumer_test(struct uprobe_multi_consumers *skel,
>         if (!ASSERT_EQ(err, 0, "uprobe_consumer_test"))
>                 goto cleanup;
>
> -       for (idx = 0; idx < 4; idx++) {
> +       for (idx = 0; idx < 1; idx++) {

here and everywhere else, either idx <= 1 or idx < 2, no?

>                 const char *fmt = "BUG";
>                 __u64 val = 0;
>
> -               if (idx < 2) {
> +               if (idx == 0) {
>                         /*
>                          * uprobe entry
>                          *   +1 if define in 'before'
>                          */
>                         if (test_bit(idx, before))
>                                 val++;
> -                       fmt = "prog 0/1: uprobe";
> +                       fmt = "prog 0: uprobe";
>                 } else {
>                         /*
>                          * to trigger uretprobe consumer, the uretprobe needs to be installed,

[...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux