)]}'
{
  "commit": "3d950cb72ded46673bafb21a00252afd5bc1cbbe",
  "tree": "f34a7498cce2eef826ce4df25dfa26de42093e4a",
  "parents": [
    "ab7baf103d2fb381361da3257b971a372a449f50"
  ],
  "author": {
    "name": "Simon Marchi",
    "email": "simon.marchi@polymtl.ca",
    "time": "Tue Dec 07 21:56:48 2021 -0500"
  },
  "committer": {
    "name": "Simon Marchi",
    "email": "simon.marchi@efficios.com",
    "time": "Thu Dec 09 14:03:08 2021 -0500"
  },
  "message": "gdb/testsuite: fix default behavior of runto\n\nThe documented behavior of proc runto is to not emit a PASS when\nsucceeding to to run to the specified location, but emit a FAIL when\nfailing to do so.  I suppose the intent is that it won\u0027t pollute the\nresults normally passing tests (although I don\u0027t see why we would care),\nbut make visible any problems.\n\nHowever, it seems like the implementation makes it default to never\nprint anything.  \"no-message\" is prependend to \"args\", so if \"message\"\nis not passed, we will always take the   path that sets print_fail to 0,\nwhich will silence any failure.\n\nThis unfortunately means that tests relying on runto_main won\u0027t emit a\nFAIL if failing to run to main.  And since commit 4dfef5be6812\n(\"gdb/testsuite: make runto_main not pass no-message to runto\"), tests\ndon\u0027t emit a FAIL themselves when failing to run to main.  This means\nthat tests failing to run to main just fail silently, and that\u0027s bad.\n\nThis can be reproduced by hacking gdb.base/template.exp like so:\n\n    diff --git a/gdb/testsuite/gdb.base/template.c b/gdb/testsuite/gdb.base/template.c\n    index bcf39c377d92..052be5b79d73 100644\n    --- a/gdb/testsuite/gdb.base/template.c\n    +++ b/gdb/testsuite/gdb.base/template.c\n    @@ -15,6 +15,14 @@\n        You should have received a copy of the GNU General Public License\n        along with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.  */\n\n    +#include \u003cstdlib.h\u003e\n    +\n    +__attribute__((constructor))\n    +static void c (void)\n    +{\n    +  exit (1);\n    +}\n    +\n     int\n     main (void)\n     {\n\nRunning the modified gdb.base/template.exp shows that it exits without\nprinting any result.\n\nRemove the line that prepends no-message to args, that should make\nrunto\u0027s behavior match its documentation.\n\nThis patch will appear to add many failures, but in reality they already\nexisted, they were just silenced.\n\nChange-Id: I2a730d5bc72b6ef0698cd6aad962d9902aa7c3d6\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8b7445b758190909805b3b63a342ba29f3b47ba1",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/lib/gdb.exp",
      "new_id": "95220f6fc8d46ea3235d960fdaf3859edabaa76e",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/lib/gdb.exp"
    }
  ]
}
