You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alexander Thomas <al...@collab.net> on 2010/06/09 07:25:26 UTC

[PATCH] Fixing prop_tests.py failure in Solaris

[[[
Replace existing invalid propname to make test pass in Solaris.

* subversion/tests/cmdline/prop_tests.py
  (invalid_propnames): Changed propname to empty char.
]]]


-Alexander Thomas (AT)

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Alexander Thomas <al...@collab.net>.
On Sat, 2010-06-12 at 13:04 +0200, Stefan Sperling wrote:
> On Fri, Jun 11, 2010 at 02:30:09PM +0530, Alexander Thomas wrote:
> > On Fri, 2010-06-11 at 09:53 +0100, Philip Martin wrote:
> > > Alexander Thomas <al...@collab.net> writes:
> > > 
> > > > Yes SUNWuiu8 is the one that comes default with Solaris10 and 646/ASCII
> > > > conversion to UTF-8 works fine. But for other reasons I should continue
> > > > using gnu-libiconv.
> > > 
> > > http://www.mail-archive.com/info-gnu%40gnu.org/msg00690.html
> > > 
> > > Are you using 1.13? It added support for the "646" alias.
> > > 
> > No, 1.12. I will try with the latest. Thanks
> 
> OpenBSD returns "646" as well. Patching GNU iconv to support this
> on OpenBSD (rather than just Solaris) fixed prop test 22 for me.
> 
> Many thanks for the hint Philip,
Yes it works for me now. Updated GNU iconv to latest 1.13.1.

Thanks to Philip & Stsp

-AT

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Jun 11, 2010 at 02:30:09PM +0530, Alexander Thomas wrote:
> On Fri, 2010-06-11 at 09:53 +0100, Philip Martin wrote:
> > Alexander Thomas <al...@collab.net> writes:
> > 
> > > Yes SUNWuiu8 is the one that comes default with Solaris10 and 646/ASCII
> > > conversion to UTF-8 works fine. But for other reasons I should continue
> > > using gnu-libiconv.
> > 
> > http://www.mail-archive.com/info-gnu%40gnu.org/msg00690.html
> > 
> > Are you using 1.13? It added support for the "646" alias.
> > 
> No, 1.12. I will try with the latest. Thanks

OpenBSD returns "646" as well. Patching GNU iconv to support this
on OpenBSD (rather than just Solaris) fixed prop test 22 for me.

Many thanks for the hint Philip,
Stefan

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Alexander Thomas <al...@collab.net>.
On Fri, 2010-06-11 at 09:53 +0100, Philip Martin wrote:
> Alexander Thomas <al...@collab.net> writes:
> 
> > Yes SUNWuiu8 is the one that comes default with Solaris10 and 646/ASCII
> > conversion to UTF-8 works fine. But for other reasons I should continue
> > using gnu-libiconv.
> 
> http://www.mail-archive.com/info-gnu%40gnu.org/msg00690.html
> 
> Are you using 1.13? It added support for the "646" alias.
> 
No, 1.12. I will try with the latest. Thanks

-AT

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Philip Martin <ph...@wandisco.com>.
Alexander Thomas <al...@collab.net> writes:

> Yes SUNWuiu8 is the one that comes default with Solaris10 and 646/ASCII
> conversion to UTF-8 works fine. But for other reasons I should continue
> using gnu-libiconv.

http://www.mail-archive.com/info-gnu%40gnu.org/msg00690.html

Are you using 1.13? It added support for the "646" alias.

-- 
Philip

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Alexander Thomas <al...@collab.net>.
On Fri, 2010-06-11 at 08:17 +0100, Philip Martin wrote:
> Alexander Thomas <al...@collab.net> writes:
> 
> > Code snippet produced "646". 
> >
> > "iconv -f 646 -t UTF-8 /dev/null" returned
> > "iconv: conversion from `646' is not supported"
> 
> Google suggests you need to install SUNWuiu8 for 646 to work.
> 
> You could try setting the environment variable LANG=C, or some other
> locale of your choice.
> 
Yes SUNWuiu8 is the one that comes default with Solaris10 and 646/ASCII
conversion to UTF-8 works fine. But for other reasons I should continue
using gnu-libiconv.

-AT

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Philip Martin <ph...@wandisco.com>.
Alexander Thomas <al...@collab.net> writes:

> Code snippet produced "646". 
>
> "iconv -f 646 -t UTF-8 /dev/null" returned
> "iconv: conversion from `646' is not supported"

Google suggests you need to install SUNWuiu8 for 646 to work.

You could try setting the environment variable LANG=C, or some other
locale of your choice.

-- 
Philip

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Alexander Thomas <al...@collab.net>.
On Thu, 2010-06-10 at 18:23 +0200, Stefan Sperling wrote:
> On Wed, Jun 09, 2010 at 01:31:54PM +0200, Stefan Sperling wrote:
> > > PASS:  prop_tests.py 22: test prop* handle invalid property names
> >  
> > Hmmm...  I will try to debug this during the hackathon.
> 
> This is not a problem in Subversion.
> 
Yes its not something that need to be fixed in Subversion. Patch I
posted is just to suppress the failure, without changing context of this
testcase.

> The problem is way deeper, down in the iconv implementation,
> and possibly below that. It seems that the behaviour of the
> locale implementation within the C library can cause an error
> with GNU iconv when opening encoding/decoding code pages.
> 
> Alexander, what output does the small program below produce
> on your system?
> 
Code snippet produced "646". 

"iconv -f 646 -t UTF-8 /dev/null" returned
"iconv: conversion from `646' is not supported"




Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jun 09, 2010 at 01:31:54PM +0200, Stefan Sperling wrote:
> > PASS:  prop_tests.py 22: test prop* handle invalid property names
>  
> Hmmm...  I will try to debug this during the hackathon.

This is not a problem in Subversion.

The problem is way deeper, down in the iconv implementation,
and possibly below that. It seems that the behaviour of the
locale implementation within the C library can cause an error
with GNU iconv when opening encoding/decoding code pages.

Alexander, what output does the small program below produce
on your system?

Thanks,
Stefan


#include <stdio.h>
#include <nl_types.h>
#include <langinfo.h>

int main()
{
	printf("%s\n", nl_langinfo(CODESET));
}

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jun 09, 2010 at 12:15:58PM +0100, Philip Martin wrote:
> Stefan Sperling <st...@elego.de> writes:
> 
> > On Wed, Jun 09, 2010 at 12:36:31PM +0200, Stefan Sperling wrote:
> >> It would be great if you could build with --enable-maintainer-mode and
> >> show the error trace of the failing test. An easy way is to just post
> >> the entire output of ./prop_tests.py --verbose invalid_propnames
> >
> > It turns out that the same problem exists on my system (OpenBSD).
> >
> > Is anyone else seeing this? Is it new?
> 
> [...]
> 
> > CMD: svn propdel " --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
> > CMD: /home/stsp/svn/svn-trunk/subversion/svn/svn propdel --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom exited with 1
> > <TIME = 0.590402>
> > subversion/svn/propdel-cmd.c:79: (apr_err=22)
> > subversion/libsvn_subr/utf.c:729: (apr_err=22)
> > subversion/libsvn_subr/utf.c:711: (apr_err=22)
> > subversion/libsvn_subr/utf.c:558: (apr_err=22)
> > svn: Non-ASCII character (code 8) detected, and unable to convert to/from UTF-8
> > EXPECTED STDERR (regexp):
> > .*Attempting to delete nonexistent property '.*
> > ACTUAL STDERR:
> > subversion/svn/propdel-cmd.c:79: (apr_err=22)
> > subversion/libsvn_subr/utf.c:729: (apr_err=22)
> > subversion/libsvn_subr/utf.c:711: (apr_err=22)
> > subversion/libsvn_subr/utf.c:558: (apr_err=22)
> > svn: Non-ASCII character (code 8) detected, and unable to convert to/from UTF-8
> > EXCEPTION: SVNUnmatchedError
> 
> [...]
> 
> > FAIL:  prop_tests.py 22: test prop* handle invalid property names
> 
> It works on my Linux box using r952912:
> 
> CMD: svn propdel " --config-dir /home/pm/sw/subversion/obj2/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
> CMD: /home/pm/sw/subversion/obj2/subversion/svn/svn propdel --config-dir /home/pm/sw/subversion/obj2/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom exited with 1
> <TIME = 0.045972>
> ../src2/subversion/svn/propdel-cmd.c:151: (apr_err=195011)
> svn: Attempting to delete nonexistent property '
> 
> [...]
> 
> PASS:  prop_tests.py 22: test prop* handle invalid property names
 
Hmmm...  I will try to debug this during the hackathon.

Stefan

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Philip Martin <ph...@wandisco.com>.
Stefan Sperling <st...@elego.de> writes:

