* [KVM_AUTOTEST] set English environment
@ 2009-07-09 10:50 Lukáš Doktor
2009-07-20 13:16 ` Lucas Meneghel Rodrigues
2009-07-21 0:09 ` Arnd Bergmann
0 siblings, 2 replies; 4+ messages in thread
From: Lukáš Doktor @ 2009-07-09 10:50 UTC (permalink / raw)
To: KVM list
[-- Attachment #1: Type: text/plain, Size: 192 bytes --]
Set English environment before test executions.
This is critical because we are parsing outputs of commands, which are
localized!
Tested by: ldoktor@redhat.com on RHEL5.4 with kvm-83-72.el5
[-- Attachment #2: language.patch --]
[-- Type: text/plain, Size: 418 bytes --]
--- orig/client/tests/kvm/control 2009-07-08 13:18:07.000000000 +0200
+++ new/client/tests/kvm/control 2009-07-09 12:32:32.000000000 +0200
@@ -45,6 +45,8 @@ Each test is appropriately documented on
import sys, os
+# set English environment
+os.environ['LANG'] = 'en_US.UTF-8'
# enable modules import from current directory (tests/kvm)
pwd = os.path.join(os.environ['AUTODIR'],'tests/kvm')
sys.path.append(pwd)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [KVM_AUTOTEST] set English environment
2009-07-09 10:50 [KVM_AUTOTEST] set English environment Lukáš Doktor
@ 2009-07-20 13:16 ` Lucas Meneghel Rodrigues
2009-07-21 0:09 ` Arnd Bergmann
1 sibling, 0 replies; 4+ messages in thread
From: Lucas Meneghel Rodrigues @ 2009-07-20 13:16 UTC (permalink / raw)
To: Lukáš Doktor; +Cc: KVM list
2009/7/9 Lukáš Doktor <ldoktor@redhat.com>:
> Set English environment before test executions.
> This is critical because we are parsing outputs of commands, which are
> localized!
>
> Tested by: ldoktor@redhat.com on RHEL5.4 with kvm-83-72.el5
Ok, fair enough to have this extra security. Thanks, applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [KVM_AUTOTEST] set English environment
2009-07-09 10:50 [KVM_AUTOTEST] set English environment Lukáš Doktor
2009-07-20 13:16 ` Lucas Meneghel Rodrigues
@ 2009-07-21 0:09 ` Arnd Bergmann
2009-07-21 5:55 ` Lukáš Doktor
1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2009-07-21 0:09 UTC (permalink / raw)
To: Lukáš Doktor; +Cc: KVM list
On Thursday 09 July 2009, Lukáš Doktor wrote:
> --- orig/client/tests/kvm/control 2009-07-08 13:18:07.000000000 +0200
> +++ new/client/tests/kvm/control 2009-07-09 12:32:32.000000000 +0200
> @@ -45,6 +45,8 @@ Each test is appropriately documented on
>
> import sys, os
>
> +# set English environment
> +os.environ['LANG'] = 'en_US.UTF-8'
> # enable modules import from current directory (tests/kvm)
> pwd = os.path.join(os.environ['AUTODIR'],'tests/kvm')
> sys.path.append(pwd)
LANG can still be overridden with LC_ALL. For a well-defined environment,
best set LC_ALL='C'. This will also set other i18n settings and works
on systems that don't come with UTF-8 enabled.
Arnd <><
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [KVM_AUTOTEST] set English environment
2009-07-21 0:09 ` Arnd Bergmann
@ 2009-07-21 5:55 ` Lukáš Doktor
0 siblings, 0 replies; 4+ messages in thread
From: Lukáš Doktor @ 2009-07-21 5:55 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: KVM list, Lucas Meneghel Rodrigues
[-- Attachment #1: Type: text/plain, Size: 857 bytes --]
Dne 21.7.2009 02:09, Arnd Bergmann napsal(a):
> On Thursday 09 July 2009, Lukáš Doktor wrote:
>> --- orig/client/tests/kvm/control 2009-07-08 13:18:07.000000000 +0200
>> +++ new/client/tests/kvm/control 2009-07-09 12:32:32.000000000 +0200
>> @@ -45,6 +45,8 @@ Each test is appropriately documented on
>>
>> import sys, os
>>
>> +# set English environment
>> +os.environ['LANG'] = 'en_US.UTF-8'
>> # enable modules import from current directory (tests/kvm)
>> pwd = os.path.join(os.environ['AUTODIR'],'tests/kvm')
>> sys.path.append(pwd)
>
> LANG can still be overridden with LC_ALL. For a well-defined environment,
> best set LC_ALL='C'. This will also set other i18n settings and works
> on systems that don't come with UTF-8 enabled.
>
> Arnd<><
Yes, you are right. LC_ALL='C' is more clean way to do.
Attached the fixed patch.
[-- Attachment #2: language.patch --]
[-- Type: text/plain, Size: 410 bytes --]
--- orig/client/tests/kvm/control 2009-07-08 13:18:07.000000000 +0200
+++ new/client/tests/kvm/control 2009-07-09 12:32:32.000000000 +0200
@@ -45,6 +45,8 @@ Each test is appropriately documented on
import sys, os
+# set English environment
+os.environ['LC_ALL'] = 'C'
# enable modules import from current directory (tests/kvm)
pwd = os.path.join(os.environ['AUTODIR'],'tests/kvm')
sys.path.append(pwd)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-21 5:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-09 10:50 [KVM_AUTOTEST] set English environment Lukáš Doktor
2009-07-20 13:16 ` Lucas Meneghel Rodrigues
2009-07-21 0:09 ` Arnd Bergmann
2009-07-21 5:55 ` Lukáš Doktor
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).