From: Antoine Tremblay <antoine.tremblay@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Antoine Tremblay <antoine.tremblay@ericsson.com>
Subject: [PATCH 4/4] Add tests for 64bit values in trace-condition.exp
Date: Tue, 17 May 2016 17:03:00 -0000 [thread overview]
Message-ID: <1463504594-4419-4-git-send-email-antoine.tremblay@ericsson.com> (raw)
In-Reply-To: <1463504594-4419-1-git-send-email-antoine.tremblay@ericsson.com>
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 | 36 +++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gdb/testsuite/gdb.trace/trace-condition.exp b/gdb/testsuite/gdb.trace/trace-condition.exp
index 8c770f4..4e129e8 100644
--- a/gdb/testsuite/gdb.trace/trace-condition.exp
+++ b/gdb/testsuite/gdb.trace/trace-condition.exp
@@ -163,4 +163,40 @@ foreach trace_command { "trace" "ftrace" } {
test_tracepoints $trace_command "(42 >= 42 ? 0 : 1) == 0" 10
test_tracepoints $trace_command "(42 > 21 ? 0 : 1) == 0" 10 18955_i386_failure
test_tracepoints $trace_command "\$trace_timestamp >= 0" 10
+
+ #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
}
--
2.8.1
next prev parent reply other threads:[~2016-05-17 17:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-17 17:03 [PATCH 1/4] Move trace conditions tests from ftrace.exp to trace-condition.exp Antoine Tremblay
2016-05-17 17:03 ` [PATCH 2/4] Add emit_less_unsigned test in trace-condition.exp Antoine Tremblay
2016-05-27 12:02 ` Pedro Alves
2016-05-27 12:36 ` Antoine Tremblay
2016-05-17 17:03 ` Antoine Tremblay [this message]
2016-05-27 12:08 ` [PATCH 4/4] Add tests for 64bit values " Pedro Alves
2016-05-27 12:36 ` Antoine Tremblay
2016-05-17 17:03 ` [PATCH 3/4] Add variable length tests for emit_ref " Antoine Tremblay
2016-05-27 12:05 ` Pedro Alves
2016-05-27 13:04 ` Antoine Tremblay
2016-05-27 12:00 ` [PATCH 1/4] Move trace conditions tests from ftrace.exp to trace-condition.exp Pedro Alves
2016-05-27 12:35 ` Antoine Tremblay
2016-05-27 12:48 ` Pedro Alves
2016-05-27 12:51 ` Antoine Tremblay
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=1463504594-4419-4-git-send-email-antoine.tremblay@ericsson.com \
--to=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