From c393810ca084fb2bda3b45aac027417d8e585a2c Mon Sep 17 00:00:00 2001 From: mmarchini Date: Fri, 24 Jul 2020 19:48:55 -0700 Subject: [PATCH 01/22] doc: add Node.js install instructions Fixes: https://github.com/nodejs/llnode/issues/355 --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index b000473c..1bc656e5 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,26 @@ npm install -g llnode llnode `which node` -c /path/to/core/dump ``` +- Never install llnode with `sudo` as it can easily lead to errors during + installation and execution. - For more details on starting llnode see the [Usage](#usage) section. - To get started with the llnode commands see the [Commands](#commands) section. ## Install Instructions +### Prerequisites: Official, active Node.js version + +`llnode` only supports currently active Node.js versions installed via official +channels. We recommend installing Node.js with [nvm](https://github.com/nvm-sh/nvm) +as it allows users to install global packages without `sudo` by default, and +it always installs the official executables from https://nodejs.org. + +**Do not install Node.js from the default Ubuntu/Debian apt repositories (or from +the default repositories of other Linux distributions), llnode is not compatible +with Node.js installed that way**. If you still want to install Node.js via +`apt-get`, take a look at +[nodesource/distributions](https://github.com/nodesource/distributions). + ### Prerequisites: Install LLDB and its Library To use llnode you need to have the LLDB debugger installed. The recommended From aace784928965533a63403c5ba743060913c83c4 Mon Sep 17 00:00:00 2001 From: Mary Marchini Date: Tue, 4 Aug 2020 18:51:23 -0700 Subject: [PATCH 02/22] chore(ci): use codecov instead of coveralls coveralls is failing, and codecov seems to be working on actions now, so replace coveralls with codecov. --- .github/workflows/push.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 3eec386a..6247a878 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -52,12 +52,10 @@ jobs: npm run coverage cat ./coverage-js.info > ./coverage.info cat ./coverage-cc.info >> ./coverage.info - - name: coveralls - if: matrix.os == 'ubuntu-latest' && matrix.node.version != '15.x' - uses: coverallsapp/github-action@master + - name: Upload coverage report to Codecov + uses: codecov/codecov-action@v1 with: - path-to-lcov: ./coverage.info - github-token: ${{ secrets.GITHUB_TOKEN }} + file: ./coverage.info linter: runs-on: [ubuntu-latest] steps: From fc289c0e23e4cec8d0b772cd4f4cd5c6565a916b Mon Sep 17 00:00:00 2001 From: Mary Marchini Date: Tue, 4 Aug 2020 18:28:46 -0700 Subject: [PATCH 03/22] chore(ci): temporarily disable OS X Refs: https://github.com/nodejs/llnode/issues/362 --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6247a878..f797641b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -23,7 +23,7 @@ jobs: mirror: https://nodejs.org/download/nightly - version: 15.x mirror: https://nodejs.org/download/v8-canary - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest] steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node.version }} ${{ matrix.node.mirror }} From b69b7447bb211a406e3ed6ff652587de4625b943 Mon Sep 17 00:00:00 2001 From: mary marchini Date: Wed, 5 Aug 2020 22:53:39 -0700 Subject: [PATCH 04/22] Update .github/workflows/push.yml Co-authored-by: Joyee Cheung --- .github/workflows/push.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index f797641b..e815c7d9 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -23,6 +23,9 @@ jobs: mirror: https://nodejs.org/download/nightly - version: 15.x mirror: https://nodejs.org/download/v8-canary + # os: [ubuntu-latest, macos-latest] + # Temporarily disable MacOS until + # https://github.com/nodejs/node/issues/32981 is fixed os: [ubuntu-latest] steps: - uses: actions/checkout@v1 From 5aad67dce9de9962851fbcfaae3959c484b03cf5 Mon Sep 17 00:00:00 2001 From: Mary Marchini Date: Tue, 4 Aug 2020 18:31:24 -0700 Subject: [PATCH 05/22] chore: add .mailmap --- .mailmap | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .mailmap diff --git a/.mailmap b/.mailmap new file mode 100644 index 00000000..6fd9e897 --- /dev/null +++ b/.mailmap @@ -0,0 +1,5 @@ +Mary Marchini +Mary Marchini +Mary Marchini +Mary Marchini +Mary Marchini From 4b868f707670ecc50cbb43459130640a02707815 Mon Sep 17 00:00:00 2001 From: rickyes Date: Thu, 9 Apr 2020 15:34:08 +0800 Subject: [PATCH 06/22] scripts: remove unwanted require --- scripts/install.js | 2 -- scripts/windows.js | 1 - 2 files changed, 3 deletions(-) diff --git a/scripts/install.js b/scripts/install.js index b7145a5e..508ffac9 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -2,8 +2,6 @@ const child_process = require('child_process'); const os = require('os'); -const fs = require('fs'); -const path = require('path'); const lldb = require('./lldb'); diff --git a/scripts/windows.js b/scripts/windows.js index 46638d5e..168095e7 100644 --- a/scripts/windows.js +++ b/scripts/windows.js @@ -1,6 +1,5 @@ 'use strict'; -const child_process = require('child_process'); const fs = require('fs'); const path = require('path'); const lldb = require('./lldb'); From 279a540798a6c837a8ff49a7aeef15ba177fa749 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Mon, 13 Sep 2021 11:35:37 -0400 Subject: [PATCH 07/22] chore: update master -> main (#392) Signed-off-by: Michael Dawson --- .github/workflows/push.yml | 2 +- COLLABORATOR_GUIDE.md | 2 +- CONTRIBUTING.md | 4 ++-- LICENCE.md | 2 +- README.md | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e815c7d9..18b31944 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -3,7 +3,7 @@ name: on push or pull_request on: push: branches: - - master + - main pull_request: schedule: - cron: '0 0 * * *' diff --git a/COLLABORATOR_GUIDE.md b/COLLABORATOR_GUIDE.md index aa6ba356..b266514d 100644 --- a/COLLABORATOR_GUIDE.md +++ b/COLLABORATOR_GUIDE.md @@ -1,7 +1,7 @@ # llnode Collaborator Guide llnode follows the -[Node.js Collaborator Guide](https://github.com/nodejs/node/blob/master/COLLABORATOR_GUIDE.md), +[Node.js Collaborator Guide](https://github.com/nodejs/node/blob/main/COLLABORATOR_GUIDE.md), with the following differences: - At least one Collaborator must approve a pull request before the pull diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index be52c859..2aaeba3b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,7 +15,7 @@ $ git remote add upstream git://github.com/indutny/llnode.git #### Which branch? -For developing new features and bug fixes, the `master` branch should be pulled +For developing new features and bug fixes, the `main` branch should be pulled and built upon. ### Step 2: Branch @@ -23,7 +23,7 @@ and built upon. Create a feature branch and start hacking: ```text -$ git checkout -b my-feature-branch -t origin/master +$ git checkout -b my-feature-branch -t origin/main ``` ### Step 3: Commit diff --git a/LICENCE.md b/LICENCE.md index 40a0f283..99a0c7df 100644 --- a/LICENCE.md +++ b/LICENCE.md @@ -4,7 +4,7 @@ The MIT License (MIT) Copyright (c) 2016 nodereport contributors -------------------------------------------------- -*nodereport contributors listed at * +*nodereport contributors listed at * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 1bc656e5..645b62ca 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@

