On Mon, Dec 18, 2023 at 11:59:23AM +0100, Eelco Chaudron wrote:
> 
> 
> On 15 Dec 2023, at 16:23, Simon Horman wrote:
> 
> > 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 <[email protected]>
> >> ---
> >>  .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
> 
> So the TESTSUITE value passed before this patchset is as a string “check 
> check-dpdk” so it will loop through testsuite=check, and 
> testsuite=check-dpdk. With the change in this patch the “check”, and 
> “check-ovsdb-cluster” will not run as root, all others will.
> 
> > 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
> 
> I guessed you missed ‘check check-dpdk’ and the new ‘check-ovsdb-cluster’ 
> below?

Yes, I missed that.

> 
> > So I am a little puzzled regarding the motivation for this change.
> 
> Your reply also puzzles me, but it’s Monday, and have not yet had my coffee :)

I think see my error now.

I still think that this patch does not change cases which exist
as of this patch. But I now see that it does change cases
which are added in subsequent patches in this series, f.e. check-kernel.

So I am now good with this change.
And I am sorry for the puzzling statements.

Acked-by: Simon Horman <[email protected]>

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to