From: Pedro Alves <palves@redhat.com>
To: Antoine Tremblay <antoine.tremblay@ericsson.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH 5/5 v2] Add tests for 64bit values in trace-condition.exp
Date: Mon, 30 May 2016 11:02:00 -0000 [thread overview]
Message-ID: <dafaace2-d353-bbb8-9b32-8c5c3c4e5ed0@redhat.com> (raw)
In-Reply-To: <1464375916-16369-5-git-send-email-antoine.tremblay@ericsson.com>
On 05/27/2016 08:05 PM, Antoine Tremblay wrote:
> This patch adds tests for emit operations with 64 bit values. It takes
> special care to avoid mistakes that one could make on a 32bit architecture
> using 64bit values.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.trace/trace-condition.exp: Add 64bit tests.
> ---
> gdb/testsuite/gdb.trace/trace-condition.exp | 73 +++++++++++++++++++++++++++++
> 1 file changed, 73 insertions(+)
>
> diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp
> index b7551b1..3f35489 100644
> --- a/gdb/testsuite/gdb.trace/trace-condition.exp
> +++ b/gdb/testsuite/gdb.trace/trace-condition.exp
> @@ -187,4 +187,77 @@ foreach trace_command { "trace" "ftrace" } {
> test_tracepoints $trace_command "(66 <= 42 ? 0 : 1) == 0" 0
> test_tracepoints $trace_command "(11 >= 42 ? 0 : 1) == 0" 0
> test_tracepoints $trace_command "(11 > 21 ? 0 : 1) == 0" 0 18955_i386_failure
> +
> + # Test operations with 64 bit operands.
> + test_tracepoints $trace_command "0xabababab00000000 == 0xcdcdcdcd00000000" 0
> + test_tracepoints $trace_command "!0xabababab00000000 == 0" 10
> + test_tracepoints $trace_command "0xababababcdcdcdcd + 0x1111111143434343 == 0xbcbcbcbd11111110" 10
> + test_tracepoints $trace_command "0xababababcdcdcdcd - 0x11111111dc111111 == 0x9a9a9a99f1bcbcbc" 10
> + test_tracepoints $trace_command "0xababababcdcdcdcd * 0xababababcdcdcdcd == 0x55320eeb91c3f629" 10
> + test_tracepoints $trace_command "0x00abababcdcdcdcd << 1 == 0x15757579b9b9b9a" 10
> + test_tracepoints $trace_command "0x00abababcdcdcdcd << 46 == 0x7373400000000000" 10
> + # signed rsh
> + test_tracepoints $trace_command "0x00abababcdcdcdcd >> 1 == 0x55d5d5e6e6e6e6" 10
> + test_tracepoints $trace_command "0x00abababcdcdcdcd >> 46 == 0x2ae" 10
> + # unsigned rsh
> + test_tracepoints $trace_command "0xababababcdcdcdcdUL >> 1 == 0x55d5d5d5e6e6e6e6UL" 10
> + test_tracepoints $trace_command "0xababababcdcdcdcdUL >> 46 == 0x2aeaeUL" 10
> + test_tracepoints $trace_command "-(0x00abababcdcdcdcd << 1) == -0x15757579b9b9b9a" 10
> + test_tracepoints $trace_command "-(0x00abababcdcdcdcd >> 1) == -0x55d5d5e6e6e6e6" 10
> + test_tracepoints $trace_command "(0xababababcdcdcdcd & 0x00000fffffffffff) == 0x00000babcdcdcdcd" 10
> + test_tracepoints $trace_command "(0xababababcdcdcdcd | 0x00000fffffffffff) == 0xababafffffffffff" 10
> + test_tracepoints $trace_command "(0xaaaaaaaaaaaaaaaa ^ 0x5555555555555555) == 0xffffffffffffffff" 10
> + test_tracepoints $trace_command "~0xaaaaaaaaaaaaaaaa == 0x5555555555555555" 10
> + # less unsigned
> + test_tracepoints $trace_command "0x99999999bbbbbbbb < 0xaaaaaaaaaaaaaaaa" 10
> + test_tracepoints $trace_command "0x99999999bbbbbbbb < 0x99999999cccccccc" 10
> + test_tracepoints $trace_command "0x99999999bbbbbbbb <= 0x99999999bbbbbbbb" 10
> + # less signed
> + test_tracepoints $trace_command "0x09999999bbbbbbbb < 0x0aaaaaaaaaaaaaaa" 10
> + test_tracepoints $trace_command "0x09999999bbbbbbbb < 0x09999999cccccccc" 10
> + test_tracepoints $trace_command "0x09999999bbbbbbbb <= 0x09999999bbbbbbbb" 10
> + test_tracepoints $trace_command "0x0aaaaaaaaaaaaaaa > 0x09999999bbbbbbbb" 10
> + test_tracepoints $trace_command "(0xabababab00000000 == 0xcdcdcdcd00000000 ? 1 : 0) == 0" 10
> + test_tracepoints $trace_command "(0xabababab00000000 != 0xcdcdcdcd00000000 ? 1 : 0) == 1" 10
> + test_tracepoints $trace_command "(0x09999999bbbbbbbb < 0x09999999cccccccc ? 1 : 0) == 1" 10 18955_i386_failure
> + test_tracepoints $trace_command "(0x09999999bbbbbbbb <= 0x09999999bbbbbbbb ? 1 : 0) == 1" 10
> + test_tracepoints $trace_command "(0x09999999bbbbbbbb >= 0x09999999bbbbbbbb ? 1 : 0) == 1" 10
> + test_tracepoints $trace_command "(0x0aaaaaaaaaaaaaaa > 0x09999999bbbbbbbb ? 1 : 0) == 1" 10
> +
> + # Counter-cases test operations with 64 bit operands.
> + test_tracepoints $trace_command "0xabababab00000000 == 0xabababab00000000" 10
> + test_tracepoints $trace_command "!0x0 == 0" 0
> + test_tracepoints $trace_command "0xababababcdcdcdff + 0x1111111143434343 == 0xbcbcbcbd11111110" 0
> + test_tracepoints $trace_command "0xababababcdcdcdff - 0x11111111dc111111 == 0x9a9a9a99f1bcbcbc" 0
> + test_tracepoints $trace_command "0xababababcdcdcdff * 0xababababcdcdcdcd == 0x55320eeb91c3f629" 0
> + test_tracepoints $trace_command "0x00abababcdcdcdff << 1 == 0x15757579b9b9b9a" 0
> + test_tracepoints $trace_command "0x00abababcdcdcdff << 46 == 0x7373400000000000" 0
> + # signed rsh
> + test_tracepoints $trace_command "0x00bcababcdcdcdcd >> 1 == 0x55d5d5e6e6e6e6" 0
> + test_tracepoints $trace_command "0x00bcababcdcdcdcd >> 46 == 0x2ae" 0
> + # unsigned rsh
> + test_tracepoints $trace_command "0xcdabababcdcdcdcdUL >> 1 == 0x55d5d5d5e6e6e6e6UL" 0
> + test_tracepoints $trace_command "0xcdabababcdcdcdcdUL >> 46 == 0x2aeaeUL" 0
> + test_tracepoints $trace_command "-(0x00abababcdcdcdff << 1) == -0x15757579b9b9b9a" 0
> + test_tracepoints $trace_command "-(0x00cdababcdcdcdcd >> 1) == -0x55d5d5e6e6e6e6" 0
> + test_tracepoints $trace_command "(0xababababcdcdcdcd & 0x00000fffffffff00) == 0x00000babcdcdcdcd" 0
> + test_tracepoints $trace_command "(0xababababcdcdcdcd | 0x00000fffffffff00) == 0xababafffffffffff" 0
> + test_tracepoints $trace_command "(0xaaaaaaaaaaaaaaaa ^ 0x5555555555555111) == 0xffffffffffffffff" 0
> + test_tracepoints $trace_command "~0xaaaaaaaaaaaaaaaa == 0x5555555555555111" 0
> + # less unsigned
> + test_tracepoints $trace_command "0xbb999999bbbbbbbb < 0xaaaaaaaaaaaaaaaa" 0
> + test_tracepoints $trace_command "0x99999999eebbbbbb < 0x99999999cccccccc" 0
> + test_tracepoints $trace_command "0xbb999999eebbbbbb <= 0x99999999bbbbbbbb" 0
> + # less signed
> + test_tracepoints $trace_command "0x0bb99999ccbbbbbb < 0x0aaaaaaaaaaaaaaa" 0
> + test_tracepoints $trace_command "0x09999999ddbbbbbb < 0x09999999cccccccc" 0
> + test_tracepoints $trace_command "0x0aa99999bbbbbbbb <= 0x09999999bbbbbbbb" 0
> + test_tracepoints $trace_command "0x088aaaaabbaaaaaa > 0x09999999bbbbbbbb" 0
> + test_tracepoints $trace_command "(0xcdcdcdcd00000000 == 0xcdcdcdcd00000000 ? 1 : 0) == 0" 0
> + test_tracepoints $trace_command "(0xcdcdcdcd00000000 != 0xcdcdcdcd00000000 ? 1 : 0) == 1" 0
> + test_tracepoints $trace_command "(0x09999999eeebbbbb < 0x09999999cccccccc ? 1 : 0) == 1" 0 18955_i386_failure
> + test_tracepoints $trace_command "(0x09999999eeebbbbb <= 0x09999999bbbbbbbb ? 1 : 0) == 1" 0
> + test_tracepoints $trace_command "(0x00099999bbbbbbbb >= 0x09999999bbbbbbbb ? 1 : 0) == 1" 0
> + test_tracepoints $trace_command "(0x00088888ccaaaaaa > 0x09999999bbbbbbbb ? 1 : 0) == 1" 0
> +
> }
>
Same comment on splitting the counter-cases to their own section.
It's very hard to match the counter-case with the corresponding "case"
test this way IMO. Could you resort please? Maybe even add an empty
line between each pair of case/counter-case, for added legibility.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2016-05-30 11:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-27 19:05 [PATCH 1/5] Add counter-cases for trace-condition.exp tests Antoine Tremblay
2016-05-27 19:05 ` [PATCH 3/5 v2] Add emit_less_unsigned test in trace-condition.exp Antoine Tremblay
2016-05-30 11:02 ` Pedro Alves
2016-05-27 19:05 ` [PATCH 4/5 v2] Add variable length tests for emit_ref " Antoine Tremblay
2016-05-30 11:02 ` Pedro Alves
2016-05-27 19:05 ` [PATCH 2/5 v2] Move trace conditions tests from ftrace.exp to trace-condition.exp Antoine Tremblay
2016-05-30 11:02 ` Pedro Alves
2016-05-27 19:05 ` [PATCH 5/5 v2] Add tests for 64bit values in trace-condition.exp Antoine Tremblay
2016-05-30 11:02 ` Pedro Alves [this message]
2016-05-30 14:50 ` [PATCH 5/5 v3] " Antoine Tremblay
2016-05-30 15:06 ` Pedro Alves
2016-05-30 16:55 ` Antoine Tremblay
2016-05-30 10:50 ` [PATCH 1/5] Add counter-cases for trace-condition.exp tests Pedro Alves
2016-05-30 14:20 ` Antoine Tremblay
2016-05-30 14:48 ` [PATCH 1/5 v3] " Antoine Tremblay
2016-05-30 15:06 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dafaace2-d353-bbb8-9b32-8c5c3c4e5ed0@redhat.com \
--to=palves@redhat.com \
--cc=antoine.tremblay@ericsson.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox