From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 C33EA363C6F for ; Mon, 9 Mar 2026 09:10:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773047450; cv=none; b=GVfPhCmwSC0usio+9yGQuufDdViDeAf/rk+TutG+/C/Gp6McS2q7eQbbRMhi45gxE54eI5GGXrJAf6qoftZLp6YE9f7Y7tVzSojEuaBIHXq0r37hLbhudnYWaNPuyar9tDxiumc/Q3cJHELBpgq613q81MqOZGnRpIM2WY54FRU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773047450; c=relaxed/simple; bh=WUccMRkzf6Qk+kbuVnKg/sZcU7t7Gka4bhy9zPTITHk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=EJfbZC+JznPPTdgfPAweAUT4zWbKMEFRcPLdDcIeijyUi8VJdReycWSZcxvVzp35cVlarmV5hryXYQhzplMq94gaWU9r8fxLI4RCIjxbBX/mNeOLaMaZPAQQTvmMjL/Ti2oSh3cpkRjiBXER4U5OPv+NmH2Yql/YdOguAlAOZKQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=L8E63MhW; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=pF1gmBbi; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="L8E63MhW"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="pF1gmBbi" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1773047447; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qNVBxlG0xm+vtJnrptEsNtPSmD5f3ZCzl1RfGegbr5A=; b=L8E63MhWujaUK0nAFhBABBXFBEacXNg5QzHOUQqyb3iHfFXOyoMc7FuVZ2lXlCP3sbW1vI CsDZA2KTlzl2LdwUI5HN1TEXkK4kO2Qak00EyzRTmBo9Ea3f1XzJLrHgxdQMngkOd4Dw7Y 5N10+xk0dT7H1Kh/vkqRRfu/FqFzc4k= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-259-aXl72OFQMgS3dSEUVR-ASg-1; Mon, 09 Mar 2026 05:10:44 -0400 X-MC-Unique: aXl72OFQMgS3dSEUVR-ASg-1 X-Mimecast-MFC-AGG-ID: aXl72OFQMgS3dSEUVR-ASg_1773047443 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-439cbfcfc21so5146216f8f.2 for ; Mon, 09 Mar 2026 02:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1773047443; x=1773652243; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=qNVBxlG0xm+vtJnrptEsNtPSmD5f3ZCzl1RfGegbr5A=; b=pF1gmBbij6wT3YUnQ6mM+LXSAKtqYHlucv9TnOtMvHKkFi/Ta7u69Npp3JMoGHfGjx lpg6BLaQSfkSVodBv7ikt/m0vGEKM0M44PXXXA+t2RQN7LKpAMjO4aQxKLk6V2xeG1/j qO3zM0kvMWU4HHxvoTwqrcPQAwiYQD+MBNTjPmdvD+wDmHMz3rL53qCOIUD4FJv3U/eA oVw5YrXi+K9Y10RA/s4pHUPgDIucJLNtDqF0v02Q73vYKBLb5l8rZhMbM/g/0jaofauo Ct1b6Grm80zgkME6W/c3cfo9TIcggbtuuySKLdnz42f1KpFsPhwYwUahBEpGg73ygqc6 pPXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773047443; x=1773652243; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qNVBxlG0xm+vtJnrptEsNtPSmD5f3ZCzl1RfGegbr5A=; b=AALSR69noaz9rr1UDCrdncKpt0t15rBKjO8685Br0hUQWH0w/vn1nPOQARV0ZevE0D FT9wfqtU6AAYpLFY1RSyAmkxSQgDzxXSm3krceHeOrsCdcqO3q9pdRnqUjPIgW93drFH Fd2hGJPtNajTjMeoe+toVRFjA1ph5XzcWaHKU+xWVcKst1O9JgRz8CWKO4Brh3FoesrC IJ8yajdI2/DqUcM9qfIsJYQXLlW0jNkmyE/EwmXGINeQArv50trqnjS/bUOfO5BKrvUS f7AZx4oecV9/0zGKLkqhNdEm6DhdIGcvuMMHUXPFgqc5vPYrEr5SfznYKM5nWOClJuLx LN7g== X-Forwarded-Encrypted: i=1; AJvYcCULItXafaxfcWwUw0AzdNZxRxVkJEc7+fqEIPs2QRG5+B2BpdWrXoxVtYXOIiiSb/i42/qetGUrZO+pcY8=@vger.kernel.org X-Gm-Message-State: AOJu0Yy2VIq39YWu6UQWjt/mNrDs0k0bB6rGjzl/XdBLVq3Qpniw9rvu ikYgtoX9aMpDU00z/LJdwn/uqadbU3qL+kQgU4WLzxh6nviZ1DQweU7v3rVbRs+8blcPFnAXYMn 7/pG0xa5PyL4Bjr/T9mLS8PshoWsMTq1mUbYont26c9eF56SdgbhK9DyO2z3y+s3fuw== X-Gm-Gg: ATEYQzy1LLaAcweRupb0Uz2nae7dTVrx4DFvIcnPn4Hm+dM2jD8BJ+CLWUgSAWKdPNU IrcjIH6jxWNta6I8EQnrInN/lnHYHz6dhLvmUhuTSdhWfebsae7i17YBMEDCHP226FqvN/2e5sT Mo6IGXsobh4WXvo7yyoVUC4cyawKHjYXHZUffOyTqSdhy7T2v1b5dHuhp7aZh7l99U5AC25TuD7 2YS+JLFjpPTdiV/zYztJRWM104O0bdQTgvNq6eyhskx+oR/5/HtBi66Y7YTrAznJwr2vqsE3JKE 0B8sLFNvVdOJwrlR6j7xRAKyTNL5w/eyTI4Pv5tFsdG0Ydh/W7Kc9IIWmPhTgK4NOUE8KVloe+L 6HZQMo2Zd4Qzwt14iDcvX5YWriszW/XwB5ksk3NwHNOxAk4N586E= X-Received: by 2002:a05:600c:3acf:b0:483:6f37:1b33 with SMTP id 5b1f17b1804b1-48526978d48mr183083515e9.30.1773047443141; Mon, 09 Mar 2026 02:10:43 -0700 (PDT) X-Received: by 2002:a05:600c:3acf:b0:483:6f37:1b33 with SMTP id 5b1f17b1804b1-48526978d48mr183082835e9.30.1773047442607; Mon, 09 Mar 2026 02:10:42 -0700 (PDT) Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.82.96]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439dae2b9fbsm25044496f8f.23.2026.03.09.02.10.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2026 02:10:41 -0700 (PDT) Date: Mon, 9 Mar 2026 10:10:39 +0100 From: Juri Lelli To: Gabriele Monaco Cc: Shuah Khan , Peter Zijlstra , Ingo Molnar , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Valentin Schneider , Clark Williams , Tommaso Cucinotta , Luca Abeni , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH RFC 1/7] selftests/sched: Add SCHED_DEADLINE test framework infrastructure Message-ID: References: <20260306-upstream-deadline-kselftests-v1-0-2b23ef74c46a@redhat.com> <20260306-upstream-deadline-kselftests-v1-1-2b23ef74c46a@redhat.com> <2c4e24ac7c9f39804d2122316cb42a7cabdda2e6.camel@redhat.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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2c4e24ac7c9f39804d2122316cb42a7cabdda2e6.camel@redhat.com> On 09/03/26 09:20, Gabriele Monaco wrote: > On Fri, 2026-03-06 at 17:10 +0100, Juri Lelli wrote: > > Add the foundational infrastructure for SCHED_DEADLINE scheduler tests > > following the pattern established by sched_ext selftests. This provides > > a clean, extensible framework for testing SCHED_DEADLINE functionality. > > > > The framework uses ELF constructors for automatic test registration, > > allowing new tests to be added simply by defining a struct dl_test and > > calling REGISTER_DL_TEST(). The runner discovers all registered tests > > at runtime and executes them serially, providing a simple and consistent > > way to expand test coverage without modifying the test runner itself. > > > > The framework provides a complete test lifecycle with setup, run, and > > cleanup phases for each test. Tests can be filtered by name, listed for > > inspection, or run in quiet mode for automated testing environments. The > > framework includes assertion macros such as DL_EQ and DL_FAIL_IF to > > simplify test authoring and provide consistent error reporting. Signal > > handling ensures graceful interruption and cleanup when tests are > > terminated early. > > > > This commit establishes the framework without any actual tests. Tests > > will be added in subsequent patches. The framework design is inspired by > > tools/testing/selftests/sched_ext/ but tailored for SCHED_DEADLINE > > testing needs. > > > > Assisted-by: Claude Code: claude-sonnet-4-5@20250929 > > Signed-off-by: Juri Lelli > > --- > >  tools/testing/selftests/sched/deadline/.gitignore |   3 + > >  tools/testing/selftests/sched/deadline/Makefile   |  34 ++++ > >  tools/testing/selftests/sched/deadline/dl_test.h  | 238 > > ++++++++++++++++++++++ > >  tools/testing/selftests/sched/deadline/runner.c   | 219 ++++++++++++++++++++ > >  4 files changed, 494 insertions(+) > > > > I wonder if this runner couldn't be made generic, something like not mentioning > DL in any of the helpers, keep runner.c in tools/testing/selftests/sched/ and > have a tools/testing/selftests/sched/deadline/Makefile glue all required objects > together for the deadline tests (or anything else). > > That would probably make adding new tests much easier without code duplication. Yeah, guess we can do that. I started this with DEADLINE in mind, but if people think the infra might be of help for adding tests for other classes/policies, we can definitely restructure as you suggest. Thanks for taking a look! Best, Juri