> On Wed, Jun 09, 2010 at 12:36:31PM +0200, Stefan Sperling wrote:
>> It would be great if you could build with --enable-maintainer-mode and
>> show the error trace of the failing test. An easy way is to just post
>> the entire output of ./prop_tests.py --verbose invalid_propnames
>
> It turns out that the same problem exists on my system (OpenBSD).
>
> Is anyone else seeing this? Is it new?

[...]

> CMD: svn propdel " --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
> CMD: /home/stsp/svn/svn-trunk/subversion/svn/svn propdel --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom exited with 1
> <TIME = 0.590402>
> subversion/svn/propdel-cmd.c:79: (apr_err=22)
> subversion/libsvn_subr/utf.c:729: (apr_err=22)
> subversion/libsvn_subr/utf.c:711: (apr_err=22)
> subversion/libsvn_subr/utf.c:558: (apr_err=22)
> svn: Non-ASCII character (code 8) detected, and unable to convert to/from UTF-8
> EXPECTED STDERR (regexp):
> .*Attempting to delete nonexistent property '.*
> ACTUAL STDERR:
> subversion/svn/propdel-cmd.c:79: (apr_err=22)
> subversion/libsvn_subr/utf.c:729: (apr_err=22)
> subversion/libsvn_subr/utf.c:711: (apr_err=22)
> subversion/libsvn_subr/utf.c:558: (apr_err=22)
> svn: Non-ASCII character (code 8) detected, and unable to convert to/from UTF-8
> EXCEPTION: SVNUnmatchedError

[...]

> FAIL:  prop_tests.py 22: test prop* handle invalid property names

It works on my Linux box using r952912:

CMD: svn propdel " --config-dir /home/pm/sw/subversion/obj2/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
CMD: /home/pm/sw/subversion/obj2/subversion/svn/svn propdel --config-dir /home/pm/sw/subversion/obj2/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom exited with 1
<TIME = 0.045972>
../src2/subversion/svn/propdel-cmd.c:151: (apr_err=195011)
svn: Attempting to delete nonexistent property '

[...]

PASS:  prop_tests.py 22: test prop* handle invalid property names

-- 
Philip

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jun 09, 2010 at 12:36:31PM +0200, Stefan Sperling wrote:
> It would be great if you could build with --enable-maintainer-mode and
> show the error trace of the failing test. An easy way is to just post
> the entire output of ./prop_tests.py --verbose invalid_propnames

It turns out that the same problem exists on my system (OpenBSD).

Is anyone else seeing this? Is it new?

Stefan

$ ./prop_tests.py --verbose invalid_propnames
CMD: svnadmin create svn-test-work/local_tmp/repos --bdb-txn-nosync
<TIME = 0.282043>
CMD: svn import -m "Log message for revision 1." svn-test-work/local_tmp/greekfiles file:///home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/repos --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 0.688225>
Adding         svn-test-work/local_tmp/greekfiles/A
Adding         svn-test-work/local_tmp/greekfiles/A/B
Adding         svn-test-work/local_tmp/greekfiles/A/B/lambda
Adding         svn-test-work/local_tmp/greekfiles/A/B/E
Adding         svn-test-work/local_tmp/greekfiles/A/B/E/alpha
Adding         svn-test-work/local_tmp/greekfiles/A/B/E/beta
Adding         svn-test-work/local_tmp/greekfiles/A/B/F
Adding         svn-test-work/local_tmp/greekfiles/A/mu
Adding         svn-test-work/local_tmp/greekfiles/A/C
Adding         svn-test-work/local_tmp/greekfiles/A/D
Adding         svn-test-work/local_tmp/greekfiles/A/D/gamma
Adding         svn-test-work/local_tmp/greekfiles/A/D/G
Adding         svn-test-work/local_tmp/greekfiles/A/D/G/rho
Adding         svn-test-work/local_tmp/greekfiles/A/D/G/pi
Adding         svn-test-work/local_tmp/greekfiles/A/D/G/tau
Adding         svn-test-work/local_tmp/greekfiles/A/D/H
Adding         svn-test-work/local_tmp/greekfiles/A/D/H/chi
Adding         svn-test-work/local_tmp/greekfiles/A/D/H/omega
Adding         svn-test-work/local_tmp/greekfiles/A/D/H/psi
Adding         svn-test-work/local_tmp/greekfiles/iota

