)]}'
{
  "commit": "628b136d6474df9c4bbf04b8ff1977ef7191c9e1",
  "tree": "539b5ecfb608e787b6760317258515488f91d151",
  "parents": [
    "ad280e8ef759837dc2ba2b2bd95712290041d5d6"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon Jun 03 07:49:24 2024 +0200"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Mon Jun 03 07:49:24 2024 +0200"
  },
  "message": "[gdb/testsuite] Fix timeout in gdb.tui/resize-2.exp\n\nWhen running test-case gdb.tui/resize-2.exp with taskset -c 0, I sometimes run\ninto:\n...\ntui disable^[[40;1H^M(gdb) PASS: $exp: tui disable\n^M^[[K(gdb) FAIL: $exp: two prompt redisplays after resize (timeout)\n...\n\nThe test-case does \"Term::resize 24 80 0\" while having the settings of an\nearlier \"Term::resize 40 90\", so both dimensions change.\n\nWhen TUI is enabled, we call Term::resize with wait_for_msg \u003d\u003d 1, and the proc:\n- calls stty to change one dimension,\n- waits for the message (enabled by \"maint set tui-resize-message on\")\n  confirming the resize has happened,\n- calls stty to change the other dimension, and again\n- waits for the message confirming the resize has happened.\n\nSince TUI is disabled, we call Term::resize with wait_for_msg \u003d\u003d 0 because the\nmessage is not printed, so stty is called twice, and afterwards we check for\nthe results of the two resizes, which is the test that is failing.\n\nThe problem is that not waiting for a response after each stty call opens up\nthe possibility of the responses being merged.\n\nFix this by calling Term::resize twice, changing one dimension at a time, and\nwaiting for a single prompt redisplay after each one.\n\nTested on x86_64-linux.\n\nReviewed-By: Alexandra Petlanova Hajkova \u003cahajkova@redhat.com\u003e\n\nPR testsuite/31822\nBug: https://sourceware.org/bugzilla/show_bug.cgi?id\u003d31822\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0f1f0b9eb1e75f97db10a0898c5537157b09aee7",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/gdb.tui/resize-2.exp",
      "new_id": "729e1ee23f998def1f25552c6c3fe0fc4c4084a1",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/gdb.tui/resize-2.exp"
    }
  ]
}
