From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17218 invoked by alias); 3 Oct 2016 19:17:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 17207 invoked by uid 89); 3 Oct 2016 19:17:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=disturb, breakpoints, read-write, 5* X-HELO: sessmg22.ericsson.net Received: from sessmg22.ericsson.net (HELO sessmg22.ericsson.net) (193.180.251.58) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Oct 2016 19:17:46 +0000 Received: from ESESSHC017.ericsson.se (Unknown_Domain [153.88.183.69]) by (Symantec Mail Security) with SMTP id BD.B9.02458.6DEA2F75; Mon, 3 Oct 2016 21:17:43 +0200 (CEST) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.69) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 3 Oct 2016 21:17:42 +0200 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=simon.marchi@ericsson.com; Received: from elxcz23q12-y4.dyn.mo.ca.am.ericsson.se (192.75.88.130) by DBXPR07MB399.eurprd07.prod.outlook.com (10.141.14.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.649.16; Mon, 3 Oct 2016 19:17:41 +0000 From: Simon Marchi To: CC: Simon Marchi Subject: [PATCH] gdb.btrace/*.exp: Make test names unique Date: Mon, 03 Oct 2016 19:17:00 -0000 Message-ID: <20161003191729.1412-1-simon.marchi@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: BLUPR15CA0027.namprd15.prod.outlook.com (10.163.78.37) To DBXPR07MB399.eurprd07.prod.outlook.com (10.141.14.149) X-MS-Office365-Filtering-Correlation-Id: 6c6e1021-795e-48c2-0a6c-08d3ebc1f24b X-Microsoft-Exchange-Diagnostics: 1;DBXPR07MB399;2:A7O08GMJxaHtA1qbZdiBXc3l+wj5YHO0FK53MDsooa1xjhEKXEkJlOZLw8n/KbhGirh9ukfCDzLKQe4EzUKSxrdocu5+NgOQW+vFisIjM9o81jwWLqGLycISPOGHSR7J/vMuMEj9K7KGs1A3vVAQPkosjvi8dDXIqar63zEKH6YRYMp0vuGJFvoH0+e65bETHdS3Eo8HThNb13/wRq/4mg==;3:XngqgC6LU0HMgnABRtwgus4CmiSdHKnrRAvQqD502Mi3jNZmwKa7y9SJrojp4j2sh//vvVdH+3KjUgtW6wVvZGZDLWEkZbpeDJHnlAjogNDo6iVGGYvmKHdWLxWoPzmpHhpBMdIgZ9d9HNAm1YEF7g==;25:A82T72MWa94ikKPvoLg0ECFHTEefDNuA1+CTyLggkSRqEtk5TQDCP+n+dj3f0rhWQ/wl5TTkl9uHWl9MKwHH8jJ3TOTRa5jaKeG+3WMBKpKg3jXs15t9MvnISnre8zt4/rhzjCAD5RidfDWhuvlr2Mziq00lv7oFmbf4SnNbm2RfDT7ojiR758cXZn7Os1kLrpel8y41e1bPJJd6ZEqF+SOnW+LuRaKq3QDwfE2zCFWqQOKzSI6dMdzt1EU3UbPMWlhUFiLrCwUuPvnrCPQBvQukbzlHYa9ru2fukzZLgoazyTPSLWThMGmvjKkt2mbLayPDj2yWsYIuh4u959DZ3ITmBkjZe19YbFSjsbhSNIqUDH2xu4qkcfIqgV6ExbxA0xfpoCSKRf97RcqmVtEUczyKd+AdguLK11BaBciF6RXWAkJO/FqnvrGhJZpywvT3 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DBXPR07MB399; X-Microsoft-Exchange-Diagnostics: 1;DBXPR07MB399;31:JqtQ0UmtbZ3DhbWJxweZprxLg9qxgMlVv+QsJlx1T6cujP8XtyTk3QcjKPfLWJ8/x+9Q6a5jz59dZMaxpZbadXkuK36Zgc3CFxFcESIxRl8v89GzzMZL55ZbnUk1DNmscnxbcrcH7BiZx0WjZPdos2hFzQSsE+zdPnASEtX+LkNQP/6x6yiVxFN7P1rR5KDbHRp8ZDtKkf/p8wJfoyd9FEXPjhNbUdf4nbgSsofa6z4PraZjm4dChNNvwdaWG2wG;20:xeegUB49An5ven0lahThTk95SQuHp73LW0K/q0Hh9IcPZC8vdCsAm3c+d71pv6MnHwpDL6a93H7/+GPTy9khJ4U7TDuPtyT/xRDRj+4V3pLlgGpWvrqXVEj6oKDcyHtmlBatVknjyRHAsQuM7VqH4gC17+sRGmFWFMCuavPmJnyjf7xtGt+vrP3mKveStJQqXR+TKHBvtfi11im3ZParqT6vnO0lRr+TgoiBu9Rj6W4TxTB83BvoA9dRAcmvFMVtcAs5FnAWm/Xv3EePOqhdtG8iaPhnGQzsdnYVyxXjGpQ2oBAq9sZudp7Ew6NM7e1hJFcrYNxzwrAxff/nylz04XD4V1IjiHMr5QlMrSxtMc6ncu5BWPBMdlOnfztinDuNQGuQnAWpPDbBfo4/GKC8FR1wQl3y6poDzNGkE7VH1C/6W1zWaWqnYJFjQqD1M307TK0u3EODr0ru5kqwMiUz9lR3kf8G2MdpIwjzOta2ZCwCNYEUzMWGJAFpQS8QNo+d X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046);SRVR:DBXPR07MB399;BCL:0;PCL:0;RULEID:;SRVR:DBXPR07MB399; X-Microsoft-Exchange-Diagnostics: 1;DBXPR07MB399;4:E5JsNl/oYL/myLaet6rDamb4Fm6Ajb6MjZIvX82/4dcoLoNXIYs9o621y/lRK4x9WoOBEfOmRYOfQ91kuJqBnQEu6QowsP/AIOmrK+3J0SmF4DO6rnzOtIQ6gEoCOOsKAZh7oF3tmlMoXAVKcvzDFjOwqqOA48dKohqjRVHlNBCbp0TsNshM6EbkZfnX6O5X1k2lYTepwC1HABNmqC5RKAf04JNTaqNNWT/1bPUDh9/NAfNw4ezcnvlu9EYfsHdP8jXQjZal3MnFBHIznp4itQ/bBQfLXmc8Hd4cQtrnrjEryv1n5MIm99Z15E5Fefjyzly/PlnQahqMHQGLXTp6VI/9RW9ngwoPFcWKBmXu7FXAeSScO3/W+JBi8y8zCt7nYUK3kjTnp8xKLvihHTb2Gw== X-Forefront-PRVS: 008421A8FF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(54534003)(189002)(1076002)(50986999)(7846002)(2906002)(101416001)(7736002)(68736007)(305945005)(6666003)(4001430100002)(4326007)(33646002)(97736004)(6916009)(6116002)(47776003)(110136003)(3846002)(77096005)(586003)(48376002)(5003940100001)(189998001)(450100001)(81156014)(66066001)(107886002)(5660300001)(50226002)(86362001)(50466002)(19580395003)(36756003)(105586002)(42186005)(8676002)(81166006)(229853001)(2351001)(106356001)(92566002);DIR:OUT;SFP:1101;SCL:1;SRVR:DBXPR07MB399;H:elxcz23q12-y4.dyn.mo.ca.am.ericsson.se;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;DBXPR07MB399;23:3wxPU4Aj56S7zGd/Z5UqAEROkVc0Xr1TgwQ/NWzZJ9?= =?us-ascii?Q?555Wja/CUzrDzwvk1wJTew0aidqu71rAcDV/axXzAcRwcRtqGDOyNdHvJ67L?= =?us-ascii?Q?K2sR4DbMyCk/pjXshqqKm+DleThajp9P/R9oIzSsiRKOd56qJipSsWkswlqM?= =?us-ascii?Q?SeGb0zki0wSTK1VwllkKCeAgcDd9tpJ5p5iZzWAGIEOpKNaf25XgusbXiuf0?= =?us-ascii?Q?TGnQQcT0TBoH2Eu0Go5W1ShNyNghBoKGkgzglmXyKt5LZqllUKNSjOaSsm/Q?= =?us-ascii?Q?bSajxTae3WDFR/reknq4Ff3LVR8x56JlrySEoJbostlqMMonEPl+aVw/S+WK?= =?us-ascii?Q?mjKt1NrfvcHOJSsnudeGLOhtx2aB0TzF6ky86XaWRbbyBCUVXFtELh6mTEPw?= =?us-ascii?Q?fQyNrwSGIFhB4vbdnnxe/UxCK8rIU9Ir/IWA6hm8g9rebXfGUQLGjxFdDY94?= =?us-ascii?Q?KlkuWsox2SE4cgME6HuZX3YZgvh12NOQoJYz/77mIyLxEXXi/WPX1yI86CRK?= =?us-ascii?Q?6WIx8+jM5W2Rof6F8P8NPEXcskjL7rYvR8Yl67x7HL76NQ9HKc4RbLfbb9iK?= =?us-ascii?Q?Nw/sgbaOzp8BDfORv+ihT4YpO/hc8H2bK8/koGzMkKNxo8aO7FUKmgqpZmci?= =?us-ascii?Q?hvKg8568L6UEawc7d+/4x3OuNveWDIidqIxrf/jo97MKVlaEQC2j9zVawxD4?= =?us-ascii?Q?Qyifu33Rf4N7K+LT+wxvWjB1WKhhHl3JblkdPyLXf1E+pw73zkTRaEgneEMV?= =?us-ascii?Q?BAMwFXoh8y7GDU1gTD9RHzg1NBEWkODsNFIL6Kt8LoLaWf4gVdBZutg86ICk?= =?us-ascii?Q?hy8IhOt/awO6zWWTwlU+r/sxdSx2g+iJnj8ywsiU/A7lwkR+oMeIs98lb7Jm?= =?us-ascii?Q?O7P1k+ASt3hKSCeX0iN5p42a4n+hKHn01o0sWXozd7RtRVP3IyaI7eRFfboL?= =?us-ascii?Q?aCywQFOsElH+06Rn5uKCnNK70Lp95FqK6rttM2zAfffKZv0REePmGG+xTqIh?= =?us-ascii?Q?yLOa4I93t3BUxrwl5gDy60zhCubbdJiGUiXnfq+CpKb06rIN+26RqzP7qkYo?= =?us-ascii?Q?xaRtAG+z8nZCNrVGwdGpyni32PiUk6rhDPST+cvZKlfFxi9vfFeLDs6pM7wx?= =?us-ascii?Q?T76C3YSKY6c+x4W/FiP219XGhC61aCGxTKL/8X4VptvVq1t6eA7goSLV6Uy1?= =?us-ascii?Q?y6Z5arFLOwCek=3D?= X-Microsoft-Exchange-Diagnostics: 1;DBXPR07MB399;6:hZVQ5L66c2HFM/B/Xo6ewdxnl8Nqd7zyjyBExSKESUXaOa/moXtALT+PK1EnzqmpI8lKjKKJw8OINvG5KFVCpYWdcrBaqm/wxN+n1ffIWcK++RMgH+edWExYUQW6QZkRmF96qYxi27AR+gWe8catmpSq1RON8uoPtud+14jrQyKnfkb6I9miQ0LVsWGyttK3srHC6RIY5u8ZYex3E6OP56UHL35olybUzmkC5OrXVgjfG39U4GZbj1IGH1+D8bp/6Cw3tk12wnoOiSq2ZaUGbwzwnhieOXs1aZbG2dupg6ePwt+Vefi2hsoAZu4NvANr;5:RE/ay27spA4d6vepW6sL5dC3oVpjcc3at36TqRs7geM+bIwvbqJCITWGF44FlvcWum2wCtoHCemneNKFho8FeN7EBi72wXEdHvg2SVeyD53aoR8V31gAPF9fCLD3/A5MvTXr8B/SbK1n381tDZNY+MuBPqTatMigD7w6TyCrlYY=;24:C5HMovvx8LgKMeR7VnvBfeN817gKL5BMgipy52eANtMHA72VjZA8sW2mz0FdzADAycMj8OfV3FUIKGX/L/218uxkfm6IVyMETRXHOfsInz0=;7:/WFxuwO1yTwQ+V8EWV0ejvbrhuVb1297wZLYRaAmwiuIrtFCM/dPCGKfyDu58a8ZUFGiOE6stirtk8qhAcEtdm5Dvw0WhV58BgTLKbjm8xs58j//mxEnfCXVwE0mVJDHqI9qSuToI/1Xcjot8Hsabh6gV1f1QYnZLtMQHHgUdzqfIZeb3YVz4FEaokQNC361TTRIk31eLAx+g1js3YmnU1c92MkGoq78ESr9qE/5qFbv69FPVhpC23F88HPMvOdOzdgwprEqED6qtDhnQkQ7aQKoauspD2UJEKhxc7xWW3v4CCFjM72WamvWkmQ9YMXZ8+3FXZoodCNgkcVToY/diA== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2016 19:17:41.0877 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBXPR07MB399 X-OriginatorOrg: ericsson.com X-IsSubscribed: yes X-SW-Source: 2016-10/txt/msg00021.txt.bz2 This patch makes the btrace test names unique. I was trying to understand why rn-dl-bind.exp fails on my machine, and saw that it failed at test "next". Given that there are multiple "next" in that test, it's hard to know which one doesn't work. In most cases, I simply added a "#N" suffix to the test cases, since I couldn't find a more appropriate name from the context. For the record, I still don't know why rt-dl-bind.exp fails, but I don't intend to spend more time on it (at least for now). gdb/testsuite/ChangeLog: * gdb.btrace/data.exp: Make test names unique. * gdb.btrace/delta.exp: Likewise. * gdb.btrace/enable.exp: Likewise. * gdb.btrace/function_call_history.exp: Likewise. * gdb.btrace/nohist.exp: Likewise. * gdb.btrace/non-stop.exp: Likewise. * gdb.btrace/rn-dl-bind.exp: Likewise. * gdb.btrace/step.exp: Likewise. * gdb.btrace/stepi.exp: Likewise. * gdb.btrace/tailcall.exp: Likewise. --- gdb/testsuite/gdb.btrace/data.exp | 24 ++++++++----- gdb/testsuite/gdb.btrace/delta.exp | 10 +++--- gdb/testsuite/gdb.btrace/enable.exp | 4 +-- gdb/testsuite/gdb.btrace/function_call_history.exp | 4 +-- gdb/testsuite/gdb.btrace/nohist.exp | 9 ++--- gdb/testsuite/gdb.btrace/non-stop.exp | 36 +++++++++++++------ gdb/testsuite/gdb.btrace/rn-dl-bind.exp | 14 ++++---- gdb/testsuite/gdb.btrace/step.exp | 16 ++++----- gdb/testsuite/gdb.btrace/stepi.exp | 42 +++++++++++----------- gdb/testsuite/gdb.btrace/tailcall.exp | 12 +++---- 10 files changed, 97 insertions(+), 74 deletions(-) diff --git a/gdb/testsuite/gdb.btrace/data.exp b/gdb/testsuite/gdb.btrace/data.exp index f39b24f..2561099 100644 --- a/gdb/testsuite/gdb.btrace/data.exp +++ b/gdb/testsuite/gdb.btrace/data.exp @@ -37,17 +37,25 @@ gdb_test "next" ".*main\.3.*" gdb_test "reverse-step" ".*test\.4.*" # we can't read memory while we're replaying -gdb_test "print glob" "unavailable\[^\\\r\\\n\]*" -gdb_test "print loc" "unavailable\[^\\\r\\\n\]*" +with_test_prefix "replaying, replay-memory-access = default" { + gdb_test "print glob" "unavailable\[^\\\r\\\n\]*" + gdb_test "print loc" "unavailable\[^\\\r\\\n\]*" +} # we can read memory if we explicitly allow it. -gdb_test_no_output "set record btrace replay-memory-access read-write" -gdb_test "print glob" "1" +with_test_prefix "replaying, replay-memory-access = read-write" { + gdb_test_no_output "set record btrace replay-memory-access read-write" + gdb_test "print glob" "1" +} # we can't if we don't explicitly allow it. -gdb_test_no_output "set record btrace replay-memory-access read-only" -gdb_test "print glob" "unavailable\[^\\\r\\\n\]*" +with_test_prefix "replaying, replay-memory-access = read-only" { + gdb_test_no_output "set record btrace replay-memory-access read-only" + gdb_test "print glob" "unavailable\[^\\\r\\\n\]*" +} # stop replaying and try again -gdb_test "record goto end" ".*main\.3.*" -gdb_test "print glob" "1" +with_test_prefix "live" { + gdb_test "record goto end" ".*main\.3.*" + gdb_test "print glob" "1" +} diff --git a/gdb/testsuite/gdb.btrace/delta.exp b/gdb/testsuite/gdb.btrace/delta.exp index c9dbf38..c822400 100644 --- a/gdb/testsuite/gdb.btrace/delta.exp +++ b/gdb/testsuite/gdb.btrace/delta.exp @@ -47,7 +47,7 @@ with_test_prefix "no trace" { } # we record each single-step, even if we have not seen a branch, yet. -gdb_test "stepi" +gdb_test "stepi" "main\.4.*" "stepi #1" proc check_trace {} { gdb_test "info record" [multi_line \ @@ -70,18 +70,18 @@ with_test_prefix "twice" { } # check that we can reverse-stepi that instruction -gdb_test "reverse-stepi" +gdb_test "reverse-stepi" "main\.3.*" gdb_test "info record" [multi_line \ "Active record target: record-btrace" \ "Recording format: .*" \ "Recorded 1 instructions in 1 functions \\\(0 gaps\\\) for .*" \ "Replay in progress\. At instruction 1\." \ - ] "reverse-stepi" + ] "info record #1" # and back -gdb_test "stepi" +gdb_test "stepi" "main\.4.*" "stepi #2" gdb_test "info record" [multi_line \ "Active record target: record-btrace" \ "Recording format: .*" \ "Recorded 1 instructions in 1 functions \\\(0 gaps\\\) for .*" \ - ] "and back" + ] "info record #2" diff --git a/gdb/testsuite/gdb.btrace/enable.exp b/gdb/testsuite/gdb.btrace/enable.exp index fd63006..fec26db 100644 --- a/gdb/testsuite/gdb.btrace/enable.exp +++ b/gdb/testsuite/gdb.btrace/enable.exp @@ -45,7 +45,7 @@ if ![runto_main] { } # enable btrace -gdb_test_no_output "record btrace" "record btrace" +gdb_test_no_output "record btrace" "record btrace #1" gdb_test "record function-call-history" "No trace\\." "record function-call-history without trace" gdb_test "record instruction-history" "No trace\\." "record instruction-history without trace" @@ -90,7 +90,7 @@ clean_restart $testfile if ![runto_main] { return -1 } -gdb_test_no_output "record btrace" +gdb_test_no_output "record btrace" "record btrace #2" if ![runto_main] { return -1 } diff --git a/gdb/testsuite/gdb.btrace/function_call_history.exp b/gdb/testsuite/gdb.btrace/function_call_history.exp index 7d1e4049..53fd239 100644 --- a/gdb/testsuite/gdb.btrace/function_call_history.exp +++ b/gdb/testsuite/gdb.btrace/function_call_history.exp @@ -30,7 +30,7 @@ if ![runto_main] { } # start btrace -gdb_test_no_output "record btrace" +gdb_test_no_output "record btrace" "record btrace #1" # set bp after increment loop and continue set bp_location [gdb_get_line_number "bp.1" $testfile.c] @@ -236,7 +236,7 @@ gdb_continue_to_breakpoint "cont to fib.3" gdb_continue_to_breakpoint "cont to fib.4" # start tracing -gdb_test_no_output "record btrace" +gdb_test_no_output "record btrace" "record btrace #2" # continue until line 30 above delete_breakpoints diff --git a/gdb/testsuite/gdb.btrace/nohist.exp b/gdb/testsuite/gdb.btrace/nohist.exp index b309218..946ad45 100644 --- a/gdb/testsuite/gdb.btrace/nohist.exp +++ b/gdb/testsuite/gdb.btrace/nohist.exp @@ -30,18 +30,19 @@ if ![runto_main] { return -1 } -proc check_not_replaying {} { +proc check_not_replaying { test } { gdb_test "info record" [multi_line \ "Active record target: record-btrace" \ "Recording format: .*" \ "Recorded 0 instructions in 0 functions \\\(0 gaps\\\) for \[^\\\r\\\n\]*" \ - ] + ] \ + $test } gdb_test_no_output "record btrace" -check_not_replaying +check_not_replaying "check not replaying #1" gdb_test "reverse-continue" "No more reverse-execution history\.\r\n.*" -check_not_replaying +check_not_replaying "check not replaying #2" diff --git a/gdb/testsuite/gdb.btrace/non-stop.exp b/gdb/testsuite/gdb.btrace/non-stop.exp index 0d5cbe2..71a6aba 100644 --- a/gdb/testsuite/gdb.btrace/non-stop.exp +++ b/gdb/testsuite/gdb.btrace/non-stop.exp @@ -92,9 +92,13 @@ proc gdb_cont_to_no_history { threads cmd nthreads } { } # trace the code between the two breakpoints -gdb_cont_to_bp_line "$srcfile:$bp_1" all 2 +with_test_prefix "continue to breakpoint 1" { + gdb_cont_to_bp_line "$srcfile:$bp_1" all 2 +} gdb_test_no_output "record btrace" -gdb_cont_to_bp_line "$srcfile:$bp_2" all 2 +with_test_prefix "continue to breakpoint 2" { + gdb_cont_to_bp_line "$srcfile:$bp_2" all 2 +} # we don't need those breakpoints any longer. # they will only disturb our stepping. @@ -104,14 +108,16 @@ delete_breakpoints gdb_test "thread apply all info rec" ".*" gdb_test "info threads" ".*" -with_test_prefix "navigate" { +with_test_prefix "navigate #1" { gdb_test "thread apply 1 record goto 2" "$loop_line" gdb_test "thread apply 2 record goto 4" "$loop_line" gdb_test "thread apply 1 info record" \ ".*Replay in progress\. At instruction 2\." gdb_test "thread apply 2 info record" \ ".*Replay in progress\. At instruction 4\." +} +with_test_prefix "navigate #2" { gdb_test "thread apply all record goto 5" "$loop_line" gdb_test "thread apply 1 info record" \ ".*Replay in progress\. At instruction 5\." @@ -175,29 +181,37 @@ with_test_prefix "continue" { with_test_prefix "thread 1" { gdb_cont_to_no_history 1 "continue" 1 gdb_test "thread apply 1 info record" \ - ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" + ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" \ + "thread apply 1 info record #1" gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 5\." + ".*Replay in progress\. At instruction 5\." \ + "thread apply 2 info record #1" gdb_cont_to_no_history 1 "reverse-continue" 1 gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 1\." + ".*Replay in progress\. At instruction 1\." \ + "thread apply 1 info record #2" gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 5\." + ".*Replay in progress\. At instruction 5\." \ + "thread apply 2 info record #2" } with_test_prefix "thread 2" { gdb_cont_to_no_history 2 "continue" 1 gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 1\." + ".*Replay in progress\. At instruction 1\." \ + "thread apply 1 info record #1" gdb_test "thread apply 2 info record" \ - ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" + ".*Recorded \[0-9\]+ instructions \[^\\\r\\\n\]*" \ + "thread apply 2 info record #1" gdb_cont_to_no_history 2 "reverse-continue" 1 gdb_test "thread apply 1 info record" \ - ".*Replay in progress\. At instruction 1\." + ".*Replay in progress\. At instruction 1\." \ + "thread apply 1 info record #2" gdb_test "thread apply 2 info record" \ - ".*Replay in progress\. At instruction 1\." + ".*Replay in progress\. At instruction 1\." \ + "thread apply 2 info record #2" } } diff --git a/gdb/testsuite/gdb.btrace/rn-dl-bind.exp b/gdb/testsuite/gdb.btrace/rn-dl-bind.exp index 0f92975..0c3033e 100644 --- a/gdb/testsuite/gdb.btrace/rn-dl-bind.exp +++ b/gdb/testsuite/gdb.btrace/rn-dl-bind.exp @@ -35,18 +35,18 @@ if ![runto_main] { # trace the code for the call to test gdb_test_no_output "record btrace" -gdb_test "next" ".*main\.2.*" +gdb_test "next" ".*main\.2.*" "next #1" # just dump the function-call-history to help debugging gdb_test_no_output "set record function-call-history-size 0" gdb_test "record function-call-history /cli 1" ".*" # check that we can reverse-next and next -gdb_test "reverse-next" ".*main\.1.*" -gdb_test "next" ".*main\.2.*" +gdb_test "reverse-next" ".*main\.1.*" "reverse-next #1" +gdb_test "next" ".*main\.2.*" "next #2" # now go into test and try to reverse-next and next over the library call -gdb_test "reverse-step" ".*test\.3.*" -gdb_test "reverse-step" ".*test\.2.*" -gdb_test "reverse-next" ".*test\.1.*" -gdb_test "next" ".*test\.2.*" +gdb_test "reverse-step" ".*test\.3.*" "reverse-step #1" +gdb_test "reverse-step" ".*test\.2.*" "reverse-step #2" +gdb_test "reverse-next" ".*test\.1.*" "reverse-next #2" +gdb_test "next" ".*test\.2.*" "next #3" diff --git a/gdb/testsuite/gdb.btrace/step.exp b/gdb/testsuite/gdb.btrace/step.exp index 1122ff1..e3ccb45 100644 --- a/gdb/testsuite/gdb.btrace/step.exp +++ b/gdb/testsuite/gdb.btrace/step.exp @@ -33,15 +33,15 @@ if ![runto_main] { # trace the call to the test function gdb_test_no_output "record btrace" -gdb_test "next" +gdb_test "next" ".*main\.3.*" "next #1" # let's step around a bit -gdb_test "reverse-next" ".*main\.2.*" -gdb_test "step" ".*fun4\.2.*" -gdb_test "next" ".*fun4\.3.*" -gdb_test "step" ".*fun2\.2.*" +gdb_test "reverse-next" ".*main\.2.*" "reverse-next #1" +gdb_test "step" ".*fun4\.2.*" "step #1" +gdb_test "next" ".*fun4\.3.*" "next #2" +gdb_test "step" ".*fun2\.2.*" "step #2" gdb_test "finish" ".*fun4\.4.*" gdb_test "reverse-step" ".*fun2\.3.*" -gdb_test "reverse-finish" ".*fun4\.3.*" -gdb_test "reverse-next" ".*fun4\.2.*" -gdb_test "reverse-finish" ".*main\.2.*" +gdb_test "reverse-finish" ".*fun4\.3.*" "reverse-finish #1" +gdb_test "reverse-next" ".*fun4\.2.*" "reverse-next #2" +gdb_test "reverse-finish" ".*main\.2.*" "reverse-finish #2" diff --git a/gdb/testsuite/gdb.btrace/stepi.exp b/gdb/testsuite/gdb.btrace/stepi.exp index b21e4e5..54cde46 100644 --- a/gdb/testsuite/gdb.btrace/stepi.exp +++ b/gdb/testsuite/gdb.btrace/stepi.exp @@ -67,18 +67,18 @@ gdb_test_no_output "record btrace" gdb_test "next" # we start with stepping to make sure that the trace is fetched automatically -gdb_test "reverse-stepi" ".*fun4\.5.*" -gdb_test "reverse-stepi" ".*fun4\.5.*" +gdb_test "reverse-stepi" ".*fun4\.5.*" "reverse-stepi #1" +gdb_test "reverse-stepi" ".*fun4\.5.*" "reverse-stepi #2" # let's check where we are in the trace with_test_prefix "reverse-stepi to 39" { check_replay_at 39 } # let's step forward and check again -gdb_test "stepi" ".*fun4\.5.*" +gdb_test "stepi" ".*fun4\.5.*" "stepi #1" with_test_prefix "stepi to 40" { check_replay_at 40 } # with the next step, we stop replaying -gdb_test "stepi" ".*main\.3.*" +gdb_test "stepi" ".*main\.3.*" "stepi #2" gdb_test "info record" [multi_line \ "Active record target: record-btrace" \ ".*" \ @@ -86,12 +86,12 @@ gdb_test "info record" [multi_line \ ] "stepi to live" # let's try nexti -gdb_test "reverse-nexti" ".*main\.2.*" -with_test_prefix "reverse-nexti - 1" { check_replay_at 1 } +gdb_test "reverse-nexti" ".*main\.2.*" "reverse-nexti #1" +with_test_prefix "reverse-nexti - 1 #1" { check_replay_at 1 } # we can't reverse-nexti any further -gdb_test "reverse-nexti" "No more reverse-execution history\.\r\n.*main\.2.*" -with_test_prefix "reverse-nexti - 1" { check_replay_at 1 } +gdb_test "reverse-nexti" "No more reverse-execution history\.\r\n.*main\.2.*" "reverse-nexti #2" +with_test_prefix "reverse-nexti - 1 #2" { check_replay_at 1 } # but we can step back again gdb_test "nexti" ".*main\.3.*" "next, 1.5" @@ -105,36 +105,36 @@ gdb_test "info record" [multi_line \ gdb_test "record goto 22" ".*fun3\.2.*" with_test_prefix "goto 22" { check_replay_at 22 } -gdb_test "stepi" ".*fun1\.1.*" +gdb_test "stepi" ".*fun1\.1.*" "stepi #3" with_test_prefix "stepi to 23" { check_replay_at 23 } -gdb_test "reverse-stepi" ".*fun3\.2.*" +gdb_test "reverse-stepi" ".*fun3\.2.*" "reverse-stepi #3" with_test_prefix "reverse-stepi to 22" { check_replay_at 22 } gdb_test "nexti" ".*fun3\.3.*" with_test_prefix "nexti to 27" { check_replay_at 27 } -gdb_test "reverse-nexti" ".*fun3\.2.*" +gdb_test "reverse-nexti" ".*fun3\.2.*" "reverse-nexti #3" with_test_prefix "reverse-nexti to 22" { check_replay_at 22 } # let's try to step off the left end gdb_test "record goto begin" ".*main\.2.*" with_test_prefix "goto begin" { check_replay_at 1 } -gdb_test "reverse-stepi" "No more reverse-execution history\.\r\n.*main\.2.*" -gdb_test "reverse-stepi" "No more reverse-execution history\.\r\n.*main\.2.*" -with_test_prefix "reverse-stepi at begin" { check_replay_at 1 } +gdb_test "reverse-stepi" "No more reverse-execution history\.\r\n.*main\.2.*" "reverse-stepi #4" +gdb_test "reverse-stepi" "No more reverse-execution history\.\r\n.*main\.2.*" "reverse-stepi #5" +with_test_prefix "reverse-stepi at begin #1" { check_replay_at 1 } -gdb_test "reverse-nexti" "No more reverse-execution history\.\r\n.*main\.2.*" -gdb_test "reverse-nexti" "No more reverse-execution history\.\r\n.*main\.2.*" +gdb_test "reverse-nexti" "No more reverse-execution history\.\r\n.*main\.2.*" "reverse-nexti #4" +gdb_test "reverse-nexti" "No more reverse-execution history\.\r\n.*main\.2.*" "reverse-nexti #5" with_test_prefix "reverse-nexti at begin" { check_replay_at 1 } # we can step forward, though -gdb_test "stepi" ".*fun4\.1.*" +gdb_test "stepi" ".*fun4\.1.*" "stepi #4" with_test_prefix "stepi to 2" { check_replay_at 2 } # let's try to step off the left end again -gdb_test "reverse-stepi" ".*main\.2.*" -gdb_test "reverse-stepi" "No more reverse-execution history\.\r\n.*main\.2.*" -gdb_test "reverse-stepi" "No more reverse-execution history\.\r\n.*main\.2.*" -with_test_prefix "reverse-stepi at begin" { check_replay_at 1 } +gdb_test "reverse-stepi" ".*main\.2.*" "reverse-stepi #6" +gdb_test "reverse-stepi" "No more reverse-execution history\.\r\n.*main\.2.*" "reverse-stepi #7" +gdb_test "reverse-stepi" "No more reverse-execution history\.\r\n.*main\.2.*" "reverse-stepi #8" +with_test_prefix "reverse-stepi at begin #2" { check_replay_at 1 } diff --git a/gdb/testsuite/gdb.btrace/tailcall.exp b/gdb/testsuite/gdb.btrace/tailcall.exp index bc8afc4..822aec2 100644 --- a/gdb/testsuite/gdb.btrace/tailcall.exp +++ b/gdb/testsuite/gdb.btrace/tailcall.exp @@ -90,13 +90,13 @@ gdb_test "up" "#2\[^\r\n\]*main \\(\\) at tailcall.c:37\r\n.*" "up to main" gdb_test "down" "#1\[^\r\n\]*foo \\(\\) at tailcall.c:29\r\n.*" "down to foo" # test stepping into and out of tailcalls. -gdb_test "finish" "\[^\r\n\]*main \\(\\) at tailcall.c:38\r\n.*" -gdb_test "reverse-step" "\[^\r\n\]*bar \\(\\) at tailcall.c:24\r\n.*" +gdb_test "finish" "\[^\r\n\]*main \\(\\) at tailcall.c:38\r\n.*" "finish #1" +gdb_test "reverse-step" "\[^\r\n\]*bar \\(\\) at tailcall.c:24\r\n.*" "reverse-step #1" gdb_test "reverse-finish" "\[^\r\n\]*foo \\(\\) at tailcall.c:29\r\n.*" -gdb_test "reverse-step" "\[^\r\n\]*main \\(\\) at tailcall.c:37\r\n.*" +gdb_test "reverse-step" "\[^\r\n\]*main \\(\\) at tailcall.c:37\r\n.*" "reverse-step #2" gdb_test "next" "\[^\r\n\]*38.*" gdb_test "reverse-next" "\[^\r\n\]*main \\(\\) at tailcall.c:37\r\n.*" gdb_test "step" "\[^\r\n\]*foo \\(\\) at tailcall.c:29\r\n.*" -gdb_test "finish" "\[^\r\n\]*main \\(\\) at tailcall.c:38\r\n.*" -gdb_test "reverse-step" "\[^\r\n\]*bar \\(\\) at tailcall.c:24\r\n.*" -gdb_test "finish" "\[^\r\n\]*main \\(\\) at tailcall.c:38\r\n.*" +gdb_test "finish" "\[^\r\n\]*main \\(\\) at tailcall.c:38\r\n.*" "finish #2" +gdb_test "reverse-step" "\[^\r\n\]*bar \\(\\) at tailcall.c:24\r\n.*" "reverse-step #3" +gdb_test "finish" "\[^\r\n\]*main \\(\\) at tailcall.c:38\r\n.*" "finish #3" -- 2.9.3