From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30736C433B4 for ; Wed, 14 Apr 2021 10:54:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10BDE61242 for ; Wed, 14 Apr 2021 10:54:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234300AbhDNKzJ (ORCPT ); Wed, 14 Apr 2021 06:55:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54609 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232910AbhDNKzG (ORCPT ); Wed, 14 Apr 2021 06:55:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618397684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ieI7qTBn6GqAPqvEII3jgRrqEuYuZz29QYT+fhzGUmI=; b=ODu7kBLrdEOjNZsM77WAZ9mim9aHs3vbR776D51/br0RG6fqrfZpLr9TRoMZKtVNYnhFre 9hEg4hFZdRllJaYsKcvRt7NI1M3l+KY+YpS/t7mrHgXNVmPmVbS9xuFJCuGilKIkwSs1QQ HTI8s0ktq5gSn3b3JdMddcz3wovIzCo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-152-h9uyCyV8Ps2beIGSHaIdWg-1; Wed, 14 Apr 2021 06:54:41 -0400 X-MC-Unique: h9uyCyV8Ps2beIGSHaIdWg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 931138030BB; Wed, 14 Apr 2021 10:54:39 +0000 (UTC) Received: from krava (unknown [10.40.196.56]) by smtp.corp.redhat.com (Postfix) with SMTP id 3F90551DCB; Wed, 14 Apr 2021 10:54:32 +0000 (UTC) Date: Wed, 14 Apr 2021 12:54:31 +0200 From: Jiri Olsa To: Andrii Nakryiko Cc: Jiri Olsa , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Networking , bpf , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Toke =?iso-8859-1?Q?H=F8iland-J=F8rgensen?= , Julia Lawall Subject: Re: [PATCHv4 bpf-next 4/5] selftests/bpf: Add re-attach test to lsm test Message-ID: References: <20210412162502.1417018-1-jolsa@kernel.org> <20210412162502.1417018-5-jolsa@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Apr 13, 2021 at 02:57:26PM -0700, Andrii Nakryiko wrote: > On Mon, Apr 12, 2021 at 9:31 AM Jiri Olsa wrote: > > > > Adding the test to re-attach (detach/attach again) lsm programs, > > plus check that already linked program can't be attached again. > > > > Signed-off-by: Jiri Olsa > > --- > > .../selftests/bpf/prog_tests/test_lsm.c | 48 +++++++++++++++---- > > 1 file changed, 38 insertions(+), 10 deletions(-) > > > > Surprised you didn't switch this one to ASSERT, but ok, we can do it > some other time ;) yep, I commented on that in the previous version ;-) - used ASSERT* macros apart from lsm test, which is using CHECKs all over the place [Andrii] I think it should go to separate patch, so it won't shade the actual change jirka > > Acked-by: Andrii Nakryiko > > > > diff --git a/tools/testing/selftests/bpf/prog_tests/test_lsm.c b/tools/testing/selftests/bpf/prog_tests/test_lsm.c > > index 2755e4f81499..d492e76e01cf 100644 > > --- a/tools/testing/selftests/bpf/prog_tests/test_lsm.c > > +++ b/tools/testing/selftests/bpf/prog_tests/test_lsm.c > > @@ -18,6 +18,8 @@ char *CMD_ARGS[] = {"true", NULL}; > > #define GET_PAGE_ADDR(ADDR, PAGE_SIZE) \ > > (char *)(((unsigned long) (ADDR + PAGE_SIZE)) & ~(PAGE_SIZE-1)) > > > > [...] >