Committed revision 1.
CMD: svnadmin create svn-test-work/repositories/prop_tests-22 --bdb-txn-nosync
<TIME = 0.286190>
CMD: svnadmin dump svn-test-work/local_tmp/repos | svnadmin load svn-test-work/repositories/prop_tests-22 --ignore-uuid
<TIME = 0.338485>
CMD: svn co file:///home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/repositories/prop_tests-22 svn-test-work/working_copies/prop_tests-22 --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
<TIME = 1.083201>
A    svn-test-work/working_copies/prop_tests-22/A
A    svn-test-work/working_copies/prop_tests-22/A/B
A    svn-test-work/working_copies/prop_tests-22/A/B/lambda
A    svn-test-work/working_copies/prop_tests-22/A/B/E
A    svn-test-work/working_copies/prop_tests-22/A/B/E/alpha
A    svn-test-work/working_copies/prop_tests-22/A/B/E/beta
A    svn-test-work/working_copies/prop_tests-22/A/B/F
A    svn-test-work/working_copies/prop_tests-22/A/mu
A    svn-test-work/working_copies/prop_tests-22/A/C
A    svn-test-work/working_copies/prop_tests-22/A/D
A    svn-test-work/working_copies/prop_tests-22/A/D/gamma
A    svn-test-work/working_copies/prop_tests-22/A/D/G
A    svn-test-work/working_copies/prop_tests-22/A/D/G/pi
A    svn-test-work/working_copies/prop_tests-22/A/D/G/rho
A    svn-test-work/working_copies/prop_tests-22/A/D/G/tau
A    svn-test-work/working_copies/prop_tests-22/A/D/H
A    svn-test-work/working_copies/prop_tests-22/A/D/H/chi
A    svn-test-work/working_copies/prop_tests-22/A/D/H/omega
A    svn-test-work/working_copies/prop_tests-22/A/D/H/psi
A    svn-test-work/working_copies/prop_tests-22/iota
Checked out revision 1.
CMD: svn propdel " --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom
CMD: /home/stsp/svn/svn-trunk/subversion/svn/svn propdel --config-dir /home/stsp/svn/svn-trunk/subversion/tests/cmdline/svn-test-work/local_tmp/config --password rayjandom --no-auth-cache --username jrandom exited with 1
<TIME = 0.590402>
subversion/svn/propdel-cmd.c:79: (apr_err=22)
subversion/libsvn_subr/utf.c:729: (apr_err=22)
subversion/libsvn_subr/utf.c:711: (apr_err=22)
subversion/libsvn_subr/utf.c:558: (apr_err=22)
svn: Non-ASCII character (code 8) detected, and unable to convert to/from UTF-8
EXPECTED STDERR (regexp):
.*Attempting to delete nonexistent property '.*
ACTUAL STDERR:
subversion/svn/propdel-cmd.c:79: (apr_err=22)
subversion/libsvn_subr/utf.c:729: (apr_err=22)
subversion/libsvn_subr/utf.c:711: (apr_err=22)
subversion/libsvn_subr/utf.c:558: (apr_err=22)
svn: Non-ASCII character (code 8) detected, and unable to convert to/from UTF-8
EXCEPTION: SVNUnmatchedError
Traceback (most recent call last):
  File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/main.py", line 1233, in run
    rc = self.pred.run(sandbox)
  File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/testcase.py", line 160, in run
    return self.func(sandbox)
  File "./prop_tests.py", line 1429, in invalid_propnames
    'propdel', propname)
  File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 223, in run_and_verify_svn
    expected_exit, *varargs)
  File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/actions.py", line 262, in run_and_verify_svn2
    verify.verify_outputs(message, out, err, expected_stdout, expected_stderr)
  File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/verify.py", line 342, in verify_outputs
    compare_and_display_lines(message, label, expected, actual, raisable)
  File "/home/stsp/svn/svn-trunk/subversion/tests/cmdline/svntest/verify.py", line 315, in compare_and_display_lines
    raise raisable
SVNUnmatchedError
FAIL:  prop_tests.py 22: test prop* handle invalid property names
$

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Alexander Thomas <al...@collab.net>.
On Wed, 2010-06-09 at 12:36 +0200, Stefan Sperling wrote:
> On Wed, Jun 09, 2010 at 02:03:01PM +0530, Alexander Thomas wrote:

> > > The test used to check for an unprintable ascii character (backspace).
> > > With this patch, it checks for an empty string.
> > > I'm not sure if this is a good thing to do.
> > > 
> > I meant to use chr(32) and not an empty string. Subversion will treat
> > propnames starting with space as invalid.
> > Should I post another patch?
> 
> char(32) is ascii '2'.

Decimal 32 not hex.

