From d0131271f3edd75a8fe5898932aa811e05c881c2 Mon Sep 17 00:00:00 2001 From: Mooffie Date: Wed, 8 Mar 2017 03:31:09 +0200 Subject: [PATCH] Ticket #3787: extfs: tests for helpers using 'sort' may fail. The "expected output" files we provide must be generated in the same locale the tester (that is, the helpers) are run. Otherwise helpers using the 'sort' utility may generate output different than our provided "expected output", hence failing the tests. Therefore we: (1) Regenerate the "expected output" files in the C locale. (2) Make sure the tester is run in the C locale. (Tip: to regenerate the "expected output" files we deleted all the *.output files and run the tester with "LC_ALL=C ./run --create-output".) Signed-off-by: Mooffie --- .../helpers-list/data/u7z.complex.output | 32 +++++++++---------- .../data/u7z.missing-size-and-date.output | 10 +++--- .../extfs/helpers-list/data/u7z.simple.output | 6 ++-- .../extfs/helpers-list/data/urar.v4,v3.output | 4 +-- .../extfs/helpers-list/data/urar.v5.output | 4 +-- tests/src/vfs/extfs/helpers-list/test_all | 11 +++++++ 6 files changed, 39 insertions(+), 28 deletions(-) diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.complex.output b/tests/src/vfs/extfs/helpers-list/data/u7z.complex.output index d5935dc66..93012b14e 100644 --- a/tests/src/vfs/extfs/helpers-list/data/u7z.complex.output +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.complex.output @@ -1,27 +1,27 @@ --rw-r--r-- 1 <> <> 469920 2011-11-03 02:33:04 cpuidsdk64.dll --rw-r--r-- 1 <> <> 445814 2011-11-03 02:33:04 cpuidsdk.dll --rw-r--r-- 1 <> <> 1178084 2011-11-03 02:33:04 Geekbench22.exe --rw-r--r-- 1 <> <> 101652 2011-11-03 02:33:04 geekbench.exe --rw-r--r-- 1 <> <> 737580 2011-11-03 02:33:04 geekbench.plar --rw-r--r-- 1 <> <> 1058731 2011-11-03 02:33:06 geekbench_x86_32.exe --rw-r--r-- 1 <> <> 1192155 2011-11-03 02:33:06 geekbench_x86_64.exe +-rw-r--r-- 1 <> <> 6144 2007-07-07 07:07:07 $PLUGINSDIR/AdvSplash.dll +-rw-r--r-- 1 <> <> 8005 2007-07-07 07:07:07 $PLUGINSDIR/InstallOptions.dll +-rw-r--r-- 1 <> <> 3328 2007-07-07 07:07:07 $PLUGINSDIR/StartMenu.dll +-rw-r--r-- 1 <> <> 134 2007-11-15 01:12:38 $PLUGINSDIR/ioSpecial.ini +-rw-r--r-- 1 <> <> 1886 2003-09-24 00:34:00 $PLUGINSDIR/modern-wizard.bmp +-rw-r--r-- 1 <> <> 28016 2006-08-11 23:49:28 $PLUGINSDIR/splash.bmp -rw-r--r-- 1 <> <> 4014 2011-11-03 02:23:16 $_OUTDIR/html/ui/bg-repeat.gif -rw-r--r-- 1 <> <> 12817 2011-11-03 02:23:16 $_OUTDIR/html/ui/callout-bg-bottom.gif -rw-r--r-- 1 <> <> 14648 2011-11-03 02:23:16 $_OUTDIR/html/ui/callout-bg-top.gif -rw-r--r-- 1 <> <> 120 2011-11-03 02:23:16 $_OUTDIR/html/ui/graph-background.png --rw-r--r-- 1 <> <> 9854 2011-11-03 02:23:16 $_OUTDIR/html/ui/heading-bg.gif -rw-r--r-- 1 <> <> 861 2011-11-03 02:23:16 $_OUTDIR/html/ui/heading-bg-left.gif +-rw-r--r-- 1 <> <> 9854 2011-11-03 02:23:16 $_OUTDIR/html/ui/heading-bg.gif -rw-r--r-- 1 <> <> 30401 2011-11-03 02:23:16 $_OUTDIR/html/ui/logo.gif -rw-r--r-- 1 <> <> 1431 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrow-down.gif --rw-r--r-- 1 <> <> 1425 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrows-bg.gif -rw-r--r-- 1 <> <> 1446 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrow-up.gif --rw-r--r-- 1 <> <> 2885 2011-11-03 02:23:16 $_OUTDIR/html/ui/table-wrapper-bg-repeat.gif +-rw-r--r-- 1 <> <> 1425 2011-11-03 02:23:16 $_OUTDIR/html/ui/nav-arrows-bg.gif -rw-r--r-- 1 <> <> 3841 2011-11-03 02:23:16 $_OUTDIR/html/ui/table-wrapper-bg-repeat-x.gif +-rw-r--r-- 1 <> <> 2885 2011-11-03 02:23:16 $_OUTDIR/html/ui/table-wrapper-bg-repeat.gif -rw-r--r-- 1 <> <> 142162 2011-11-03 02:23:16 $_OUTDIR/ux/splash-screen.png --rw-r--r-- 1 <> <> 6144 2007-07-07 07:07:07 $PLUGINSDIR/AdvSplash.dll --rw-r--r-- 1 <> <> 8005 2007-07-07 07:07:07 $PLUGINSDIR/InstallOptions.dll --rw-r--r-- 1 <> <> 134 2007-11-15 01:12:38 $PLUGINSDIR/ioSpecial.ini --rw-r--r-- 1 <> <> 1886 2003-09-24 00:34:00 $PLUGINSDIR/modern-wizard.bmp --rw-r--r-- 1 <> <> 28016 2006-08-11 23:49:28 $PLUGINSDIR/splash.bmp --rw-r--r-- 1 <> <> 3328 2007-07-07 07:07:07 $PLUGINSDIR/StartMenu.dll +-rw-r--r-- 1 <> <> 1178084 2011-11-03 02:33:04 Geekbench22.exe +-rw-r--r-- 1 <> <> 445814 2011-11-03 02:33:04 cpuidsdk.dll +-rw-r--r-- 1 <> <> 469920 2011-11-03 02:33:04 cpuidsdk64.dll +-rw-r--r-- 1 <> <> 101652 2011-11-03 02:33:04 geekbench.exe +-rw-r--r-- 1 <> <> 737580 2011-11-03 02:33:04 geekbench.plar +-rw-r--r-- 1 <> <> 1058731 2011-11-03 02:33:06 geekbench_x86_32.exe +-rw-r--r-- 1 <> <> 1192155 2011-11-03 02:33:06 geekbench_x86_64.exe -rw-r--r-- 1 <> <> 0 2007-07-07 07:07:07 plugins/shared memory/uninstall.exe diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.output b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.output index d7e2e056f..260b70580 100644 --- a/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.output +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.missing-size-and-date.output @@ -1,9 +1,9 @@ --rw-r--r-- 1 <> <> 469920 2011-11-01 01:33:04 cpuidsdk64.dll --rw-r--r-- 1 <> <> 17770090 2007-07-07 07:07:07 no-date-cpuidsdk64.dll -drwxr-xr-x 1 <> <> 0 2007-07-07 07:07:07 no-date-$_OUTDIR/html/ui -drwxr-xr-x 1 <> <> 0 2007-07-07 07:07:07 no-date-test --rw-r--r-- 1 <> <> 0 2007-07-07 07:07:07 no-date-test.dll drwxr-xr-x 1 <> <> 0 2011-11-02 02:23:16 $_OUTDIR/html/ui -rw-r--r-- 1 <> <> 17897 2011-11-05 05:23:16 $_OUTDIR/html/ui/callout-bg-bottom.gif +-rw-r--r-- 1 <> <> 469920 2011-11-01 01:33:04 cpuidsdk64.dll +drwxr-xr-x 1 <> <> 0 2007-07-07 07:07:07 no-date-$_OUTDIR/html/ui +-rw-r--r-- 1 <> <> 17770090 2007-07-07 07:07:07 no-date-cpuidsdk64.dll +drwxr-xr-x 1 <> <> 0 2007-07-07 07:07:07 no-date-test +-rw-r--r-- 1 <> <> 0 2007-07-07 07:07:07 no-date-test.dll drwxr-xr-x 1 <> <> 0 2011-11-04 04:23:16 test -rw-r--r-- 1 <> <> 0 2011-11-03 03:33:04 test.dll diff --git a/tests/src/vfs/extfs/helpers-list/data/u7z.simple.output b/tests/src/vfs/extfs/helpers-list/data/u7z.simple.output index e0bdfa02a..009d8fd21 100644 --- a/tests/src/vfs/extfs/helpers-list/data/u7z.simple.output +++ b/tests/src/vfs/extfs/helpers-list/data/u7z.simple.output @@ -20,7 +20,7 @@ -rw-r--r-- 1 <> <> 233 2005-11-14 04:41:01 vp -rw-r--r-- 1 <> <> 0 2016-12-18 22:30:42 with spaces.txt drwxr-xr-x 1 <> <> 0 2016-10-26 08:35:48 x --rw-r--r-- 1 <> <> 58 2003-02-17 15:11:46 xcopy +-rw-r--r-- 1 <> <> 340 2010-01-31 23:04:48 x/.xsession drwxr-xr-x 1 <> <> 0 2009-05-03 21:01:33 x/etc drwxr-xr-x 1 <> <> 0 2009-05-03 21:02:13 x/etc/X11 drwxr-xr-x 1 <> <> 0 2006-05-02 10:12:38 x/etc/X11/xinit @@ -33,10 +33,10 @@ drwxr-xr-x 1 <> <> 0 2005-12-04 19:15:47 x/etc/X11/xinit/ -rw-r--r-- 1 <> <> 81 2005-09-02 17:36:13 x/etc/X11/xinit/xinitrc.d/xmbind.sh drwxr-xr-x 1 <> <> 0 2009-05-03 21:07:38 x/etc/X11/xkb -rw-r--r-- 1 <> <> 71 2009-05-03 21:07:38 x/etc/X11/xkb/note.txt --rw-r--r-- 1 <> <> 58 2003-02-17 15:10:46 xpaste -rw-r--r-- 1 <> <> 489 2003-08-03 01:46:40 x/setxkb -rw-r--r-- 1 <> <> 142 2003-03-09 14:08:01 x/setxkb2 -rw-r--r-- 1 <> <> 158 2002-11-08 13:28:37 x/x -rw-r--r-- 1 <> <> 3746 2006-12-07 11:30:57 x/xinitrc -rw-r--r-- 1 <> <> 42 2006-12-07 11:28:18 x/xs --rw-r--r-- 1 <> <> 340 2010-01-31 23:04:48 x/.xsession +-rw-r--r-- 1 <> <> 58 2003-02-17 15:11:46 xcopy +-rw-r--r-- 1 <> <> 58 2003-02-17 15:10:46 xpaste diff --git a/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.output b/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.output index 771ab45be..95685985c 100644 --- a/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.output +++ b/tests/src/vfs/extfs/helpers-list/data/urar.v4,v3.output @@ -1,9 +1,9 @@ drwx------ 1 <> <> 0 2016-06-07 20:43:00 ./.dosbox -rw-rw-r-- 1 <> <> 10730 2016-06-07 20:43:00 ./.dosbox/dosbox-0.74.conf --rw-r--r-- 1 <> <> 6 2016-11-23 07:39:00 ./filename with spaces.txt --rw-rw-r-- 1 <> <> 5869937 2016-11-23 07:43:00 ./log.txt -rw------- 1 <> <> 11032 2016-11-23 07:10:00 ./.viminfo -rw-rw-r-- 1 <> <> 205 2016-10-26 13:14:00 ./.wget-hsts -rw-rw-r-- 1 <> <> 7527 2016-04-17 01:21:00 ./.xboardrc -rw-rw-r-- 1 <> <> 559 2016-09-29 01:08:00 ./.xchm -rw-rw-r-- 1 <> <> 130 2015-12-27 17:08:00 ./.xinputrc +-rw-r--r-- 1 <> <> 6 2016-11-23 07:39:00 ./filename with spaces.txt +-rw-rw-r-- 1 <> <> 5869937 2016-11-23 07:43:00 ./log.txt diff --git a/tests/src/vfs/extfs/helpers-list/data/urar.v5.output b/tests/src/vfs/extfs/helpers-list/data/urar.v5.output index 771ab45be..95685985c 100644 --- a/tests/src/vfs/extfs/helpers-list/data/urar.v5.output +++ b/tests/src/vfs/extfs/helpers-list/data/urar.v5.output @@ -1,9 +1,9 @@ drwx------ 1 <> <> 0 2016-06-07 20:43:00 ./.dosbox -rw-rw-r-- 1 <> <> 10730 2016-06-07 20:43:00 ./.dosbox/dosbox-0.74.conf --rw-r--r-- 1 <> <> 6 2016-11-23 07:39:00 ./filename with spaces.txt --rw-rw-r-- 1 <> <> 5869937 2016-11-23 07:43:00 ./log.txt -rw------- 1 <> <> 11032 2016-11-23 07:10:00 ./.viminfo -rw-rw-r-- 1 <> <> 205 2016-10-26 13:14:00 ./.wget-hsts -rw-rw-r-- 1 <> <> 7527 2016-04-17 01:21:00 ./.xboardrc -rw-rw-r-- 1 <> <> 559 2016-09-29 01:08:00 ./.xchm -rw-rw-r-- 1 <> <> 130 2015-12-27 17:08:00 ./.xinputrc +-rw-r--r-- 1 <> <> 6 2016-11-23 07:39:00 ./filename with spaces.txt +-rw-rw-r-- 1 <> <> 5869937 2016-11-23 07:43:00 ./log.txt diff --git a/tests/src/vfs/extfs/helpers-list/test_all b/tests/src/vfs/extfs/helpers-list/test_all index 69a4a248c..f5f9be616 100755 --- a/tests/src/vfs/extfs/helpers-list/test_all +++ b/tests/src/vfs/extfs/helpers-list/test_all @@ -58,6 +58,17 @@ EOS #"' +# +# Some helpers use the 'sort' utility. The "expected output" files we +# provide must be generated in the same locale these helpers are to be run +# by the tester or else 'sort' will produce a different output than ours, +# failing the tests. +# +# We settle on the C locale. +# +LC_ALL=C +export LC_ALL + ############################ Global variables ############################## # The directories used.