On Tue, Dec 05, 2023 at 03:59:31PM +0100, Eelco Chaudron wrote: > This patch adds 'make check-ovsdb-cluster' tests to GitHub action ci. > In addition, this patch also makes sure this test and 'make check' do > not run as root. > > Signed-off-by: Eelco Chaudron <echau...@redhat.com> > --- > .ci/linux-build.sh | 5 ++++- > .github/workflows/build-and-test.yml | 3 +++ > 2 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh > index 67c01a644..bb540703e 100755 > --- a/.ci/linux-build.sh > +++ b/.ci/linux-build.sh > @@ -129,11 +129,14 @@ else > build_ovs > for testsuite in $TESTSUITE; do > run_as_root= > + if [ "$testsuite" != "check" ] && \ > + [ "$testsuite" != "check-ovsdb-cluster" ] ; then > + run_as_root="sudo -E PATH=$PATH" > + fi > if [ "${testsuite##*dpdk}" != "$testsuite" ]; then > sudo sh -c 'echo 1024 > /proc/sys/vm/nr_hugepages' || true > [ "$(cat /proc/sys/vm/nr_hugepages)" = '1024' ] > export DPDK_EAL_OPTIONS="--lcores 0@1,1@1,2@1" > - run_as_root="sudo -E PATH=$PATH" > fi > $run_as_root make $testsuite TESTSUITEFLAGS=${JOBS} RECHECK=yes > done
Hi Eelco, perhaps it is because it is Friday afternoon (although I did just have a coffee), but I am a but confused by the change above. My reading is that, before this change: run_as_root is set if the $testsuite includes the string "dpdk" While after the change: run_as_root is set if $testsuite is neither "check" nor check-ovsdb-cluster". In both cases: * Anything with "dpdk" results in run_as_root set; and * "check" and "check-ovsdb-cluster" do not result in run_as_root being set Further, it seems to me that the other values of TESTSUITE are: * "": which means the loop won't iterate * "test": which is special cased and also means the loop won't iterated So I am a little puzzled regarding the motivation for this change. > diff --git a/.github/workflows/build-and-test.yml > b/.github/workflows/build-and-test.yml > index 09654205e..5d441157c 100644 > --- a/.github/workflows/build-and-test.yml > +++ b/.github/workflows/build-and-test.yml > @@ -164,6 +164,9 @@ jobs: > m32: m32 > opts: --disable-ssl > > + - compiler: gcc > + testsuite: check-ovsdb-cluster > + > steps: > - name: checkout > uses: actions/checkout@v3 > > _______________________________________________ > dev mailing list > d...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev