Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp122744lqh; Fri, 3 May 2024 15:49:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCURhDYU3pe0Xk06AbYRnzP/MBGF/qkOm8OtZECQ7C4CnTutbLQ0IJqy5m5I99bDQK5OqfVcihb55zsjmaso2aLETVv1dpv4TAPsKAdsoA== X-Google-Smtp-Source: AGHT+IFh/whWeIdHvkQ9Pm/MHYozh+OCZ0ZBZ6SXQTrNeT8lOzRnhyXH2zedqvWjhDGhlz5JIuVb X-Received: by 2002:a05:620a:4390:b0:790:c448:a076 with SMTP id a16-20020a05620a439000b00790c448a076mr4796552qkp.30.1714776592067; Fri, 03 May 2024 15:49:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714776592; cv=pass; d=google.com; s=arc-20160816; b=hmlUP0XtoldY9gvGctfrt58yIRKSrSbwSI16BcrJQtSw5+6gB22ysy45cWLX1nTi9X 5VaqevCbx1PebYk75H+f7rF6Q8wqjDI7hUS9BjHb3vwkz3moIzc4IEvrhgbhW3wNd54e k7fwfCdogMK4MvK9ysOWSuGN2wz+358LaPswaNnah1LMBLclY55tQ3JTSdi84NTyrupl KGze8L1erIh51ctXqR5Ic/+MuUFGar4JotyhZmi8E7gitI95+UsyrndRU9VfpvlU47sw SMFU8kN+prB0XTKeoo8tELYZwDJncajaRN7zHpO2tNuCinMrmNd3iy0zM+ahR9WiTBgL ThtQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=x6e0I7pM7gRZfiqZOK2I/f4qCtMd6mi/jorExR+/kiY=; fh=7Vek+laWpHf1S6HEVZZEPfG2Q3rOwUwKKSawt39Omr0=; b=y7przojeYkWodbwJbpu+sw8AJKZ+qF2XqaMXxjTcI+Urdb3imqBX3QcXP5naf8gAko P2+T1tji3EdCV/BXuGyZvUddVvdjdGTdb2RUfpYKxgJnOaYRTFx/Fy26Ro4YFYKpdFfu RIqJKcMIXrWrc2N0VU18awENu3Pg6J+6oXb4btmKosboe3Ey24VQxBBEYZ5sPwOWIY3r 3vIVtsvRd0HKHzRE837zv8OG7DfiuZMiye+YyoIXg71mkrdenF26nQPHRlta6+/i4165 zXLrjZIVCtD0F4aVCJzaltdhlJQvFflJutAYPBZ0VmQHMmh19ZR+ALMSrMbGB8tR/dlx 8Hyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WOIwXnRy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168376-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id x28-20020a05620a14bc00b007927501d6cfsi4076842qkj.615.2024.05.03.15.49.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 15:49:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WOIwXnRy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168376-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168376-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8B9B71C21F6B for ; Fri, 3 May 2024 22:49:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4872B839F8; Fri, 3 May 2024 22:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WOIwXnRy" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67F19339A1; Fri, 3 May 2024 22:49:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714776581; cv=none; b=Wo/aDCS9eDNNshRAUh57NwbfXcMTGSQ/ewwVoOZeMvT+e4rxFI1ul7AnfQvJ/2RJ5jBcM88UB+gWzF99QEK8mwl+3przOXwJWarsrO/Jm+SWr3NdTq3dvW7ktM/DSaVpuppVWW7BFqKxGBf7HRBI3odsn6G+eeivTX6JKmFPFjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714776581; c=relaxed/simple; bh=M+9Kg7/l2eYoa4JWzNR42f+5vfPaSwqcb+iR450hv2A=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CdA3SWMUaAsgv9B3ibvbIo3RH5lH1rzyt17hRRBPhlbNM4aq5evu1u1gwg9E2ciO9kEo72Sl9K8xQTQz85NV48WGchdn3JKUZ8GDrmqkm82Mwb79oBmb2T1Neecgy8vseRoOAbKAIxsEERDnYz+6kre5SMu+EU2/B9PMvoKMrqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WOIwXnRy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D627C116B1; Fri, 3 May 2024 22:49:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714776580; bh=M+9Kg7/l2eYoa4JWzNR42f+5vfPaSwqcb+iR450hv2A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=WOIwXnRyhbEKfyuqZt+JLTk0EulLi6KB/8IMk3R91gqvxsdgYqAsKRTMtwwbSmU1R Dcw/StaVjPGzo6IkExptBc6LH1kIrs+HPi+5LxLcPQQURpxqlQC7Gw35rcbaPR+/Za lcawY15BQdUMHbo7Al+MoLdDd6oylCshCMIye/B6rYQ6D2D+0PWFjp1D05UkcNXrwQ PQ6Lihtzxc5jBGIjAEETCobAaIW6YyCAGDfvFLs+lO+CS4J2lWXNQq2K7rCjYB5dLI qicoFaI0PvEP8K24dlyBFOYvKy9Q5taA3npqvgc5SIre/iVhtERcHEfVy40pM/QwJi hKPl3uYknfPqw== Date: Fri, 3 May 2024 15:49:39 -0700 From: Jakub Kicinski To: Joe Damato Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, nalramli@fastly.com, "David S. Miller" , Eric Dumazet , Paolo Abeni , Shuah Khan Subject: Re: [PATCH net-next] selftest: epoll_busy_poll: epoll busy poll tests Message-ID: <20240503154939.79f7c878@kernel.org> In-Reply-To: <20240502212013.274758-1-jdamato@fastly.com> References: <20240502212013.274758-1-jdamato@fastly.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 2 May 2024 21:20:11 +0000 Joe Damato wrote: > --- a/tools/testing/selftests/net/Makefile > +++ b/tools/testing/selftests/net/Makefile > @@ -84,6 +84,7 @@ TEST_GEN_FILES += sctp_hello > TEST_GEN_FILES += csum > TEST_GEN_FILES += ip_local_port_range > TEST_GEN_FILES += bind_wildcard > +TEST_GEN_FILES += epoll_busy_poll "GEN" is for files which are built for other tests to use. IOW unless there's also a wrapper script under TEST_PROGS (or the C code is itself under TEST_PROGS) this test won't be executed by most CIs. FWIW here's how we run the tests in our CI upstream CI: https://github.com/linux-netdev/nipa/wiki/How-to-run-netdev-selftests-CI-style > TEST_PROGS += test_vxlan_mdb.sh > TEST_PROGS += test_bridge_neigh_suppress.sh > TEST_PROGS += test_vxlan_nolocalbypass.sh > +static void do_simple_test(void) > +{ > + int fd; > + > + fd = epoll_create1(0); > + if (fd == -1) > + error(1, errno, "epoll_create"); > + > + do_simple_test_invalid_fd(); > + do_simple_test_invalid_ioctl(fd); > + do_simple_test_get_params(fd); > + do_simple_test_set_invalid(fd); > + do_simple_test_set_and_get_valid(fd); You don't want to use the kselftest_harness for this? No strong preference here, but seems like you could pop the epoll_create1 into a FIXTURE() and then the test cases into TEST_F() and we'd get the KTAP output formatting, ability to run the tests selectively etc. for free. tools/testing/selftests/net/tap.c is probably a good example to take a look at