Patchwork [1/2,FWTS-TEST] test: ensure we have a well defined sort default

login
register
mail settings
Submitter Colin King
Date Jan. 17, 2013, 2:07 p.m.
Message ID <1358431671-24638-2-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/213271/
State Accepted
Headers show

Comments

Colin King - Jan. 17, 2013, 2:07 p.m.
From: Colin Ian King <colin.king@canonical.com>

Sorting in different locales shows up different results, especially
when running in chroots (for example when doing 32 bit fwts tests
on a 64 bit machine).  To avoid the confusion we force the sort
order to traditional sort byte ordering.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 test.sh | 5 +++++
 1 file changed, 5 insertions(+)
Keng-Yu Lin - Jan. 18, 2013, 9:21 a.m.
On Thu, Jan 17, 2013 at 10:07 PM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Sorting in different locales shows up different results, especially
> when running in chroots (for example when doing 32 bit fwts tests
> on a 64 bit machine).  To avoid the confusion we force the sort
> order to traditional sort byte ordering.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  test.sh | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/test.sh b/test.sh
> index 24913f6..9d4a9ba 100755
> --- a/test.sh
> +++ b/test.sh
> @@ -1,4 +1,9 @@
>  #!/bin/bash
> +#
> +# Keep sort order sane
> +#
> +export LC_ALL=C
> +
>  if [ -z $FWTS ]; then
>         export FWTS=fwts
>  fi
> --
> 1.8.0
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>
Alex Hung - Jan. 18, 2013, 9:21 a.m.
On 01/17/2013 10:07 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Sorting in different locales shows up different results, especially
> when running in chroots (for example when doing 32 bit fwts tests
> on a 64 bit machine).  To avoid the confusion we force the sort
> order to traditional sort byte ordering.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   test.sh | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/test.sh b/test.sh
> index 24913f6..9d4a9ba 100755
> --- a/test.sh
> +++ b/test.sh
> @@ -1,4 +1,9 @@
>   #!/bin/bash
> +#
> +# Keep sort order sane
> +#
> +export LC_ALL=C
> +
>   if [ -z $FWTS ]; then
>   	export FWTS=fwts
>   fi
>

Acked-by: Alex Hung <alex.hung@canonical.com>

Patch

diff --git a/test.sh b/test.sh
index 24913f6..9d4a9ba 100755
--- a/test.sh
+++ b/test.sh
@@ -1,4 +1,9 @@ 
 #!/bin/bash
+#
+# Keep sort order sane
+#
+export LC_ALL=C
+
 if [ -z $FWTS ]; then
 	export FWTS=fwts
 fi