> 
> I don't know the naming rules of svn off-hand. Is the test trying
> to use a non-printable character on purpose? If so, we should keep
> using a non-printable character.
> 
prop_test.py:invalid_propnames() tests prop commands on invalid
propname, don't have anything to do with non-printable characters.

> > > In what way does chr(8) make this test fail on Solaris?
> > prop commands errors with "svn: Non-ASCII character (code 8) detected,
> > and unable to convert to/from UTF-8" in solaris. I tried different
> > non-printable characters which resulted in same error.
> 
> That sounds like a problem with your build, or with your locale
> settings.
> 
> Since ASCII is a subset of UTF-8, these errors usually show when people
> try using characters that are not in ascii, and do not have and iconv
> implementation linked into apr-util. I don't think this applies in your
> case, but we should still check.
> 
> Do you have apr-util linked to an iconv implementation (GNU libiconv
> or APR iconv)? If apr-util has no iconv, Subversion won't be able
> to convert anything from/to UTF-8.
> 
Completely agree with you. I can't explain why my system misbehaves. All
my binaries are linked to 1.12 version of GNU libiconv, also LC_ALL set
to en_US.UTF-8.

> Do the utf tests in subversion/tests/libsvn_subr/utf_tests.c pass for you?
> If they don't pass, then you're trying to fix the wrong problem.
> If they do pass, we'll need to dig deeper and determine why the prop
> test is failing for you.
> 
prop_test.py:invalid_propnames is the only one that is failing.

> It would be great if you could build with --enable-maintainer-mode and
> show the error trace of the failing test. An easy way is to just post
> the entire output of ./prop_tests.py --verbose invalid_propnames

here is last part of the entire output.

[[[
CMD: svn propdel "
--config-dir /tmp/tmp.PNaiJc/svn-test-work/local_tmp/config --password
rayjandom --no-auth-cache --username jrandom
CMD: /opt/CollabNet_Subversion/bin/svn propdel
--config-dir /tmp/tmp.PNaiJc/svn-test-work/local_tmp/config --password
rayjandom --no-auth-cache --username jrandom exited with 1
<TIME = 0.253850>
svn: Non-ASCII character (code 8) detected, and unable to convert
to/from UTF-8
EXPECTED STDERR (regexp):
.*Attempting to delete nonexistent property '.*
ACTUAL STDERR:
svn: Non-ASCII character (code 8) detected, and unable to convert
to/from UTF-8
EXCEPTION: SVNUnmatchedError
Traceback (most recent call last):
  File "/tmp/tmp.PNaiJc/tests/cmdline/svntest/main.py", line 1333, in
run
    rc = self.pred.run(**kw)
  File "/tmp/tmp.PNaiJc/tests/cmdline/svntest/testcase.py", line 121, in
run
    return self.func(sandbox)
  File "tests/cmdline/prop_tests.py", line 1463, in invalid_propnames
    'propdel', propname)
  File "/tmp/tmp.PNaiJc/tests/cmdline/svntest/actions.py", line 208, in
run_and_verify_svn
    expected_exit, *varargs)
  File "/tmp/tmp.PNaiJc/tests/cmdline/svntest/actions.py", line 242, in
run_and_verify_svn2
    verify.verify_outputs(message, out, err, expected_stdout,
expected_stderr)
  File "/tmp/tmp.PNaiJc/tests/cmdline/svntest/verify.py", line 350, in
verify_outputs
    compare_and_display_lines(message, label, expected, actual,
raisable)
  File "/tmp/tmp.PNaiJc/tests/cmdline/svntest/verify.py", line 322, in
compare_and_display_lines
    raise raisable
SVNUnmatchedError
FAIL:  prop_tests.py 22: test prop* handle invalid property names
]]]


Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jun 09, 2010 at 02:03:01PM +0530, Alexander Thomas wrote:
> On Wed, 2010-06-09 at 09:51 +0200, Stefan Sperling wrote:
> > On Wed, Jun 09, 2010 at 12:55:26PM +0530, Alexander Thomas wrote:
> > > [[[
> > > Replace existing invalid propname to make test pass in Solaris.
> > > 
> > > * subversion/tests/cmdline/prop_tests.py
> > >   (invalid_propnames): Changed propname to empty char.
> > > ]]]
> > > 
> > > 
> > > -Alexander Thomas (AT)
> > 
> > > Index: subversion/tests/cmdline/prop_tests.py
> > > ===================================================================
> > > --- subversion/tests/cmdline/prop_tests.py	(revision 952911)
> > > +++ subversion/tests/cmdline/prop_tests.py	(working copy)
> > > @@ -1420,7 +1420,7 @@
> > >    cwd = os.getcwd()
> > >    os.chdir(wc_dir)
> > >  
> > > -  propname = chr(8)
> > > +  propname = ''
> > 
> > The test used to check for an unprintable ascii character (backspace).
> > With this patch, it checks for an empty string.
> > I'm not sure if this is a good thing to do.
> > 
> I meant to use chr(32) and not an empty string. Subversion will treat
> propnames starting with space as invalid.
> Should I post another patch?

