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]

Re: MI failures related to string printing


 > Don't you think that a test that randomly fails depending on compiler
 > version and the address at which the binary happens to load is completely
 > useless.  

It has value because it doesn't fail for everyone.

 >           If I see it fail, how do I know if it signifies a bug in my (new)
 > code, or not?

By keeping the previous results and comparing them.  I always get many fails
when I run the testsuite.

 > > I'm sure it can be modified to always pass but that's only worthwhile if
 > > it remains a meaningful test.  I don't know how to devise such a test
 > > because it doesn't fail for me now.
 > 
 > You just need to make sure the testcase never uses char* values that point
 > to a single char, by making all single-char value char arrays of size 2
 > where the second element is zero, or by any other approach.

I'm not sure that this would work and anyway I couldn't test it, but you could.

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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