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: Don't include value of expression in pc-fp.exp test name


Andrew Cagney writes:
> Michael, you and I had an e-mail exchange about this very issue.  The 
> end result, last time, was no change.

Right.  You think there's a convention about "(...)",
and I think there isn't.  Neither of us has changed our minds.

Fact: there are 1500+ test names with "(...)" in them.

Question: do you think these test names are written incorrectly?

If so, do you have any suggestions for alternate ways to rewrite
test names such as: 

  # parentheses used for precedence
  gdb.base/arithmet.exp: print x-(y+w)
  gdb.base/arithmet.exp: print x/(y*w)
  gdb.base/arithmet.exp: print x-(y/w)
  gdb.base/arithmet.exp: print (x+y)*w

  # parentheses used for function calls
  gdb.base/call-ar-st.exp: print print_double_array(double_array)
  gdb.base/call-ar-st.exp: print print_char_array(char_array)
  gdb.base/call-ar-st.exp: print print_double_array(array_d)
  gdb.base/call-ar-st.exp: print sum_array_print(10, *list1, *list2, *list3, *list4)
  gdb.base/call-ar-st.exp: print print_array_rep(*list1, *list2, *list3)

  # parentheses used for casts
  gdb.base/cvexpr.exp: (const char)
  gdb.base/cvexpr.exp: (const signed char)
  gdb.base/cvexpr.exp: (const unsigned char)
  gdb.base/cvexpr.exp: (const short)
  gdb.base/cvexpr.exp: (const signed short)
  gdb.base/cvexpr.exp: (const unsigned short)
  gdb.base/cvexpr.exp: (const int)
  gdb.base/cvexpr.exp: (const signed int)
  gdb.base/cvexpr.exp: (const unsigned int)

I am really adamant on this question.  Either "(...)" is legal to use
in test names and this line of your script is wrong:

    gsub (/ *\([^)]*\)/, "", test)

Or "(...)" is not legal to use in test names and we have 100+ test scripts
which are buggy and need to be patched.

Which is it?

If you want to say that "// ..." is a way of adding information,
then I would be okay with that, because I don't have any results
with "// ..." in the test name.

> For instance sizeof.exp contains various tests to check that sizes are 
> sane.  The actual sizes found are included in the output.  That's fine 
> since if the numbers were to change between runs the test results are 
> pretty sunk.

Sure, this part is fine.

Michael C


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