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 0D45E43B9D; Wed, 28 Feb 2024 10:16:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F0B9D4027D; Wed, 28 Feb 2024 10:16:24 +0100 (CET) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by mails.dpdk.org (Postfix) with ESMTP id 005904003C for ; Wed, 28 Feb 2024 10:16:23 +0100 (CET) Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-a3d5e77cfbeso115634366b.0 for ; Wed, 28 Feb 2024 01:16:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1709111783; x=1709716583; darn=dpdk.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=CW78tCXdB8dZXdcMvzA84HX4u81c6tsmWi7EOUsy6W0=; b=T5ZqxB5lX6nGHBT1gulRa1WHM9sF5ZLUw3F8VtMaXgUBGHTboJy++l0fHVskAoplYE 0HZxkXJKcsf0gxQ3CJQwWniDpdYm9nOGcfPGYPmwzkksXGbX70RsmJfqvMkwjYnf7I80 fPuZvD/IE6Thcj/ePSB6pdjPeQ79fEYu25t0gDHvL6lGm6+gTsbjqbwkHpwWrBjqvYAR m4uTLvgnYp5X3axFHgrXYEmDR97tQFoJDchhtZkfH8bNdqsqFucEQ30CS4o88Vl17s1d 6b53uO/yfAWo/IcRbLMKdXXo6rD7acZIFitqfTi09vXKvMsf9wHgx6MftsN7a7wnLVaM IvwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709111783; x=1709716583; 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=CW78tCXdB8dZXdcMvzA84HX4u81c6tsmWi7EOUsy6W0=; b=fB4JhuVJ7UPmz9yuLeB+a/ieslx3KR89vvIy9s95iiHZYSOZuBb7+L+S+5JoEMgQZX sGV+0KvGXGEnwqoJCy6zZ3LRuFvF/oMGZEQptKMOZQKvasCD9GzOgVpOz6MKBQI5uk/0 hZnbrWPBU1IT2DNJMxXpcVlrhr+RqSVMQVaLpXl8VNTHmm5bZEhvxXXjCydL9v9uR/Oa RnauMNeyW2exQ1dfEbQEz3mRRLTX8Y51JNQcDQdK3d3HooGRk42KEf4LZeOGUB9A64RY gKY3NqALtElsvHymZujx6CielZJdIHdZ7nZSWy9KYN6qjA+Z6UtF2rOfN4ehv6C+8CNb EZeg== X-Forwarded-Encrypted: i=1; AJvYcCXsWW5JK4e1rXvPc1R69ejY64xCOlq8hpth9B1S5JdHJTOk88vaQDlAIvjew2Ia2c2qi1vA9LH01BxCxM8= X-Gm-Message-State: AOJu0YyuUEe0lOiUAhPLxLrIRGj7QoYZBGVLAqv2+tNnmMvpHQdJkCP1 xk2lDr8zYbIUls6G4mW6SxESaEW5aLayD5KhkTbd2XPJ8ReCxWZZwzxycjbvHFLUfFH8xfBCBlc EtpsoibOoiej425fgHwUHfmqrOJZQfQ0PRGhXTQ== X-Google-Smtp-Source: AGHT+IHWwD028GhIf5wIfktMWqtpFjdVYiAYzTuQrqZLcHTEZNM7X1+qqs2zjiShKFLGksH/GFS2iKL20JphXadPygs= X-Received: by 2002:a17:906:2454:b0:a44:eb5:dd4a with SMTP id a20-20020a170906245400b00a440eb5dd4amr499992ejb.25.1709111782792; Wed, 28 Feb 2024 01:16:22 -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: From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Wed, 28 Feb 2024 10:16:11 +0100 Message-ID: Subject: Re: [PATCH v3 3/7] dts: filter test suites in executions To: Jeremy Spewock 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" Content-Transfer-Encoding: quoted-printable 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 On Tue, Feb 27, 2024 at 10:22=E2=80=AFPM Jeremy Spewock wrote: > > > > + > > + lowercase_suite_to_find =3D ( > > + f"{self._test_suite_class_prefix}{module_name.replace('_',= '')}".lower() > > + ) > > + for class_name, class_obj in inspect.getmembers(test_suite_mod= ule, 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? > There is a slight difference. The class_name.startswith(self._test_suite_class_prefix) condition checks uppercase characters as well. I'm not sure it's actually worth it. Maybe we could change the name check to also check for the CamelCase convention. I'll look into that. > > > > + and lowercase_suite_to_find =3D=3D class_name.lower() > > + ): > > + return class_obj > > + raise ConfigurationError( > > + f"Couldn't find any valid test suites in {test_suite_modul= e.__name__}." > > + ) >