]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CI: Replace the requirement for 'sudo' with a call to 'ulimit -n'
authorTim Duesterhus <tim@bastelstu.be>
Sun, 13 Jun 2021 13:02:24 +0000 (15:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 17 Jun 2021 12:57:43 +0000 (14:57 +0200)
Using 'sudo' required quite a few workarounds in various places. Setting an
explicit 'ulimit -n' removes the requirement for 'sudo', resulting in a cleaner
workflow configuration.

.github/workflows/vtest.yml

index 78671337417cc6ee266f1186886c76167bb8a92e..1dc216eeb85ca79523b78bc0aed02b83f2660e47 100644 (file)
@@ -99,13 +99,14 @@ jobs:
       run: echo "::add-matcher::.github/vtest.json"
     - name: Run VTest for HAProxy ${{ steps.show-version.outputs.version }}
       id: vtest
-      # sudo is required, because macOS fails due to an open files limit.
-      run: sudo make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
+      run: |
+        # This is required for macOS which does not actually allow to increase
+        # the '-n' soft limit to the hard limit, thus failing to run.
+        ulimit -n 5000
+        make reg-tests VTEST_PROGRAM=../vtest/vtest REGTESTS_TYPES=default,bug,devel
     - name: Show results
       if: ${{ failure() }}
-      # The chmod / sudo is necessary due to the `sudo` while running the tests.
       run: |
-        sudo chmod a+rX ${TMPDIR}/haregtests-*/
         for folder in ${TMPDIR}/haregtests-*/vtc.*; do
           printf "::group::"
           cat $folder/INFO
@@ -115,6 +116,6 @@ jobs:
         shopt -s nullglob
         for asan in asan.log*; do
           echo "::group::$asan"
-          sudo cat $asan
+          cat $asan
           echo "::endgroup::"
         done