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 BFF9243B79; Tue, 5 Mar 2024 14:46:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9029140270; Tue, 5 Mar 2024 14:46:36 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id B86B74026B for ; Tue, 5 Mar 2024 14:46:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709646394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AP7vw7N+d1+3h9C92/wsT5RUgsw7Z+QKx6SBBy4eKIQ=; b=grj1G+RQfbt/4XDyqdwce33gadyX6yL4HPaGwPeAw2pGDdoUmdTgGXGqstayhkV5XcOW1x jIexjoNEnLXf+yV89aCbz14VafzZQs87/hUgSp68e8CDGhqzCliKM+LocY8oe08rsF0C1i +eu5GD4gjWDbnAromDvgwcGMKI7egtE= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-659-80aCd5J_NCy84ooRD-HJkg-1; Tue, 05 Mar 2024 08:46:32 -0500 X-MC-Unique: 80aCd5J_NCy84ooRD-HJkg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 80261800262 for ; Tue, 5 Mar 2024 13:46:32 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.208.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA82A37FD; Tue, 5 Mar 2024 13:46:31 +0000 (UTC) From: Robin Jarry To: dev@dpdk.org Subject: [PATCH] tests: assume c source files are utf-8 encoded Date: Tue, 5 Mar 2024 14:46:15 +0100 Message-ID: <20240305134614.64951-2-rjarry@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 Instead of relying on the default locale from the environment (LC_ALL), explicitly read the files as utf-8 encoded. Fixes: 0aeaf75df879 ("test: define unit tests suites based on test types") Signed-off-by: Robin Jarry --- buildtools/get-test-suites.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtools/get-test-suites.py b/buildtools/get-test-suites.py index 574c233aa873..c61f6a273fad 100644 --- a/buildtools/get-test-suites.py +++ b/buildtools/get-test-suites.py @@ -19,7 +19,7 @@ def get_fast_test_params(test_name, ln): return f":{nohuge.strip().lower()}:{asan.strip().lower()}" for fname in input_list: - with open(fname) as f: + with open(fname, "r", encoding="utf-8") as f: contents = [ln.strip() for ln in f.readlines()] test_lines = [ln for ln in contents if test_def_regex.match(ln)] non_suite_tests.extend([non_suite_regex.match(ln).group(1) -- 2.44.0