[Fwd: Re: regression failures on WIndows in machines with some non-English locales]

Started by Andrew Dunstanabout 20 years ago3 messages
#1Andrew Dunstan
andrew@dunslane.net
1 attachment(s)

This has refreshed my fading memory. The patch seems like the best
solution. Is there any objection to applying it?

(Petr, I assume you intended to send this to a mailing list also)

cheers

andrew

-------- Original Message --------
Subject: Re: regression failures on WIndows in machines with some
non-English locales
Date: Tue, 01 Nov 2005 07:55:59 +0100
From: Petr Jelinek <pjmodos@seznam.cz>
To: Tom Lane <tgl@sss.pgh.pa.us>, Andrew Dunstan <andrew@dunslane.net>
References: <4366C2AE.70500@dunslane.net> <21289.1130816310@sss.pgh.pa.us>

BTW Tom you should know it's not really failure it's just different
sorting of output in rules test (due to "ch" being one letter in my locale).

When I suggested --no-locale for regression test I ment something like
whats in attachement - this will not change current functionality just
adds option to set NO_LOCALE=something in make check commandline which
would enable me to setup buildfarm member (after patching buildfarm
client, I think it should be option which is off by default there too).

I want this aproach because forcing --no-locale for everybody could mean
that we won't find some errors - good example of this is "force C
locale for temp regression installations" thread
(http://archives.postgresql.org/pgsql-patches/2005-08/msg00352.php)
where we discussed it, you both might remmeber it.

--
Regards
Petr Jelinek (PJMODOS)

Attachments:

regress-nolocale.difftext/plain; name=regress-nolocale.diffDownload
Index: GNUmakefile
===================================================================
RCS file: /projects/cvsroot/pgsql/src/test/regress/GNUmakefile,v
retrieving revision 1.52
diff -c -r1.52 GNUmakefile
*** GNUmakefile	28 Jul 2005 04:32:32 -0000	1.52
--- GNUmakefile	1 Nov 2005 06:34:49 -0000
***************
*** 28,33 ****
--- 28,38 ----
  MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
  endif
  
+ # locale
+ NOLOCALE :=
+ ifdef NO_LOCALE
+ NOLOCALE += --no-locale
+ endif
  
  ##
  ## Prepare for tests
***************
*** 132,148 ****
  check: all
  	-rm -rf ./testtablespace
  	mkdir ./testtablespace
! 	$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT)
  
  installcheck: all
  	-rm -rf ./testtablespace
  	mkdir ./testtablespace
! 	$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql 
  
  installcheck-parallel: all
  	-rm -rf ./testtablespace
  	mkdir ./testtablespace
! 	$(SHELL) ./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT)
  
  
  # old interfaces follow...
--- 137,153 ----
  check: all
  	-rm -rf ./testtablespace
  	mkdir ./testtablespace
! 	$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
  
  installcheck: all
  	-rm -rf ./testtablespace
  	mkdir ./testtablespace
! 	$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE)
  
  installcheck-parallel: all
  	-rm -rf ./testtablespace
  	mkdir ./testtablespace
! 	$(SHELL) ./pg_regress --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) $(NOLOCALE)
  
  
  # old interfaces follow...
***************
*** 152,161 ****
  runtest-parallel: installcheck-parallel
  
  bigtest:
! 	$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql numeric_big
  
  bigcheck:
! 	$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) numeric_big
  
  
  ##
--- 157,166 ----
  runtest-parallel: installcheck-parallel
  
  bigtest:
! 	$(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql numeric_big $(NOLOCALE)
  
  bigcheck:
! 	$(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) numeric_big $(NOLOCALE)
  
  
  ##
Index: pg_regress.sh
===================================================================
RCS file: /projects/cvsroot/pgsql/src/test/regress/pg_regress.sh,v
retrieving revision 1.60
diff -c -r1.60 pg_regress.sh
*** pg_regress.sh	5 Sep 2005 23:50:49 -0000	1.60
--- pg_regress.sh	1 Nov 2005 06:34:51 -0000
***************
*** 24,29 ****
--- 24,30 ----
    --schedule=FILE           use test ordering schedule from FILE
                              (may be used multiple times to concatenate)
    --temp-install[=DIR]      create a temporary installation (in DIR)
+   --no-locale               use C locale
  
  Options for \`temp-install' mode:
    --top-builddir=DIR        (relative) path to top level build directory
***************
*** 99,104 ****
--- 100,106 ----
  unset mode
  unset schedule
  unset debug
+ unset nolocale
  unset top_builddir
  unset temp_install
  unset multibyte
***************
*** 142,147 ****
--- 144,152 ----
          --multibyte=*)
                  multibyte=`expr "x$1" : "x--multibyte=\(.*\)"`
                  shift;;
+         --no-locale)
+                 nolocale=yes
+                 shift;;
          --temp-install)
                  temp_install=./tmp_check
                  shift;;
***************
*** 403,409 ****
      fi
  
      message "initializing database system"
!     [ "$debug" = yes ] && initdb_options='--debug'
      "$bindir/initdb" -D "$PGDATA" -L "$datadir" --noclean $initdb_options >"$LOGDIR/initdb.log" 2>&1
  
      if [ $? -ne 0 ]
--- 408,415 ----
      fi
  
      message "initializing database system"
!     [ "$debug" = yes ] && initdb_options="--debug"
!     [ "$nolocale" = yes ] && initdb_options="$initdb_options --no-locale"
      "$bindir/initdb" -D "$PGDATA" -L "$datadir" --noclean $initdb_options >"$LOGDIR/initdb.log" 2>&1
  
      if [ $? -ne 0 ]

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Andrew Dunstan (#1)
Re: [Fwd: Re: regression failures on WIndows in machines with some non-English locales]

Andrew Dunstan <andrew@dunslane.net> writes:

This has refreshed my fading memory. The patch seems like the best
solution. Is there any objection to applying it?

Putting the switch at the end seems certain to fail on some platforms
(some versions of getopt are fussier than others).

bigtest:
! $(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql numeric_big $(NOLOCALE)

bigcheck:
! $(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) numeric_big $(NOLOCALE)

Put it with the other switches, and I won't object.

regards, tom lane

#3Andrew Dunstan
andrew@dunslane.net
In reply to: Tom Lane (#2)
Re: [Fwd: Re: regression failures on WIndows in machines

Tom Lane wrote:

bigtest:
! $(SHELL) ./pg_regress --schedule=$(srcdir)/serial_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql numeric_big $(NOLOCALE)

bigcheck:
! $(SHELL) ./pg_regress --temp-install --top-builddir=$(top_builddir) --temp-port=$(TEMP_PORT) --schedule=$(srcdir)/parallel_schedule --multibyte=$(MULTIBYTE) --load-language=plpgsql $(MAXCONNOPT) numeric_big $(NOLOCALE)

Put it with the other switches, and I won't object.

applied with this fixed to 8.0 and HEAD.

cheers

andrew