From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C37CE43BF7; Tue, 27 Feb 2024 22:22:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AC39D4026E; Tue, 27 Feb 2024 22:22:09 +0100 (CET) Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) by mails.dpdk.org (Postfix) with ESMTP id 7DA8C40150 for ; Tue, 27 Feb 2024 22:22:08 +0100 (CET) Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-5d81b08d6f2so4706541a12.0 for ; Tue, 27 Feb 2024 13:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1709068928; x=1709673728; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=LRT6+YiDazwR3vmfHHxj+8ojfqgoBBolYGM/9cruUKM=; b=E784Yttc+B5f1W8NEFQSjXyXSYG9ROh97h0VSrrdPQ5VVoQaUKILMcYweGuPrjzoeC QlFmaKq6I9Mz/47Pfkd3HGqMX9J+yZoE0GqPI1mDcsXe5bcIxSHF84R8YSzQXaHDMHup BX8+a+MCiRH6+e/U7bMMJw/DAC5QuL49620aQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709068928; x=1709673728; h=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=LRT6+YiDazwR3vmfHHxj+8ojfqgoBBolYGM/9cruUKM=; b=WpeuXgbn0PTISxQuIv8hdOg9Xv8/zDC+1o8Wj9GUXlT7ZP4hVcBYa9DGaK4Z81ad1Y CkOJhanTM1iciXohm5YUzQkbXLgMruzgpHJHX7C1yvoTcrSrJLaFRU1kHtdv7kNQYKPI 6IpCvEeM5K2kWIxauOMfIsqaTAIzV50K9OTgDpDXWurFvWOWzf0eNHJQp/Nh+uUvSnZ8 bSCnUo5xXJCxc5pLcNpZXPzgwb7hHVjEQ3Bf1DHgzGImsuEV+xBqPIxFLGCPTB0p5gyQ oWjMxjTgACV3SBqAC6fWixKZolAtTIEyGwmWDRIHpeonmSjqDt++6KG2GpVODX7q9C8q AGFg== X-Forwarded-Encrypted: i=1; AJvYcCWPzCqJ3cHan6nj65yNIr7XH0OH0T56GzJSXQK+z6YOgp0J3dpvzGNIhqFeyHTy73bKxh2fWJ8rrSAN0Zk= X-Gm-Message-State: AOJu0YxMge6JMrsnF5AV5GsubSPbf4VKiJY2WpK6mlcfuOlovXfZyF/v C7RRwfPGzHkG+hcrt/S2jNMhPS/KPLDxGTjQUgm/XKq6O09vypKeMz/cloYOPI+TDqpj357JJud GCr36/Fw3EaStaG10KNUphjVMyIDpvukv4oNbcA== X-Google-Smtp-Source: AGHT+IFuM33rLqV5SBtydek4/GfchedDuRjrbUiiU4VQk8+92Ntq7Y53Jyod6xCtzX1qDG0hx1YIzURERvuVMapLjJc= X-Received: by 2002:a05:6a20:9c91:b0:19e:9c5e:ad80 with SMTP id mj17-20020a056a209c9100b0019e9c5ead80mr3755884pzb.62.1709068927569; Tue, 27 Feb 2024 13:22:07 -0800 (PST) MIME-Version: 1.0 References: <20231220103331.60888-1-juraj.linkes@pantheon.tech> <20240223075502.60485-1-juraj.linkes@pantheon.tech> <20240223075502.60485-4-juraj.linkes@pantheon.tech> In-Reply-To: <20240223075502.60485-4-juraj.linkes@pantheon.tech> From: Jeremy Spewock Date: Tue, 27 Feb 2024 16:21:56 -0500 Message-ID: Subject: Re: [PATCH v3 3/7] dts: filter test suites in executions To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, probb@iol.unh.edu, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org > + > + lowercase_suite_to_find = ( > + f"{self._test_suite_class_prefix}{module_name.replace('_', '')}".lower() > + ) > + for class_name, class_obj in inspect.getmembers(test_suite_module, is_test_suite): > + if ( > + class_name.startswith(self._test_suite_class_prefix) Is this line required? When we check later if the lowercase_suite_to_find is equal, we know that this variable we made starts with the designated prefix because that's just how we made it. It seems redundant because they could not be equal if the class name didn't start with the prefix. Is the idea behind this a type of optimization because this makes us ignore anything that doesn't have the proper prefix before going further? > > + and lowercase_suite_to_find == class_name.lower() > + ): > + return class_obj > + raise ConfigurationError( > + f"Couldn't find any valid test suites in {test_suite_module.__name__}." > + )