[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQ+_X4-eWW_wNDr9G+Ac6LObQeJ5uCxgetGpR2F33BFk5A@mail.gmail.com>
Date: Tue, 25 Aug 2020 16:06:14 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Jiri Olsa <jolsa@...nel.org>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Wenbo Zhang <ethercflow@...il.com>,
Andrii Nakryiko <andriin@...com>,
Network Development <netdev@...r.kernel.org>,
bpf <bpf@...r.kernel.org>, Martin KaFai Lau <kafai@...com>,
Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...omium.org>,
Jesper Dangaard Brouer <brouer@...hat.com>
Subject: Re: [PATCH v12 bpf-next 13/14] selftests/bpf: Add test for d_path helper
On Tue, Aug 25, 2020 at 12:22 PM Jiri Olsa <jolsa@...nel.org> wrote:
> +
> +static int trigger_fstat_events(pid_t pid)
> +{
> + int sockfd = -1, procfd = -1, devfd = -1;
> + int localfd = -1, indicatorfd = -1;
> + int pipefd[2] = { -1, -1 };
> + struct stat fileStat;
> + int ret = -1;
> +
> + /* unmountable pseudo-filesystems */
> + if (CHECK(pipe(pipefd) < 0, "trigger", "pipe failed\n"))
> + return ret;
> + /* unmountable pseudo-filesystems */
> + sockfd = socket(AF_INET, SOCK_STREAM, 0);
> + if (CHECK(sockfd < 0, "trigger", "scoket failed\n"))
> + goto out_close;
> + /* mountable pseudo-filesystems */
> + procfd = open("/proc/self/comm", O_RDONLY);
> + if (CHECK(procfd < 0, "trigger", "open /proc/self/comm failed\n"))
> + goto out_close;
> + devfd = open("/dev/urandom", O_RDONLY);
> + if (CHECK(devfd < 0, "trigger", "open /dev/urandom failed\n"))
> + goto out_close;
> + localfd = open("/tmp/d_path_loadgen.txt", O_CREAT | O_RDONLY);
The work-in-progress CI caught a problem here:
In file included from /usr/include/fcntl.h:290:0,
4814 from ./test_progs.h:29,
4815 from
/home/travis/build/tsipa/bpf-next/tools/testing/selftests/bpf/prog_tests/d_path.c:3:
4816In function ‘open’,
4817 inlined from ‘trigger_fstat_events’ at
/home/travis/build/tsipa/bpf-next/tools/testing/selftests/bpf/prog_tests/d_path.c:50:10,
4818 inlined from ‘test_d_path’ at
/home/travis/build/tsipa/bpf-next/tools/testing/selftests/bpf/prog_tests/d_path.c:119:6:
4819/usr/include/x86_64-linux-gnu/bits/fcntl2.h:50:4: error: call to
‘__open_missing_mode’ declared with attribute error: open with O_CREAT
or O_TMPFILE in second argument needs 3 arguments
4820 __open_missing_mode ();
4821 ^~~~~~~~~~~~~~~~~~~~~~
I don't see this bug in my setup, since I'm using an older glibc that
doesn't have this check,
so I've pushed it anyway since it was taking a bit long to land and folks were
eagerly waiting for the allowlist and d_path features.
But some other folks may complain about build breakage really soon.
So please follow up asap.
Powered by blists - more mailing lists