Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp694542lqd; Wed, 24 Apr 2024 14:07:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVAJduYjxyFyt4lzxTXP8oRyDTNnOiRn4BOarMxVCu9MdbZUBsT9g6ims6+e3P9Ivj5Mks9UPDdqRMDsLJkffKkYUYrWn0aFfwyFAu5hQ== X-Google-Smtp-Source: AGHT+IEXUv//mo1zZD5zDc2ZPivpTN3leTe+WxOrsMOH5JELNIlE9WldeG1m8Jc7BprTuBvl87s5 X-Received: by 2002:a05:6870:40cf:b0:233:a2c:470e with SMTP id l15-20020a05687040cf00b002330a2c470emr3600135oal.57.1713992863000; Wed, 24 Apr 2024 14:07:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713992862; cv=pass; d=google.com; s=arc-20160816; b=evy9rSYFidn+F8nOGy2DktfBvOnHHWAHj1Yij8PpbRMKzBXNuX8m3qEGHFTC7IZTvx GnyWGWL2Q1tFqehDTefLjYBiO9ixznFja0JFs8Ei6j2bIGAVG7y7/KHsMAZss8AiSbck HbpelHJSssRjkMXRolRNt+iygA2JlQ+55LLNT+QxfRXnMo21hZSo2XU0mv3BMkv5y34q vHr+/4em5DTvYoJoerQ1LtJETyr9Prsz+1g4EOSS7fa3yr6Ato2qKpdCkKs60+yAqnK8 LBy7FfYjHppQlQyG3UPpv1qF65rVHI3o5r9QImDfVPDCfF9KJ3BO4pWQeucmhz9kDUzw wxBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=jE2wbyIVjss7r3Zca672+NKJfYO0FEw/nMOpHNeK+9Q=; fh=3XYlsxaB1rAm7yd5JaOd0TyIPdzMxCAPv+JbYs5yo9E=; b=IUyzm1Twmi6a2MXzOEATbrrrxcBeP0QGfnirEvHFlmf5d1swX9GsUq/Utyaf7FGuh5 5vISVdCuERVDqih422y3r8rNQ3Rs314P2UeIGwe2RnKhuBpN0/BOIObRKOsVDg5kOK6R b7BNnMdeVU+0bsjkettf5RjKgmk0/d/rAG75EF7/GwzPViIIh5Yes/ODqQ4nugqpPnTi Ry6ObQ0aZ9dBvRGTctiaquBYnQuH/JgleoaONEE9nSu4qdhkeDmyvVBY4dqy/Wi6I+jt jj8mcxLgObRDGXXhH7DvKhTEXLNPDRWRzSvieOvw3olo5EI+9gEXSlptWetA796y7Cyo qDug==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eiU2HC4l; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-157719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id v14-20020a63480e000000b005dc49c4dfc7si11689401pga.471.2024.04.24.14.07.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 14:07:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eiU2HC4l; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-157719-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157719-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 872B42859C9 for ; Wed, 24 Apr 2024 21:07:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5D10156993; Wed, 24 Apr 2024 21:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eiU2HC4l" Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EBC0745CB; Wed, 24 Apr 2024 21:07:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713992855; cv=none; b=HK3LriW4w/XBUPDq/Jk0bliGfZey3sFNitNcTLLLj7N8QkQQc7jZ6yC8ZOIvxD25hjpLXIVF5WuUyz8IazM7zON5MApqDlkemVgCacuKBfBjXWUpIZqkCVgzKQrMP0rQVQ8WYImFASk1xO4YRvfZuYaJQxi654qpku7gqq956g0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713992855; c=relaxed/simple; bh=G2lwFL42qbTgIYMtxVtz1OXQzhaiH7fEiwGb2ykAjBY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=B51WyEjOrP1zkpR7FhfqF0ZDCxIXlxinr1wiMvutY9fbI+rScQ1psffoUz3P6EaR+pfgbQ4draaLvABpaIsZtzyrOAnWhA7hgrGXXsjNyTKpFcLoKg/O4QyfuI0JW9QDPbe5RQsE86xhQw9UHoAXtn5p80DA7rvWppzntX9F6ao= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=eiU2HC4l; arc=none smtp.client-ip=209.85.221.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-349c4505058so171504f8f.3; Wed, 24 Apr 2024 14:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713992852; x=1714597652; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=jE2wbyIVjss7r3Zca672+NKJfYO0FEw/nMOpHNeK+9Q=; b=eiU2HC4ltNxcGAIelbZCt9xfQu0hLl/ksa0cLQUKSshrKtM1DJheMDA/BezbMNUazL jUiVRl7mYzm4jVaPE/A5uEGBbGpatIiSKc1q+WTwi0HG8MyTqL+cD9WuSzqU1gHyPFk3 tFVVcpflH3R5Q5NMqfcad/FXcvm4ddhtN4J36pTp9FhAsYawom20EDxWkWCsCZwUCzIR zbW/R0b9SsI8NqoUTk+XG6i6JLSc4LYITjTe0AGV4ZdLubUySY+TaKVFoiVQrX1sVEUB THjwR7XDS5VLEBDfjn8K8B93Lw77U22IFCTdMa0Esjczd5zqwkJK6Y10UicNjKdYLWwN UNyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713992852; x=1714597652; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jE2wbyIVjss7r3Zca672+NKJfYO0FEw/nMOpHNeK+9Q=; b=FJYDQ/cXu0P+6IOCRY2CNLho9KOZyhFXJsvskVWbleYxa5Bct9a/WsfSmhuI8dBL7d Y8OM7mhAJb9Mzg1wEMYurCbhQ/lfjdiLXGmmxjkXluO8SsMdpNvWs1ivGZYrXJ6UFxCF 1yiqeuMXfcWQcvVHM78YRkuSwXNa+p60cijQqwhMPKnPDfTerscuLjjwXFU1RbxEz1OW caJAtLxNXi7k/yczYFkl2TE/spVXcUrp+d+2ox58zPMDh/WxXbtOwdpN5xiVawKhAlAc 4p0/ma/V1ESgsQqY7CyLkHIPK7RYQ88boO7BOGHkcwOG0HSJkubfLOxmdcXriQPRbwmf EbTA== X-Forwarded-Encrypted: i=1; AJvYcCUupi/oBMEIJkxhkzzf8IfB8sHdPCKQKzjq0ItVWfPe+wgMSwVVKBfPc4wCEAgKAO9zXOR1ThxYGrrEg2PRtfLX4MMI4qzuuL9XvbN7ItqydGAdcZvAmWSOZqIy7hmvVa4l6S5nZgujML2Tj4eQzzDQqBzizINf3VYUr9+pyIZVs7qr X-Gm-Message-State: AOJu0YzPCmAsHZoKuc+mh6bK6ggibNlIOiTaHYVGApMX0ZNIy+KlhNJn qC3tTUVj+sMW36BL2LZ4jX9Agw/DymjtGg+qqctOtb9WF6iNte3nhDulOO6Wj8tHubqS1RJcpWM KPDZO2SCuzO73ATeOaVJkSn8DJZ4= X-Received: by 2002:adf:f488:0:b0:343:f2e0:d507 with SMTP id l8-20020adff488000000b00343f2e0d507mr2411318wro.41.1713992851863; Wed, 24 Apr 2024 14:07:31 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240420-bpf_wq-v2-0-6c986a5a741f@kernel.org> <20240420-bpf_wq-v2-10-6c986a5a741f@kernel.org> In-Reply-To: From: Alexei Starovoitov Date: Wed, 24 Apr 2024 14:07:20 -0700 Message-ID: Subject: Re: [PATCH bpf-next v2 10/16] selftests/bpf: add bpf_wq tests To: Benjamin Tissoires Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Song Liu , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Jiri Olsa , Mykola Lysenko , Shuah Khan , bpf , LKML , "open list:KERNEL SELFTEST FRAMEWORK" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Apr 23, 2024 at 7:56=E2=80=AFPM Alexei Starovoitov wrote: > > On Sat, Apr 20, 2024 at 2:10=E2=80=AFAM Benjamin Tissoires wrote: > > > > + > > +SEC("tc") > > +/* test that workqueues can be used from an array > > + */ > > +__retval(0) > > +long test_call_array_sleepable(void *ctx) > > +{ > > + int key =3D 0; > > + > > + return test_elem_callback(&array, &key); > > +} > > + > > +SEC("syscall") > > +/* Same test than above but from a sleepable context. > > + */ > > I adjusted all these comments to be normal single line comments. > > The main thing to follow up is to figure out how to wait for wq > to finish. > Since we have this message: > ./test_progs -t wq > ... > #521 wq:OK > Summary: 2/9 PASSED, 0 SKIPPED, 0 FAILED > Failed to unload bpf_testmod.ko from kernel: -11 > > and doing manual "rmmod bpf_testmod" > after the test run is quite annoying. > > Overall great stuff. Thank you for pushing it through. > Much appreciated! Hi Benjamin, I've ended up fixing it as well, because it was causing CI issues. See https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id= =3D82e38a505c9868e784ec31e743fd8a9fa5ca1084