[ovs-git] Open vSwitch: tests: Fix the two Python XFAIL tests. (master)

dev at openvswitch.org dev at openvswitch.org
Tue May 24 18:34:53 UTC 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  be44585c21cc8dbe097a460a930696f0350dc12d (commit)
      from  19997ceee06cec2ce1f36ebfc225fa379b6b1ed0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit be44585c21cc8dbe097a460a930696f0350dc12d
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=be44585c21cc8dbe097a460a930696f0350dc12d
Author: Ben Pfaff <blp at nicira.com>
		
tests: Fix the two Python XFAIL tests.
		
OVS has two Python tests that have always failed, for reasons not
understood, since they were added to the tree.  This commit fixes them.

One problem was that Python was assuming that stdout was encoded in ASCII.
Apparently the only way to "fix" this at runtime is to set PYTHONIOENCODING
to utf_8 in the environment, so this change does that.

Second, it appears that Python really doesn't like to print invalid UTF-8,
so this avoids doing that in python/ovs/json.py, instead just printing
the hexadecimal values of the invalid bytes.  For consistency, it makes
the same change to the C version.

Third, the C version of test-ovsdb doesn't check UTF-8 for consistency, it
just sends it blindly to the OVSDB server, but Python does check it and so
it bails out earlier.  This commit changes the Python version of the
"no invalid UTF-8 sequences in strings" to allow for the slight difference
in output that occurs for that reason.

Finally, test-ovsdb.py needs to convert error messages to Unicode
explicitly before printing them in the "parse-atoms" function.  I don't
really understand why, but now it works.


-----------------------------------------------------------------------

Summary of changes:
 lib/ovsdb-data.c    |    3 +--
 python/ovs/json.py  |    6 ++----
 tests/atlocal.in    |    3 +++
 tests/ovsdb-data.at |   25 +++++++++++++++++++------
 tests/test-ovsdb.py |    6 +-----
 5 files changed, 26 insertions(+), 17 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list