DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] tests: assume c source files are utf-8 encoded
@ 2024-03-05 13:46 Robin Jarry
  2024-03-05 13:49 ` Bruce Richardson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Robin Jarry @ 2024-03-05 13:46 UTC (permalink / raw)
  To: dev

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 <rjarry@redhat.com>
---
 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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: assume c source files are utf-8 encoded
  2024-03-05 13:46 [PATCH] tests: assume c source files are utf-8 encoded Robin Jarry
@ 2024-03-05 13:49 ` Bruce Richardson
  2024-03-06 21:20   ` Thomas Monjalon
  2024-03-05 14:26 ` Morten Brørup
  2024-03-05 18:25 ` Tyler Retzlaff
  2 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2024-03-05 13:49 UTC (permalink / raw)
  To: Robin Jarry; +Cc: dev

On Tue, Mar 05, 2024 at 02:46:15PM +0100, Robin Jarry wrote:
> 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 <rjarry@redhat.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Thanks for the update/fix.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH] tests: assume c source files are utf-8 encoded
  2024-03-05 13:46 [PATCH] tests: assume c source files are utf-8 encoded Robin Jarry
  2024-03-05 13:49 ` Bruce Richardson
@ 2024-03-05 14:26 ` Morten Brørup
  2024-03-05 18:25 ` Tyler Retzlaff
  2 siblings, 0 replies; 5+ messages in thread
From: Morten Brørup @ 2024-03-05 14:26 UTC (permalink / raw)
  To: Robin Jarry, dev

> From: Robin Jarry [mailto:rjarry@redhat.com]
> Sent: Tuesday, 5 March 2024 14.46
> 
> 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 <rjarry@redhat.com>
> ---

I strongly agree on UTF-8 encoding everywhere in the DPDK project, so...

Acked-by: Morten Brørup <mb@smartsharesystems.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: assume c source files are utf-8 encoded
  2024-03-05 13:46 [PATCH] tests: assume c source files are utf-8 encoded Robin Jarry
  2024-03-05 13:49 ` Bruce Richardson
  2024-03-05 14:26 ` Morten Brørup
@ 2024-03-05 18:25 ` Tyler Retzlaff
  2 siblings, 0 replies; 5+ messages in thread
From: Tyler Retzlaff @ 2024-03-05 18:25 UTC (permalink / raw)
  To: Robin Jarry; +Cc: dev

On Tue, Mar 05, 2024 at 02:46:15PM +0100, Robin Jarry wrote:
> 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 <rjarry@redhat.com>
> ---

Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] tests: assume c source files are utf-8 encoded
  2024-03-05 13:49 ` Bruce Richardson
@ 2024-03-06 21:20   ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2024-03-06 21:20 UTC (permalink / raw)
  To: Robin Jarry; +Cc: dev, Bruce Richardson

05/03/2024 14:49, Bruce Richardson:
> On Tue, Mar 05, 2024 at 02:46:15PM +0100, Robin Jarry wrote:
> > 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 <rjarry@redhat.com>
> > ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
> 
> Thanks for the update/fix.

Applied, thanks.




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-06 21:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 13:46 [PATCH] tests: assume c source files are utf-8 encoded Robin Jarry
2024-03-05 13:49 ` Bruce Richardson
2024-03-06 21:20   ` Thomas Monjalon
2024-03-05 14:26 ` Morten Brørup
2024-03-05 18:25 ` Tyler Retzlaff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).