char(32) is ascii '2'.

I don't know the naming rules of svn off-hand. Is the test trying
to use a non-printable character on purpose? If so, we should keep
using a non-printable character.

> > In what way does chr(8) make this test fail on Solaris?
> prop commands errors with "svn: Non-ASCII character (code 8) detected,
> and unable to convert to/from UTF-8" in solaris. I tried different
> non-printable characters which resulted in same error.

That sounds like a problem with your build, or with your locale
settings.

Since ASCII is a subset of UTF-8, these errors usually show when people
try using characters that are not in ascii, and do not have and iconv
implementation linked into apr-util. I don't think this applies in your
case, but we should still check.

Do you have apr-util linked to an iconv implementation (GNU libiconv
or APR iconv)? If apr-util has no iconv, Subversion won't be able
to convert anything from/to UTF-8.

Do the utf tests in subversion/tests/libsvn_subr/utf_tests.c pass for you?
If they don't pass, then you're trying to fix the wrong problem.
If they do pass, we'll need to dig deeper and determine why the prop
test is failing for you.

It would be great if you could build with --enable-maintainer-mode and
show the error trace of the failing test. An easy way is to just post
the entire output of ./prop_tests.py --verbose invalid_propnames

Thanks,
Stefan

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Alexander Thomas <al...@collab.net>.
On Wed, 2010-06-09 at 09:51 +0200, Stefan Sperling wrote:
> On Wed, Jun 09, 2010 at 12:55:26PM +0530, Alexander Thomas wrote:
> > [[[
> > Replace existing invalid propname to make test pass in Solaris.
> > 
> > * subversion/tests/cmdline/prop_tests.py
> >   (invalid_propnames): Changed propname to empty char.
> > ]]]
> > 
> > 
> > -Alexander Thomas (AT)
> 
> > Index: subversion/tests/cmdline/prop_tests.py
> > ===================================================================
> > --- subversion/tests/cmdline/prop_tests.py	(revision 952911)
> > +++ subversion/tests/cmdline/prop_tests.py	(working copy)
> > @@ -1420,7 +1420,7 @@
> >    cwd = os.getcwd()
> >    os.chdir(wc_dir)
> >  
> > -  propname = chr(8)
> > +  propname = ''
> 
> The test used to check for an unprintable ascii character (backspace).
> With this patch, it checks for an empty string.
> I'm not sure if this is a good thing to do.
> 
I meant to use chr(32) and not an empty string. Subversion will treat
propnames starting with space as invalid.
Should I post another patch?

> In what way does chr(8) make this test fail on Solaris?
prop commands errors with "svn: Non-ASCII character (code 8) detected,
and unable to convert to/from UTF-8" in solaris. I tried different
non-printable characters which resulted in same error.

> Maybe we can find a better solution?
> 

do you have anything in mind?

Re: [PATCH] Fixing prop_tests.py failure in Solaris

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Jun 09, 2010 at 12:55:26PM +0530, Alexander Thomas wrote:
> [[[
> Replace existing invalid propname to make test pass in Solaris.
> 
> * subversion/tests/cmdline/prop_tests.py
>   (invalid_propnames): Changed propname to empty char.
> ]]]
> 
> 
> -Alexander Thomas (AT)

> Index: subversion/tests/cmdline/prop_tests.py
> ===================================================================
> --- subversion/tests/cmdline/prop_tests.py	(revision 952911)
> +++ subversion/tests/cmdline/prop_tests.py	(working copy)
> @@ -1420,7 +1420,7 @@
>    cwd = os.getcwd()
>    os.chdir(wc_dir)
>  
> -  propname = chr(8)
> +  propname = ''

The test used to check for an unprintable ascii character (backspace).
With this patch, it checks for an empty string.
I'm not sure if this is a good thing to do.

In what way does chr(8) make this test fail on Solaris?
Maybe we can find a better solution?

Thanks,
Stefan

>    propval = 'foo'
>  
>    expected_stderr = (".*Attempting to delete nonexistent property "