This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: remove failing python test


I'm checking this in.

This test was failing on my x86 box:

    gdb_test "python print one.__hash__() == id(one)" "True" "Test inbuilt id"

I tracked this down to a difference between Python's built in "id"
function and Value.__hash__: we sign extend and id does not.

We could fix this difference, but there is really nothing too wrong with
our hash function, and I don't think it is advisable to rely on exactly
how 'id' is implemented.

So, I'm removing the test.

Tom

2010-06-04  Tom Tromey  <tromey@redhat.com>

	* gdb.python/py-value.exp (test_value_hash): Don't test equality
	of hash and id.

Index: gdb.python/py-value.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.python/py-value.exp,v
retrieving revision 1.11
diff -u -r1.11 py-value.exp
--- gdb.python/py-value.exp	3 Jun 2010 23:54:18 -0000	1.11
+++ gdb.python/py-value.exp	4 Jun 2010 16:32:26 -0000
@@ -406,7 +406,6 @@
     gdb_test "python print vdict\[two\]" "two str" "Test dictionary hash"
     gdb_test "python print vdict\[three\]" "three str" "Test dictionary hash"
     gdb_test "python print one.__hash__() == hash(one)" "True" "Test inbuilt hash"
-    gdb_test "python print one.__hash__() == id(one)" "True" "Test inbuilt id"
 }
 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]