This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] Some testcases for long long bitfields


Paul Hilfinger wrote:
I believe that the following revision of the bitfields2 test (for
bitfields in long long fields) addresses Andrew's comments.  I have
tested it on i686 GNU/Linux with GCC 3.2.3.  OK?

Some specifics:


- Why? Or is this really a known bug?

+ if $no_signed then {
+ setup_xfail "*-*-*"
+ }
+ set test "set long long signed bitfield negative"
+ gdb_test_multiple "print flags.s2 = -1" $test {
+ -re "warning: Value does not fit.*$gdb_prompt $" {
+ fail "$test"
+ gdb_suppress_tests
+ }
+ -re "= -1.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }


Well, this is what bitfields does, which is what I used as a model. On reflection, however, it seems to me that XFAIL is inappropriate, since if
there is a failure here, it is most likely due to the fact the compiler
being used does not support signed bitfields---that is, a compiler for which !defined(__STDC__) && !defined(__cplusplus) and which interprets
bitfields as unsigned. So it seems that the tests ought to be considered
unsupported instead, and I have made that change. But that merely changes
your question to "ARE there any compilers we need worry about with this
property". I have no idea, but other testcases seem to be written as if
there are.

True, ok.


- delete this:
+if [istarget "mips-idt-*"] then {
+    # Restart because IDT/SIM runs out of file descriptors.
+    gdb_exit
+    gdb_start
+    gdb_reinitialize_dir $srcdir/$subdir
+    gdb_load ${binfile}
+}


Done.  I observe, by the way, that this same code appears in several
existing tests: bitfields, funcargs, opaque, scope.


perhaps think about what I did for the sig*.exp tests - have main as a loop so that it looped around after each test sequence was finished - will on remote systems improve the performance somewhat. But what ever.


OK. I have made a variant of this change that does not use GDB to modify the
control flow of the program.

Thanks! Ok for commit.


Andrew


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