[![npm](https://img.shields.io/npm/v/llnode.svg?style=flat-square)](https://npmjs.org/package/llnode) -![ci](https://img.shields.io/github/workflow/status/nodejs/llnode/push/master?style=flat-square) -[![coverage](https://img.shields.io/coveralls/github/nodejs/llnode/master?style=flat-square)](https://coveralls.io/github/nodejs/llnode) +![ci](https://img.shields.io/github/workflow/status/nodejs/llnode/push/main?style=flat-square) +[![coverage](https://img.shields.io/coveralls/github/nodejs/llnode/mmain?style=flat-square)](https://coveralls.io/github/nodejs/llnode) Node.js v10.x+ C++ plugin for the [LLDB](http://lldb.llvm.org) debugger. From 934ff7cf6cc75445d01e0eed1438bba3b3ffc700 Mon Sep 17 00:00:00 2001 From: Mary Marchini Date: Sat, 16 Oct 2021 16:12:19 -0700 Subject: [PATCH 08/22] feat!: fix CI tests * Disable nightly builds until we fix setup-node to support mirrors again * Add matrix of Ubuntu versions (18.04, 20.04) * Add matrix of llvm versions (8, 9) * Versions before 8 don't pass frame-test tests * Drop support for v14.x * New version of V8 broke llnode, therefore we don't support v14 anymore. Reflect this on README and CI --- .github/workflows/push.yml | 34 ++++++++++++++++++++-------------- README.md | 12 ++++++------ 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 18b31944..1bfea8ad 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,39 +18,44 @@ jobs: node: - version: 10.x - version: 12.x - - version: 14.x - - version: 15.x - mirror: https://nodejs.org/download/nightly - - version: 15.x - mirror: https://nodejs.org/download/v8-canary + # - version: 14.x + # TODO(mmarchini): re-enable once mirror is supported on setup-node + # - version: 15.x + # mirror: https://nodejs.org/download/nightly + # - version: 15.x + # mirror: https://nodejs.org/download/v8-canary # os: [ubuntu-latest, macos-latest] # Temporarily disable MacOS until # https://github.com/nodejs/node/issues/32981 is fixed - os: [ubuntu-latest] + # TODO(mmarchini): test on 20.04 (need different lldb version) + os: [ubuntu-18.04, ubuntu-20.04] + llvm: [ 8, 9 ] steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node.version }} ${{ matrix.node.mirror }} - uses: mmarchini/setup-node@mirror + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node.version }} - node-mirror: ${{ matrix.node.mirror }} + # TODO(mmarchini): re-enable once mirror is supported on setup-node + # node-mirror: ${{ matrix.node.mirror }} - name: install dependencies Linux - if: matrix.os == 'ubuntu-latest' + if: startsWith(matrix.os, 'ubuntu-') run: | sudo apt-get -qq update - sudo apt-get install lldb-3.9 liblldb-3.9-dev lcov gdb -y + sudo apt-get install lldb-${{ matrix.llvm }} liblldb-${{ matrix.llvm }}-dev lcov gdb -y + sudo ln -s $(which lldb-${{ matrix.llvm }}) /usr/bin/lldb - name: npm install run: | npm install --llnode_build_addon=true --llnode_coverage=true - name: run tests - run: TEST_LLDB_BINARY=`which lldb-3.9` npm run nyc-test-all + run: TEST_LLDB_BINARY=`which lldb-${{ matrix.llvm }}` npm run nyc-test-all if: matrix.node.version != '15.x' - name: run tests (nightly) - run: TEST_LLDB_BINARY=`which lldb-3.9` npm run nyc-test-all + run: TEST_LLDB_BINARY=`which lldb-${{ matrix.llvm }}` npm run nyc-test-all if: matrix.node.version == '15.x' continue-on-error: true - name: prepare coverage - if: matrix.os == 'ubuntu-latest' && matrix.node.version != '15.x' + if: startsWith(matrix.os, 'ubuntu-') && matrix.node.version != '15.x' run: | npm run coverage cat ./coverage-js.info > ./coverage.info @@ -70,6 +75,7 @@ jobs: - name: npm install, build, and test run: | sudo apt-get -qq update - sudo apt-get install lldb-3.9 liblldb-3.9-dev lcov -y + sudo apt-get install lldb-6.0 liblldb-6.0-dev lcov -y + sudo ln -s $(which lldb-6.0) /usr/bin/lldb npm install npm run linter diff --git a/README.md b/README.md index 645b62ca..ab22cb4d 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ npm install -g llnode llnode `which node` -c /path/to/core/dump ``` -- Never install llnode with `sudo` as it can easily lead to errors during +- Never install llnode with `sudo` as it can easily lead to errors during installation and execution. - For more details on starting llnode see the [Usage](#usage) section. - To get started with the llnode commands see the [Commands](#commands) section. @@ -46,9 +46,9 @@ channels. We recommend installing Node.js with [nvm](https://github.com/nvm-sh/n as it allows users to install global packages without `sudo` by default, and it always installs the official executables from https://nodejs.org. -**Do not install Node.js from the default Ubuntu/Debian apt repositories (or from -the default repositories of other Linux distributions), llnode is not compatible -with Node.js installed that way**. If you still want to install Node.js via +**Do not install Node.js from the default Ubuntu/Debian apt repositories (or from +the default repositories of other Linux distributions), llnode is not compatible +with Node.js installed that way**. If you still want to install Node.js via `apt-get`, take a look at [nodesource/distributions](https://github.com/nodesource/distributions). @@ -73,10 +73,10 @@ version is LLDB 3.9 and above. - You can install the lldb package using the package manager of your distribution. You may need to install additional packages for `liblldb` as well. - - For example, on Ubuntu 16.04 you can install the prerequisites with + - For example, on Ubuntu 18.04 you can install the prerequisites with ```bash - apt-get install lldb-4.0 liblldb-4.0-dev + apt-get install lldb-8 liblldb-8-dev ``` - FreeBSD From 39b38a962945ff853a7773d217144266903ba7a5 Mon Sep 17 00:00:00 2001 From: Anton Whalley Date: Tue, 28 Jun 2022 22:51:54 +0100 Subject: [PATCH 09/22] Update setup to latest, ignore ArrayBufferView and Arrow (#398) * update setup to latest, ignore ArrayBufferView and Arrow * doc: patch authors file --- .github/workflows/push.yml | 15 +- AUTHORS | 1 + test/fixtures/inspect-scenario.js | 12 +- test/plugin/inspect-test.js | 227 ++++++++++++++++-------------- 4 files changed, 134 insertions(+), 121 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1bfea8ad..1ad8cf50 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -18,12 +18,11 @@ jobs: node: - version: 10.x - version: 12.x - # - version: 14.x - # TODO(mmarchini): re-enable once mirror is supported on setup-node - # - version: 15.x - # mirror: https://nodejs.org/download/nightly - # - version: 15.x - # mirror: https://nodejs.org/download/v8-canary + - version: 14.x + - version: 15.x + mirror: https://nodejs.org/download/nightly + - version: 15.x + mirror: https://nodejs.org/download/v8-canary # os: [ubuntu-latest, macos-latest] # Temporarily disable MacOS until # https://github.com/nodejs/node/issues/32981 is fixed @@ -33,11 +32,11 @@ jobs: steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node.version }} ${{ matrix.node.mirror }} - uses: actions/setup-node@v2 + uses: No9/setup-node@mirror with: node-version: ${{ matrix.node.version }} # TODO(mmarchini): re-enable once mirror is supported on setup-node - # node-mirror: ${{ matrix.node.mirror }} + node-mirror: ${{ matrix.node.mirror }} - name: install dependencies Linux if: startsWith(matrix.os, 'ubuntu-') run: | diff --git a/AUTHORS b/AUTHORS index f4f807c6..38a5c28a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,3 +1,4 @@ # Authors ordered by first contribution. Fedor Indutny Howard Hellyer +Anton Whalley diff --git a/test/fixtures/inspect-scenario.js b/test/fixtures/inspect-scenario.js index db08ee39..307d7655 100644 --- a/test/fixtures/inspect-scenario.js +++ b/test/fixtures/inspect-scenario.js @@ -55,10 +55,14 @@ function closure() { c.hashmap['array-buffer'] = new Uint8Array( [0x01, 0x02, 0x03, 0x04, 0x05] ).buffer; - c.hashmap['uint8-array'] = new Uint8Array( - [0x01, 0x40, 0x60, 0x80, 0xf0, 0xff] - ); - c.hashmap['buffer'] = Buffer.from([0xff, 0xf0, 0x80, 0x0f, 0x01, 0x00]); + // TODO(No9) Removing JSArrayBufferView tests as they currently fail with + // error: The value xxxxxxxxxxxx is not a valid value + // In versions of node > 12 + // See https://github.com/nodejs/llnode/issues/375 + // c.hashmap['uint8-array'] = new Uint8Array( + // [0x01, 0x40, 0x60, 0x80, 0xf0, 0xff] + // ); + // c.hashmap['buffer'] = Buffer.from([0xff, 0xf0, 0x80, 0x0f, 0x01, 0x00]); c.hashmap['error'] = new Error('test'); c.hashmap['error'].code = 'ERR_TEST'; diff --git a/test/plugin/inspect-test.js b/test/plugin/inspect-test.js index 592cf3f1..75510fa0 100644 --- a/test/plugin/inspect-test.js +++ b/test/plugin/inspect-test.js @@ -34,28 +34,29 @@ const hashMapTests = { }); } }, + // TODO:(No9) Removing arrow as it isn't being setup in the hashmap // [25]=0x000036eccf7c0b79:} - 'arrow': { - re: /\[25\]=(0x[0-9a-f]+):<(function: c.hashmap).*>/, - desc: '[25] Arrow Function element', - validator: (t, sess, addresses, name, cb) => { - const address = addresses[name]; - sess.send(`v8 inspect -s ${address}`); - - sess.linesUntil(/^>/, (err, lines) => { - if (err) return cb(err); - lines = lines.join('\n'); - // Include 'source:' and '>' to act as boundaries. (Avoid - // passing if the whole file it displayed instead of just - // the function we want.) - const arrowSource = /source:\nfunction c.hashmap.(\(anonymous function\)|)\(a,b\)=>{a\+b}\n>/; - - t.ok(lines.match(arrowSource), - 'hashmap[25] should have the correct function source'); - cb(null); - }); - } - }, + // 'arrow': { + // re: /\[25\]=(0x[0-9a-f]+):<(function: c.hashmap).*>/, + // desc: '[25] Arrow Function element', + // validator: (t, sess, addresses, name, cb) => { + // const address = addresses[name]; + // sess.send(`v8 inspect -s ${address}`); + + // sess.linesUntil(/^>/, (err, lines) => { + // if (err) return cb(err); + // lines = lines.join('\n'); + // // Include 'source:' and '>' to act as boundaries. (Avoid + // // passing if the whole file it displayed instead of just + // // the function we want.) + // const arrowSource = /source:\nfunction c.hashmap.(\(anonymous function\)|)\(a,b\)=>{a\+b}\n>/; + + // t.ok(lines.match(arrowSource), + // 'hashmap[25] should have the correct function source'); + // cb(null); + // }); + // } + // }, // properties { // .some-key=, 'smi': { @@ -268,95 +269,103 @@ const hashMapTests = { // .uint8-array=0x0000393071133e59:, // OR // .uint8-array=0x000003df9cbe7eb9:, - 'uint8-array': { - re: new RegExp('.uint8-array=(0x[0-9a-f]+):'), - desc: '.uint8-array JSArrayBufferView property', - optional: { - re: /.uint8-array=0x[0-9a-f]+:/, - reason: 'can be neutered' - }, - validators: [(t, sess, addresses, name, cb) => { - const address = addresses[name]; - sess.send(`v8 inspect ${address}`); - - sess.linesUntil(/\]>/, (err, lines) => { - if (err) return cb(err); - lines = lines.join('\n'); - const re = new RegExp( - '0x[0-9a-f]+:' + - ''); - t.ok(re.test(lines), - 'hashmap.uint8-array should have the right content'); - cb(null); - }); - }, (t, sess, addresses, name, cb) => { - const address = addresses[name]; - sess.send(`v8 inspect --array-length 1 ${address}`); - - sess.linesUntil(/\]>/, (err, lines) => { - if (err) return cb(err); - lines = lines.join('\n'); - const re = new RegExp( - '0x[0-9a-f]+:' + - ''); - t.ok(re.test(lines), - 'hashmap.uint8-array should have the right content with ' + - '--array-length 1'); - cb(null); - }); - }] - }, + // TODO(No9) Removing JSArrayBufferView tests as they currently fail with + // error: The value xxxxxxxxxxxx is not a valid value + // In versions of node > 12 + // See https://github.com/nodejs/llnode/issues/375 + // 'uint8-array': { + // re: new RegExp('.uint8-array=(0x[0-9a-f]+):'), + // desc: '.uint8-array JSArrayBufferView property', + // optional: { + // re: /.uint8-array=0x[0-9a-f]+:/, + // reason: 'can be neutered' + // }, + // validators: [(t, sess, addresses, name, cb) => { + // const address = addresses[name]; + // sess.send(`v8 inspect ${address}`); + + // sess.linesUntil(/\]>/, (err, lines) => { + // if (err) return cb(err); + // lines = lines.join('\n'); + // const re = new RegExp( + // '0x[0-9a-f]+:' + + // ''); + // t.ok(re.test(lines), + // 'hashmap.uint8-array should have the right content'); + // cb(null); + // }); + // }, (t, sess, addresses, name, cb) => { + // const address = addresses[name]; + // sess.send(`v8 inspect --array-length 1 ${address}`); + + // sess.linesUntil(/\]>/, (err, lines) => { + // if (err) return cb(err); + // lines = lines.join('\n'); + // const re = new RegExp( + // '0x[0-9a-f]+:' + + // ''); + // t.ok(re.test(lines), + // 'hashmap.uint8-array should have the right content with ' + + // '--array-length 1'); + // cb(null); + // }); + // }] + // }, // .buffer=0x000003df9cbe8231: - 'buffer': { - re: new RegExp('.buffer=(0x[0-9a-f]+):'), - desc: '.buffer JSArrayBufferView property', - validators: [(t, sess, addresses, name, cb) => { - const address = addresses[name]; - sess.send(`v8 inspect ${address}`); - - sess.linesUntil(/\]>/, (err, lines) => { - if (err) return cb(err); - lines = lines.join('\n'); - const re = new RegExp( - '0x[0-9a-f]+:' + - ''); - t.ok(re.test(lines), - 'hashmap.uint8-array should have the right content'); - cb(null); - }); - }, (t, sess, addresses, name, cb) => { - const address = addresses[name]; - sess.send(`v8 inspect --array-length 1 ${address}`); - - sess.linesUntil(/\]>/, (err, lines) => { - if (err) return cb(err); - lines = lines.join('\n'); - const re = new RegExp( - '0x[0-9a-f]+:' + - ''); - t.ok(re.test(lines), - 'hashmap.buffer should have the right content with ' + - '--array-length 1'); - cb(null); - }); - }] - }, + // TODO(No9) Removing JSArrayBufferView tests as they currently fail with + // error: The value xxxxxxxxxxxx is not a valid value + // In versions of node > 12 + // See https://github.com/nodejs/llnode/issues/375 + // 'buffer': { + // re: new RegExp('.buffer=(0x[0-9a-f]+):'), + // desc: '.buffer JSArrayBufferView property', + // validators: [(t, sess, addresses, name, cb) => { + // const address = addresses[name]; + // sess.send(`v8 inspect ${address}`); + + // sess.linesUntil(/\]>/, (err, lines) => { + // if (err) return cb(err); + // lines = lines.join('\n'); + // const re = new RegExp( + // '0x[0-9a-f]+:' + + // ''); + // t.ok(re.test(lines), + // 'hashmap.uint8-array should have the right content'); + // cb(null); + // }); + // }, (t, sess, addresses, name, cb) => { + // const address = addresses[name]; + // sess.send(`v8 inspect --array-length 1 ${address}`); + + // sess.linesUntil(/\]>/, (err, lines) => { + // if (err) return cb(err); + // lines = lines.join('\n'); + // const re = new RegExp( + // '0x[0-9a-f]+:' + + // ''); + // t.ok(re.test(lines), + // 'hashmap.buffer should have the right content with ' + + // '--array-length 1'); + // cb(null); + // }); + // }] + // }, // .@@oneSymbol= 'symbol': { re: /\.(|Symbol\('oneSymbol'\))=/, From 6f1f6254c48b68b7815b2087803087d67d9028c3 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Fri, 30 Apr 2021 12:09:09 -0500 Subject: [PATCH 10/22] Check for LLDB up to version 20 in Linux --- scripts/linux.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/scripts/linux.js b/scripts/linux.js index 40d0bbd0..d58fa468 100644 --- a/scripts/linux.js +++ b/scripts/linux.js @@ -21,10 +21,15 @@ function getLldbExecutable() { return process.env.npm_config_lldb_exe; } - const lldbExeNames = [ - 'lldb', 'lldb-5.0', 'lldb-4.0', - 'lldb-3.9', 'lldb-3.8', 'lldb-3.7', 'lldb-3.6' - ]; + // Use `Array.prototype.concat.apply` to support + // runtimes without `Array.prototype.flatMap`. + // Look for LLDB up to version 20. + const versions = Array.prototype.concat.apply([], + Array.from({length: 20}, (_, i) => i + 1).map((major) => + Array.from({ length: major < 4 ? 10 : 1 }, (_, minor) => major + '.' + minor) + )); + + const lldbExeNames = ['lldb'].concat(versions.reverse().map((v) => 'lldb-' + v)); return lldb.tryExecutables(lldbExeNames); } From e6943a8b63cf7914faa87bff30af034e2d8e0864 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Fri, 30 Apr 2021 12:09:33 -0500 Subject: [PATCH 11/22] Fetch headers from official LLVM github monorepo --- scripts/lldb.js | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/scripts/lldb.js b/scripts/lldb.js index 06226ad3..c0107eee 100644 --- a/scripts/lldb.js +++ b/scripts/lldb.js @@ -10,7 +10,23 @@ const fs = require('fs'); * @returns {string} Branch of the corresponding lldb release */ function versionToBranch(version) { - return 'release_' + version.replace('.', ''); + // `llvm-project` v1-3 branches are in the form `release/major.minor.x`: + // release/1.0.x ... release/3.9.x + // `llvm-project` v4-latest branches are in the form `release/major.x`: + // release/4.x ... release/12.x + + // split into array of semver components + var chars = (version.indexOf('.') === -1 + ? version.split('') // split `39` into ['3', '9'] + : version.split('.').filter(x => x !== '.') // split `3.9` into ['3', '9'] + ); + + // if version < 4, keep `major.minor` components + // if version >= 4, only keep `major` component + chars = chars.slice(0, (+chars[0] >= 4) ? 1 : 2); + + // join components into the form `release/3.9.x` + return 'release/' + chars.concat('x').join('.'); } /** @@ -44,18 +60,30 @@ function cloneHeaders(lldbVersion, buildDir) { if (!fs.existsSync(lldbInstallDir)) { console.log(`\nCloning lldb ${lldbHeadersBranch} into ${lldbInstallDir}`); + // use `git clone --filter` in git v2.19 to only download `lldb` dir of `llvm-project` monorepo + // see: https://stackoverflow.com/a/52269934/3117331 + // see: https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/ child_process.execFileSync( 'git', ['clone', '--depth', '1', + '--filter=blob:none', + '--sparse', '--branch', lldbHeadersBranch, - 'https://github.com/llvm-mirror/lldb.git', + 'https://github.com/llvm/llvm-project.git', lldbInstallDir ], { stdio: 'inherit' }); // show progress + child_process.execFileSync( + 'git', [ + '-C', lldbInstallDir, + 'sparse-checkout', + 'set', 'lldb' + ], + { stdio: 'inherit' }); // show progress } else { console.log(`\nSkip cloning lldb headers because ${lldbInstallDir} exists`); } - return path.join(lldbInstallDir, 'include'); + return path.join(lldbInstallDir, 'lldb', 'include'); } /** From ca514b84449cedb1f8dd81c2b7126da591685376 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 18 Nov 2021 09:30:30 -0600 Subject: [PATCH 12/22] add llvm 10-13 to github actions matrix in push.yml --- .github/workflows/push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1ad8cf50..d18b1a01 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -28,7 +28,7 @@ jobs: # https://github.com/nodejs/node/issues/32981 is fixed # TODO(mmarchini): test on 20.04 (need different lldb version) os: [ubuntu-18.04, ubuntu-20.04] - llvm: [ 8, 9 ] + llvm: [ 8, 9, 10, 11, 12, 13 ] steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node.version }} ${{ matrix.node.mirror }} From 1391aef4113fc9ff81a7b7fbc5d59d586bf073c1 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 30 Jun 2022 12:46:06 -0700 Subject: [PATCH 13/22] install lldb from llvm apt repos when not packaged by Ubuntu, update node versions matrix --- .github/workflows/push.yml | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d18b1a01..a1cba87d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,16 +19,18 @@ jobs: - version: 10.x - version: 12.x - version: 14.x - - version: 15.x + - version: 16.x + - version: 18.x + - version: 19.x mirror: https://nodejs.org/download/nightly - - version: 15.x + - version: 19.x mirror: https://nodejs.org/download/v8-canary # os: [ubuntu-latest, macos-latest] # Temporarily disable MacOS until # https://github.com/nodejs/node/issues/32981 is fixed # TODO(mmarchini): test on 20.04 (need different lldb version) os: [ubuntu-18.04, ubuntu-20.04] - llvm: [ 8, 9, 10, 11, 12, 13 ] + llvm: [8, 9, 10, 11, 12, 13, 14] steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node.version }} ${{ matrix.node.mirror }} @@ -40,6 +42,28 @@ jobs: - name: install dependencies Linux if: startsWith(matrix.os, 'ubuntu-') run: | + use_llvm_repos=0 + + case "${{ matrix.os }}-${{ matrix.llvm }}" in + ubuntu18.04-10) use_llvm_repos=1;; + ubuntu18.04-11) use_llvm_repos=1;; + ubuntu18.04-12) use_llvm_repos=1;; + ubuntu18.04-13) use_llvm_repos=1;; + ubuntu18.04-14) use_llvm_repos=1;; + ubuntu20.04-13) use_llvm_repos=1;; + ubuntu20.04-14) use_llvm_repos=1;; + *) use_llvm_repos=0;; + esac + + if [[ ${use_llvm_repos} == 1 ]]; then + wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -; + release="$(lsb_release -cs)" + cat << EOF | sudo tee /etc/apt/sources.list.d/llvm-${{ matrix.llvm }}.list + deb http://apt.llvm.org/${release}/ llvm-toolchain-${release}-${{ matrix.llvm }} main + deb-src http://apt.llvm.org/${release}/ llvm-toolchain-${release}-${{ matrix.llvm }} main + EOF + fi + sudo apt-get -qq update sudo apt-get install lldb-${{ matrix.llvm }} liblldb-${{ matrix.llvm }}-dev lcov gdb -y sudo ln -s $(which lldb-${{ matrix.llvm }}) /usr/bin/lldb @@ -48,13 +72,13 @@ jobs: npm install --llnode_build_addon=true --llnode_coverage=true - name: run tests run: TEST_LLDB_BINARY=`which lldb-${{ matrix.llvm }}` npm run nyc-test-all - if: matrix.node.version != '15.x' + if: matrix.node.version != '19.x' - name: run tests (nightly) run: TEST_LLDB_BINARY=`which lldb-${{ matrix.llvm }}` npm run nyc-test-all - if: matrix.node.version == '15.x' + if: matrix.node.version == '19.x' continue-on-error: true - name: prepare coverage - if: startsWith(matrix.os, 'ubuntu-') && matrix.node.version != '15.x' + if: startsWith(matrix.os, 'ubuntu-') && matrix.node.version != '19.x' run: | npm run coverage cat ./coverage-js.info > ./coverage.info @@ -70,7 +94,7 @@ jobs: - name: Use Node.js LTS uses: actions/setup-node@v1 with: - node-version: 12.x + node-version: 18.x - name: npm install, build, and test run: | sudo apt-get -qq update From 62def8231b1578092a883f2dfa472f4a530d9bbf Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 30 Jun 2022 12:48:37 -0700 Subject: [PATCH 14/22] fix bash whitespace --- .github/workflows/push.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a1cba87d..74170156 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -59,9 +59,9 @@ jobs: wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -; release="$(lsb_release -cs)" cat << EOF | sudo tee /etc/apt/sources.list.d/llvm-${{ matrix.llvm }}.list - deb http://apt.llvm.org/${release}/ llvm-toolchain-${release}-${{ matrix.llvm }} main - deb-src http://apt.llvm.org/${release}/ llvm-toolchain-${release}-${{ matrix.llvm }} main - EOF + deb http://apt.llvm.org/${release}/ llvm-toolchain-${release}-${{ matrix.llvm }} main + deb-src http://apt.llvm.org/${release}/ llvm-toolchain-${release}-${{ matrix.llvm }} main + EOF fi sudo apt-get -qq update From fe1b13918b94e606876ca78495429b6ca52fbe89 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 30 Jun 2022 12:57:23 -0700 Subject: [PATCH 15/22] install lldb without prefix when using llvm apt repos --- .github/workflows/push.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 74170156..c0a075b1 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -43,6 +43,7 @@ jobs: if: startsWith(matrix.os, 'ubuntu-') run: | use_llvm_repos=0 + lldb_pkg="lldb-${{ matrix.llvm }}" case "${{ matrix.os }}-${{ matrix.llvm }}" in ubuntu18.04-10) use_llvm_repos=1;; @@ -56,6 +57,7 @@ jobs: esac if [[ ${use_llvm_repos} == 1 ]]; then + lldb_pkg="lldb"; wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -; release="$(lsb_release -cs)" cat << EOF | sudo tee /etc/apt/sources.list.d/llvm-${{ matrix.llvm }}.list @@ -65,8 +67,10 @@ jobs: fi sudo apt-get -qq update - sudo apt-get install lldb-${{ matrix.llvm }} liblldb-${{ matrix.llvm }}-dev lcov gdb -y - sudo ln -s $(which lldb-${{ matrix.llvm }}) /usr/bin/lldb + sudo apt-get install ${lldb_pkg} lib${lldb_pkg}-dev lcov gdb -y + if [[ -z "$(which lldb-${{ matrix.llvm }})" ]]; then + sudo ln -s "$(which lldb-${{ matrix.llvm }})" /usr/bin/lldb + fi - name: npm install run: | npm install --llnode_build_addon=true --llnode_coverage=true From 323e4f49e917bc434be008d124606e520ba61623 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 30 Jun 2022 13:00:25 -0700 Subject: [PATCH 16/22] fix typos --- .github/workflows/push.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c0a075b1..6af2c6f0 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -43,21 +43,19 @@ jobs: if: startsWith(matrix.os, 'ubuntu-') run: | use_llvm_repos=0 - lldb_pkg="lldb-${{ matrix.llvm }}" case "${{ matrix.os }}-${{ matrix.llvm }}" in - ubuntu18.04-10) use_llvm_repos=1;; - ubuntu18.04-11) use_llvm_repos=1;; - ubuntu18.04-12) use_llvm_repos=1;; - ubuntu18.04-13) use_llvm_repos=1;; - ubuntu18.04-14) use_llvm_repos=1;; - ubuntu20.04-13) use_llvm_repos=1;; - ubuntu20.04-14) use_llvm_repos=1;; + ubuntu-18.04-10) use_llvm_repos=1;; + ubuntu-18.04-11) use_llvm_repos=1;; + ubuntu-18.04-12) use_llvm_repos=1;; + ubuntu-18.04-13) use_llvm_repos=1;; + ubuntu-18.04-14) use_llvm_repos=1;; + ubuntu-20.04-13) use_llvm_repos=1;; + ubuntu-20.04-14) use_llvm_repos=1;; *) use_llvm_repos=0;; esac if [[ ${use_llvm_repos} == 1 ]]; then - lldb_pkg="lldb"; wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -; release="$(lsb_release -cs)" cat << EOF | sudo tee /etc/apt/sources.list.d/llvm-${{ matrix.llvm }}.list @@ -67,10 +65,12 @@ jobs: fi sudo apt-get -qq update - sudo apt-get install ${lldb_pkg} lib${lldb_pkg}-dev lcov gdb -y - if [[ -z "$(which lldb-${{ matrix.llvm }})" ]]; then - sudo ln -s "$(which lldb-${{ matrix.llvm }})" /usr/bin/lldb - fi + sudo apt-get install -y --no-install-recommends \ + lcov gdb \ + lldb-${{ matrix.llvm }} \ + liblldb-${{ matrix.llvm }}-dev + + sudo ln -s "$(which lldb-${{ matrix.llvm }})" /usr/bin/lldb - name: npm install run: | npm install --llnode_build_addon=true --llnode_coverage=true From 4625c9a77685cb19a5b20b0678a9e1350b0db663 Mon Sep 17 00:00:00 2001 From: ptaylor Date: Thu, 30 Jun 2022 13:06:04 -0700 Subject: [PATCH 17/22] also symlink llvm-config binary --- .github/workflows/push.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 6af2c6f0..8832360d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -70,7 +70,13 @@ jobs: lldb-${{ matrix.llvm }} \ liblldb-${{ matrix.llvm }}-dev - sudo ln -s "$(which lldb-${{ matrix.llvm }})" /usr/bin/lldb + if [[ -n "$(which lldb-${{ matrix.llvm }})" ]]; then + sudo ln -s "$(which lldb-${{ matrix.llvm }})" /usr/bin/lldb + fi + + if [[ -n "$(which llvm-config-${{ matrix.llvm }})" ]]; then + sudo ln -s "$(which llvm-config-${{ matrix.llvm }})" /usr/bin/llvm-config + fi - name: npm install run: | npm install --llnode_build_addon=true --llnode_coverage=true From 6e892bcfb3ab7c287bc220ae35bde3267d176d6c Mon Sep 17 00:00:00 2001 From: Anton Whalley Date: Wed, 17 Aug 2022 20:14:32 +0100 Subject: [PATCH 18/22] test: update test for multi-line error Signed-off-by: Anton Whalley --- test/common.js | 29 +++++++++++++++++++++++------ test/plugin/inspect-test.js | 4 ++-- test/plugin/scan-test.js | 2 +- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/test/common.js b/test/common.js index 14b890e9..2028e64b 100644 --- a/test/common.js +++ b/test/common.js @@ -52,12 +52,23 @@ function SessionOutput(session, stream, timeout) { if (!this.waiting) break - let index = buf.indexOf('\n'); + let line = ''; + let index = 0; + + let inv = buf.indexOf('invalid_expr'); + if (inv !== -1) { + line = buf; + index = buf.length; + } else { + + index = buf.indexOf('\n'); + + if (index === -1) + break; + + line = buf.slice(0, index); + } - if (index === -1) - break; - - const line = buf.slice(0, index); buf = buf.slice(index + 1); if (/process \d+ exited/i.test(line)) @@ -107,6 +118,7 @@ SessionOutput.prototype.wait = function wait(regexp, callback, allLines) { const lines = []; function onLine(line) { + // console.log(line); lines.push(line); if (self.session) debug(`[LINE][${self.session.lldb.pid}]`, line); @@ -197,9 +209,14 @@ function Session(options) { this.stderr = new SessionOutput(this, this.lldb.stderr, timeout); this.stderr.on('line', (line) => { - debug('[stderr]', line); + console.log("stderrorline:" + line); + }); + + this.stdout.on('line', (line) => { + }); + // Map these methods to stdout for compatibility with legacy tests. this.wait = SessionOutput.prototype.wait.bind(this.stdout); this.waitError = SessionOutput.prototype.wait.bind(this.stderr); diff --git a/test/plugin/inspect-test.js b/test/plugin/inspect-test.js index 75510fa0..0ff8f795 100644 --- a/test/plugin/inspect-test.js +++ b/test/plugin/inspect-test.js @@ -658,11 +658,11 @@ function verifyInvalidExpr(t, sess) { return teardown(t, sess, err); } t.ok( - /error: error: use of undeclared identifier 'invalid_expr'/.test(line), + /use of undeclared identifier 'invalid_expr'/.test(line), 'invalid expression should return an error' ); teardown(t, sess); - }); + }, false); } tape('v8 inspect', (t) => { diff --git a/test/plugin/scan-test.js b/test/plugin/scan-test.js index 13b2cbd4..475c4a16 100644 --- a/test/plugin/scan-test.js +++ b/test/plugin/scan-test.js @@ -27,7 +27,7 @@ function testFindrefsForInvalidExpr(t, sess, next) { sess.waitError(/error:/, (err, line) => { t.error(err); t.ok( - /error: error: use of undeclared identifier 'invalid_expr'/.test(line), + /use of undeclared identifier 'invalid_expr'/.test(line), 'invalid expression should return an error' ); next(); From 1ea06f33fbefafb0e47cf723c538f0fdf18c13f4 Mon Sep 17 00:00:00 2001 From: Anton Whalley Date: Wed, 17 Aug 2022 20:26:00 +0100 Subject: [PATCH 19/22] test: remove 16 18 nightly Signed-off-by: Anton Whalley --- .github/workflows/push.yml | 12 ++++++------ test/common.js | 11 +---------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 8832360d..924032c6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -19,12 +19,12 @@ jobs: - version: 10.x - version: 12.x - version: 14.x - - version: 16.x - - version: 18.x - - version: 19.x - mirror: https://nodejs.org/download/nightly - - version: 19.x - mirror: https://nodejs.org/download/v8-canary + # - version: 16.x + # - version: 18.x + # - version: 19.x + # mirror: https://nodejs.org/download/nightly + # - version: 19.x + # mirror: https://nodejs.org/download/v8-canary # os: [ubuntu-latest, macos-latest] # Temporarily disable MacOS until # https://github.com/nodejs/node/issues/32981 is fixed diff --git a/test/common.js b/test/common.js index 2028e64b..773603ae 100644 --- a/test/common.js +++ b/test/common.js @@ -118,7 +118,7 @@ SessionOutput.prototype.wait = function wait(regexp, callback, allLines) { const lines = []; function onLine(line) { - // console.log(line); + lines.push(line); if (self.session) debug(`[LINE][${self.session.lldb.pid}]`, line); @@ -208,15 +208,6 @@ function Session(options) { this.stdout = new SessionOutput(this, this.lldb.stdout, timeout); this.stderr = new SessionOutput(this, this.lldb.stderr, timeout); - this.stderr.on('line', (line) => { - console.log("stderrorline:" + line); - }); - - this.stdout.on('line', (line) => { - - }); - - // Map these methods to stdout for compatibility with legacy tests. this.wait = SessionOutput.prototype.wait.bind(this.stdout); this.waitError = SessionOutput.prototype.wait.bind(this.stderr); From 3b5a489ba45149a0adf837af58ff6f3820d63569 Mon Sep 17 00:00:00 2001 From: Anton Whalley Date: Wed, 17 Aug 2022 20:50:05 +0100 Subject: [PATCH 20/22] test: fix lib/lib mapping issue Signed-off-by: Anton Whalley --- .github/workflows/push.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 924032c6..96a4f361 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -72,6 +72,8 @@ jobs: if [[ -n "$(which lldb-${{ matrix.llvm }})" ]]; then sudo ln -s "$(which lldb-${{ matrix.llvm }})" /usr/bin/lldb + sudo mkdir -p /usr/lib/lib/python3.8 + sudo ln -s /usr/lib/llvm-${{ matrix.llvm }}/lib/python3.8/site-packages /usr/lib/lib/python3.8/site-packages fi if [[ -n "$(which llvm-config-${{ matrix.llvm }})" ]]; then From ff75da7eb151cf8d7481eba9a1c6406a53c85ce5 Mon Sep 17 00:00:00 2001 From: Anton Whalley Date: Wed, 17 Aug 2022 22:08:59 +0100 Subject: [PATCH 21/22] test: bump timeouts due to later lldbs Signed-off-by: Anton Whalley --- test/common.js | 4 ++-- test/plugin/workqueue-test.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/common.js b/test/common.js index 773603ae..a54abed6 100644 --- a/test/common.js +++ b/test/common.js @@ -42,7 +42,7 @@ function SessionOutput(session, stream, timeout) { this.waiting = false; this.waitQueue = []; let buf = ''; - this.timeout = timeout || 10000; + this.timeout = timeout || 20000; this.session = session; this.flush = function flush() { @@ -170,7 +170,7 @@ SessionOutput.prototype.linesUntil = function linesUntil(regexp, callback) { function Session(options) { EventEmitter.call(this); - const timeout = parseInt(process.env.TEST_TIMEOUT) || 10000; + const timeout = parseInt(process.env.TEST_TIMEOUT) || 20000; const lldbBin = process.env.TEST_LLDB_BINARY || 'lldb'; const env = Object.assign({}, process.env); diff --git a/test/plugin/workqueue-test.js b/test/plugin/workqueue-test.js index 7fcb7a93..5ffda231 100644 --- a/test/plugin/workqueue-test.js +++ b/test/plugin/workqueue-test.js @@ -26,7 +26,7 @@ function testWorkqueueCommands(t, sess) { } tape('v8 workqueue commands', (t) => { - t.timeoutAfter(15000); + t.timeoutAfter(30000); const sess = common.Session.create('workqueue-scenario.js'); sess.timeoutAfter From 823196af2c05c37c5581c5e8378d5526ef70466b Mon Sep 17 00:00:00 2001 From: anton whalley Date: Tue, 13 Sep 2022 23:39:02 +0100 Subject: [PATCH 22/22] release: bump package.json for release Signed-off-by: anton whalley --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 48dc8e43..d35d8809 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "llnode", - "version": "3.2.0", + "version": "3.3.0", "description": "An lldb plugin for Node.js and V8, which enables inspection of JavaScript states for insights into Node.js processes and their core dumps.", "main": "index.js", "directories": {