From 38318497eb583f8626617135f8eb94323b5e5b1b Mon Sep 17 00:00:00 2001 From: valhayot Date: Wed, 16 Jun 2021 22:52:10 -0400 Subject: [PATCH 1/5] fixed but in make_file_name_canonical --- src/passthrough.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/passthrough.cpp b/src/passthrough.cpp index c207671f..b5cb67fc 100644 --- a/src/passthrough.cpp +++ b/src/passthrough.cpp @@ -210,7 +210,7 @@ char *make_file_name_canonical(char const *file_path) } canonical_file_path = ((funcptr_realpath)libc_realpath)(file_path, NULL); - if (canonical_file_path == NULL && errno == ENOENT) + if (canonical_file_path == NULL && (errno == ENOENT || errno == ENOTDIR)) { // The file was not found. Back up to a segment which exists, // and append the remainder of the path to it. From f74e0089b95764902fea163c19481032e74e0287 Mon Sep 17 00:00:00 2001 From: valhayot Date: Thu, 17 Jun 2021 12:57:54 -0400 Subject: [PATCH 2/5] added tmate to workflow to help debug --- .github/workflows/sea-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sea-tests.yml b/.github/workflows/sea-tests.yml index 0c8b6121..1856a5eb 100644 --- a/.github/workflows/sea-tests.yml +++ b/.github/workflows/sea-tests.yml @@ -13,6 +13,8 @@ jobs: - run: docker --version - name: Git checkout uses: actions/checkout@v2 + - name: setup tmate session + uses: mxschmitt/action-tmate@v3 - run: cd ${{ github.workspace }} - run: docker build tests/docker -f tests/docker/Dockerfile.${{ matrix.os-name }} -t imagetest:${{ matrix.os-name }} - run: docker run --rm -v $PWD:$PWD -w $PWD imagetest:${{ matrix.os-name }} make clean From d0d434d571d050cc208792d89326f173c8e4d64f Mon Sep 17 00:00:00 2001 From: valhayot Date: Thu, 17 Jun 2021 13:03:55 -0400 Subject: [PATCH 3/5] added tmate to workflow to help debug --- .github/workflows/sea-tests.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sea-tests.yml b/.github/workflows/sea-tests.yml index 1856a5eb..25847b4a 100644 --- a/.github/workflows/sea-tests.yml +++ b/.github/workflows/sea-tests.yml @@ -13,13 +13,14 @@ jobs: - run: docker --version - name: Git checkout uses: actions/checkout@v2 - - name: setup tmate session - uses: mxschmitt/action-tmate@v3 - run: cd ${{ github.workspace }} - run: docker build tests/docker -f tests/docker/Dockerfile.${{ matrix.os-name }} -t imagetest:${{ matrix.os-name }} - run: docker run --rm -v $PWD:$PWD -w $PWD imagetest:${{ matrix.os-name }} make clean - run: docker run --rm -v $PWD:$PWD -w $PWD imagetest:${{ matrix.os-name }} make test debug_opts="-g -ggdb --coverage -fprofile-arcs -ftest-coverage" - run: docker run --rm -v $PWD:$PWD -w $PWD imagetest:${{ matrix.os-name }} bats tests/tests.bats - run: docker run --rm -v $PWD:$PWD -w $PWD -e SEA_HOME=$PWD -e LD_PRELOAD=$PWD/build/sea.so imagetest:${{ matrix.os-name }} tests/test_custom + - name: setup tmate session + if: ${{ failure() }} + uses: mxschmitt/action-tmate@v3 From 5f171e5bba0fa4a16c1581d307e426bd551bb73d Mon Sep 17 00:00:00 2001 From: mathdugre Date: Thu, 17 Jun 2021 13:22:41 -0400 Subject: [PATCH 4/5] [ADD] Manual trigger of ssh-debug session. --- .github/workflows/sea-tests.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sea-tests.yml b/.github/workflows/sea-tests.yml index 25847b4a..8d8d66fe 100644 --- a/.github/workflows/sea-tests.yml +++ b/.github/workflows/sea-tests.yml @@ -1,6 +1,15 @@ -on: [push] name: Tests +on: + push + + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + jobs: install-docker: runs-on: ubuntu-20.04 @@ -20,7 +29,7 @@ jobs: - run: docker run --rm -v $PWD:$PWD -w $PWD imagetest:${{ matrix.os-name }} bats tests/tests.bats - run: docker run --rm -v $PWD:$PWD -w $PWD -e SEA_HOME=$PWD -e LD_PRELOAD=$PWD/build/sea.so imagetest:${{ matrix.os-name }} tests/test_custom - name: setup tmate session - if: ${{ failure() }} + if: ${{ failure() && github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} uses: mxschmitt/action-tmate@v3 From 0d3e5a8534b5cd045e4a262e16a360647af9218f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Dugr=C3=A9?= Date: Thu, 17 Jun 2021 13:44:09 -0400 Subject: [PATCH 5/5] [FIX] yaml syntax --- .github/workflows/sea-tests.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sea-tests.yml b/.github/workflows/sea-tests.yml index 8d8d66fe..e91a1154 100644 --- a/.github/workflows/sea-tests.yml +++ b/.github/workflows/sea-tests.yml @@ -1,14 +1,14 @@ name: Tests -on: - push +on: + push: workflow_dispatch: inputs: debug_enabled: description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' required: false - default: false + default: "false" jobs: install-docker: @@ -29,7 +29,7 @@ jobs: - run: docker run --rm -v $PWD:$PWD -w $PWD imagetest:${{ matrix.os-name }} bats tests/tests.bats - run: docker run --rm -v $PWD:$PWD -w $PWD -e SEA_HOME=$PWD -e LD_PRELOAD=$PWD/build/sea.so imagetest:${{ matrix.os-name }} tests/test_custom - name: setup tmate session - if: ${{ failure() && github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + if: ${{ failure() && github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }} uses: mxschmitt/action-tmate@v3