[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5eb44f11d1697_22a22b23544285b843@john-XPS-13-9370.notmuch>
Date: Thu, 07 May 2020 11:10:25 -0700
From: John Fastabend <john.fastabend@...il.com>
To: Jakub Sitnicki <jakub@...udflare.com>,
John Fastabend <john.fastabend@...il.com>
Cc: lmb@...udflare.com, daniel@...earbox.net, netdev@...r.kernel.org,
bpf@...r.kernel.org, ast@...nel.org
Subject: Re: [bpf-next PATCH 03/10] bpf: selftests, sockmap test prog run
without setting cgroup
Jakub Sitnicki wrote:
> On Tue, 05 May 2020 13:50:35 -0700
> John Fastabend <john.fastabend@...il.com> wrote:
>
> > Running test_sockmap with arguments to specify a test pattern requires
> > including a cgroup argument. Instead of requiring this if the option is
> > not provided create one
> >
> > This is not used by selftest runs but I use it when I want to test a
> > specific test. Most useful when developing new code and/or tests.
> >
> > Signed-off-by: John Fastabend <john.fastabend@...il.com>
> > ---
[...]
> > if (!cg_fd) {
> > - fprintf(stderr, "%s requires cgroup option: --cgroup <path>\n",
> > - argv[0]);
> > - return -1;
> > + if (setup_cgroup_environment()) {
> > + fprintf(stderr, "ERROR: cgroup env failed\n");
> > + return -EINVAL;
> > + }
> > +
> > + cg_fd = create_and_get_cgroup(CG_PATH);
> > + if (cg_fd < 0) {
> > + fprintf(stderr,
> > + "ERROR: (%i) open cg path failed: %s\n",
> > + cg_fd, optarg);
>
> Looks like you wanted to log strerror(errno) instead of optarg here.
>
> > + return cg_fd;
> > + }
cut'n'paste error thanks.
Powered by blists - more mailing lists