[ovs-dev] [PATCH ovn] github: Fix permissions for system test artifacts.

Ilya Maximets i.maximets at ovn.org
Thu Apr 29 12:11:43 UTC 2021


System test logs are not saved due to insufficient access rights:

  cp: cannot open './tests/system-kmod-testsuite.dir/001/ovs-vswitchd.log'
        for reading: Permission denied
  cp: cannot open './tests/system-kmod-testsuite.dir/001/conf.db'
        for reading: Permission denied
  cp: cannot open './tests/system-kmod-testsuite.dir/001/ovsdb-server.log'
        for reading: Permission denied

Adding read permissions to all users before copying to avoid that.

Fixes: e45e94b00503 ("ci: Enable OVN system tests in GitHub Actions runs.")
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>
---

Bad build from current master branch:
  https://github.com/ovn-org/ovn/runs/2462470784?check_suite_focus=true#step:13:27

Build with this patch applied:
  https://github.com/igsilya/ovn/runs/2466053019?check_suite_focus=true#step:13:31

 .github/workflows/test.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b963e2244..4a150a312 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -113,6 +113,8 @@ jobs:
         mkdir logs
         cp config.log ./logs/
         cp -r ./*/_build/sub/tests/testsuite.* ./logs/ || true
+        # System tests are run as root, need to adjust permissions.
+        sudo chmod -R +r ./tests/system-kmod-testsuite.* || true
         cp -r ./tests/system-kmod-testsuite.* ./logs/ || true
         tar -czvf logs.tgz logs/
 
-- 
2.26.3



More information about the dev mailing list