)]}'
{
  "commit": "c8d4f6dfd9264d6ab5d14c2dde3628cc1e7dd75f",
  "tree": "b5697f856ef95cd70d9cd5db33c2c0c9d4891205",
  "parents": [
    "05f52dc2e1359fc4f69fab5c39fdfdf5efe93a15"
  ],
  "author": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Thu Feb 27 10:16:00 2020 +0100"
  },
  "committer": {
    "name": "Tom de Vries",
    "email": "tdevries@suse.de",
    "time": "Thu Feb 27 10:16:00 2020 +0100"
  },
  "message": "[gdb/testsuite] Fix spawn in tuiterm.exp\n\nWhen running gdb.stabs/weird.exp by itself it passes, but if we run a gdb.tui\ntest before it, we get:\n...\n$ make check RUNTESTFLAGS\u003d\"gdb.stabs/weird.exp gdb.tui/basic.exp\"\nRunning /data/gdb_versions/devel/src/gdb/testsuite/gdb.tui/basic.exp ...\nRunning /data/gdb_versions/devel/src/gdb/testsuite/gdb.stabs/weird.exp ...\nERROR: Couldn\u0027t make test case. -1 {spawn failed}\n...\n\nIn more detail, using -v:\n...\nExecuting on build: sed  -f aout.sed weird.def weird.s (timeout \u003d 300)\nbuiltin_spawn [open ...]^M\npid is 19060 19061 -19060 -19061\nspawn -open file10 failed, 1 can\u0027t read \"spawn_out(slave,name)\": \\\n  no such variable, can\u0027t read \"spawn_out(slave,name)\": no such variable\n    while executing\n\"set gdb_spawn_name $spawn_out(slave,name)\"\n    (procedure \"spawn\" line 5)\n    invoked from within\n\"spawn -ignore SIGHUP -leaveopen file10\"\n    invoked from within\n\"catch \"spawn -ignore SIGHUP -leaveopen $id\" result2\"\nERROR: Couldn\u0027t make test case. -1 {spawn failed}\n...\n\nWhen running the gdb.tui test, spawn gets renamed to a local version from\nlib/tuiterm.exp.  The local version calls expect\u0027s spawn, and then makes the\nlocal spawn_out(slave,name) variable accessible in the global variable\ngdb_spawn_name.\n\nHowever, the weird.exp test-case uses remote_exec build, which ends up using\nlocal_exec, which given that there\u0027s input/output redirection uses open:\n...\n    set result [catch {open \"| ${commandline} $inp |\u0026 tee $outpf\" RDONLY} id]\n...\nfollowed by spawn using the -leaveopen option:\n...\n    set result [catch \"spawn -ignore SIGHUP -leaveopen $id\" result2]\n...\nwhich apparently has the effect that spawn_out(slave,name) is not set.\n\nFix this in the lib/tuiterm.exp local spawn proc by detecting the case that\nspawn_out(slave,name) is not set, and handling it accordingly.\n\nTested gdb.stabs/weird.exp and gdb.tui/*.exp on x86_64-linux.\n\ngdb/testsuite/ChangeLog:\n\n2020-02-27  Tom de Vries  \u003ctdevries@suse.de\u003e\n\n\t* lib/tuiterm.exp (spawn): Handle case that spawn_out(slave,name) is\n\tnot set.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "52c46f9e2f066b600baa09d5cfd6af7fe91a9632",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/ChangeLog",
      "new_id": "2f5ab91bf8897a5e098e05afe2d45766b289c249",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "da5580324a9273619cd4b772b7644ed4f65bca1a",
      "old_mode": 33188,
      "old_path": "gdb/testsuite/lib/tuiterm.exp",
      "new_id": "7505821a855f6bf8c9ae7922ca662858265172f0",
      "new_mode": 33188,
      "new_path": "gdb/testsuite/lib/tuiterm.exp"
    }
  ]
}
