diff mbox series

[ovs-dev,v2,3/9] ci: Add make check-offloads to GitHub actions ci.

Message ID 170108873702.394857.13384894777407724840.stgit@ebuild
State Changes Requested
Headers show
Series ci: Add remaining check tests to GitHub actions. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/intel-ovs-compilation success test: success

Commit Message

Eelco Chaudron Nov. 27, 2023, 12:39 p.m. UTC
This patch also adds the 'CHECK_GITHUB_ACTION' macro to skip
tests that won't execute successfully through GitHub actions.
We could not use the -k !keyword option, as it can not be
combined with a range of tests.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
---
 .ci/linux-build.sh                   |    2 +-
 .github/workflows/build-and-test.yml |    7 +++++++
 tests/system-common-macros.at        |    4 ++++
 tests/system-offloads-traffic.at     |    2 ++
 4 files changed, 14 insertions(+), 1 deletion(-)

Comments

Ilya Maximets Nov. 27, 2023, 6:04 p.m. UTC | #1
On 11/27/23 13:39, Eelco Chaudron wrote:
> This patch also adds the 'CHECK_GITHUB_ACTION' macro to skip
> tests that won't execute successfully through GitHub actions.
> We could not use the -k !keyword option, as it can not be
> combined with a range of tests.
> 
> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
> ---
>  .ci/linux-build.sh                   |    2 +-
>  .github/workflows/build-and-test.yml |    7 +++++++
>  tests/system-common-macros.at        |    4 ++++
>  tests/system-offloads-traffic.at     |    2 ++
>  4 files changed, 14 insertions(+), 1 deletion(-)
> 
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index 4f2e36610..85788748f 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -139,7 +139,7 @@ else
>              export DPDK_EAL_OPTIONS="--lcores 0@1,1@1,2@1"
>          fi
>          $run_as_root make $testsuite TESTSUITEFLAGS="$JOBS $TEST_RANGE" \
> -                                     RECHECK=yes
> +                                     RECHECK=yes GITHUB_ACTIONS=$GITHUB_ACTIONS
>      done
>  fi
>  
> diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
> index 0b881ca91..586b0cdd9 100644
> --- a/.github/workflows/build-and-test.yml
> +++ b/.github/workflows/build-and-test.yml
> @@ -176,6 +176,13 @@ jobs:
>              testsuite:    check-kernel
>              test_range:   "100-"
>  
> +          - compiler:     gcc
> +            testsuite:    check-offloads
> +            test_range:   "-100"
> +          - compiler:     gcc
> +            testsuite:    check-offloads
> +            test_range:   "100-"
> +
>      steps:
>      - name: checkout
>        uses: actions/checkout@v3
> diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
> index 0113aae8b..0620be0c7 100644
> --- a/tests/system-common-macros.at
> +++ b/tests/system-common-macros.at
> @@ -365,3 +365,7 @@ m4_define([OVS_CHECK_IPROUTE_ENCAP],
>  # OVS_CHECK_CT_CLEAR()
>  m4_define([OVS_CHECK_CT_CLEAR],
>      [AT_SKIP_IF([! grep -q "Datapath supports ct_clear action" ovs-vswitchd.log])])
> +
> +# OVS_CHECK_GITHUB_ACTION
> +m4_define([OVS_CHECK_GITHUB_ACTION],
> +    [AT_SKIP_IF([test "$GITHUB_ACTIONS" = "true"])])

Can we use some pre-defined GHA env variable instead?
Or are they not available?  

> diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at
> index 0bedee753..6bd49a3ee 100644
> --- a/tests/system-offloads-traffic.at
> +++ b/tests/system-offloads-traffic.at
> @@ -192,6 +192,7 @@ AT_CLEANUP
>  AT_SETUP([offloads - check interface meter offloading -  offloads disabled])
>  AT_KEYWORDS([dp-meter])
>  AT_SKIP_IF([test $HAVE_NC = "no"])
> +OVS_CHECK_GITHUB_ACTION()
>  OVS_TRAFFIC_VSWITCHD_START()
>  
>  AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps bands=type=drop rate=1'])
> @@ -240,6 +241,7 @@ AT_CLEANUP
>  
>  AT_SETUP([offloads - check interface meter offloading -  offloads enabled])
>  AT_KEYWORDS([offload-meter])
> +OVS_CHECK_GITHUB_ACTION()
>  CHECK_TC_INGRESS_PPS()
>  AT_SKIP_IF([test $HAVE_NC = "no"])
>  OVS_TRAFFIC_VSWITCHD_START([], [], [-- set Open_vSwitch . other_config:hw-offload=true])
> 
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Eelco Chaudron Nov. 28, 2023, 7:43 a.m. UTC | #2
On 27 Nov 2023, at 19:04, Ilya Maximets wrote:

> On 11/27/23 13:39, Eelco Chaudron wrote:
>> This patch also adds the 'CHECK_GITHUB_ACTION' macro to skip
>> tests that won't execute successfully through GitHub actions.
>> We could not use the -k !keyword option, as it can not be
>> combined with a range of tests.
>>
>> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
>> ---
>>  .ci/linux-build.sh                   |    2 +-
>>  .github/workflows/build-and-test.yml |    7 +++++++
>>  tests/system-common-macros.at        |    4 ++++
>>  tests/system-offloads-traffic.at     |    2 ++
>>  4 files changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
>> index 4f2e36610..85788748f 100755
>> --- a/.ci/linux-build.sh
>> +++ b/.ci/linux-build.sh
>> @@ -139,7 +139,7 @@ else
>>              export DPDK_EAL_OPTIONS="--lcores 0@1,1@1,2@1"
>>          fi
>>          $run_as_root make $testsuite TESTSUITEFLAGS="$JOBS $TEST_RANGE" \
>> -                                     RECHECK=yes
>> +                                     RECHECK=yes GITHUB_ACTIONS=$GITHUB_ACTIONS
>>      done
>>  fi
>>
>> diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
>> index 0b881ca91..586b0cdd9 100644
>> --- a/.github/workflows/build-and-test.yml
>> +++ b/.github/workflows/build-and-test.yml
>> @@ -176,6 +176,13 @@ jobs:
>>              testsuite:    check-kernel
>>              test_range:   "100-"
>>
>> +          - compiler:     gcc
>> +            testsuite:    check-offloads
>> +            test_range:   "-100"
>> +          - compiler:     gcc
>> +            testsuite:    check-offloads
>> +            test_range:   "100-"
>> +
>>      steps:
>>      - name: checkout
>>        uses: actions/checkout@v3
>> diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
>> index 0113aae8b..0620be0c7 100644
>> --- a/tests/system-common-macros.at
>> +++ b/tests/system-common-macros.at
>> @@ -365,3 +365,7 @@ m4_define([OVS_CHECK_IPROUTE_ENCAP],
>>  # OVS_CHECK_CT_CLEAR()
>>  m4_define([OVS_CHECK_CT_CLEAR],
>>      [AT_SKIP_IF([! grep -q "Datapath supports ct_clear action" ovs-vswitchd.log])])
>> +
>> +# OVS_CHECK_GITHUB_ACTION
>> +m4_define([OVS_CHECK_GITHUB_ACTION],
>> +    [AT_SKIP_IF([test "$GITHUB_ACTIONS" = "true"])])
>
> Can we use some pre-defined GHA env variable instead?
> Or are they not available?

This is a pre-defined GH env. See above we re-export it as we run as root.

>> diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at
>> index 0bedee753..6bd49a3ee 100644
>> --- a/tests/system-offloads-traffic.at
>> +++ b/tests/system-offloads-traffic.at
>> @@ -192,6 +192,7 @@ AT_CLEANUP
>>  AT_SETUP([offloads - check interface meter offloading -  offloads disabled])
>>  AT_KEYWORDS([dp-meter])
>>  AT_SKIP_IF([test $HAVE_NC = "no"])
>> +OVS_CHECK_GITHUB_ACTION()
>>  OVS_TRAFFIC_VSWITCHD_START()
>>
>>  AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps bands=type=drop rate=1'])
>> @@ -240,6 +241,7 @@ AT_CLEANUP
>>
>>  AT_SETUP([offloads - check interface meter offloading -  offloads enabled])
>>  AT_KEYWORDS([offload-meter])
>> +OVS_CHECK_GITHUB_ACTION()
>>  CHECK_TC_INGRESS_PPS()
>>  AT_SKIP_IF([test $HAVE_NC = "no"])
>>  OVS_TRAFFIC_VSWITCHD_START([], [], [-- set Open_vSwitch . other_config:hw-offload=true])
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
Ilya Maximets Nov. 28, 2023, 12:10 p.m. UTC | #3
On 11/28/23 08:43, Eelco Chaudron wrote:
> 
> 
> On 27 Nov 2023, at 19:04, Ilya Maximets wrote:
> 
>> On 11/27/23 13:39, Eelco Chaudron wrote:
>>> This patch also adds the 'CHECK_GITHUB_ACTION' macro to skip
>>> tests that won't execute successfully through GitHub actions.
>>> We could not use the -k !keyword option, as it can not be
>>> combined with a range of tests.
>>>
>>> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
>>> ---
>>>  .ci/linux-build.sh                   |    2 +-
>>>  .github/workflows/build-and-test.yml |    7 +++++++
>>>  tests/system-common-macros.at        |    4 ++++
>>>  tests/system-offloads-traffic.at     |    2 ++
>>>  4 files changed, 14 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
>>> index 4f2e36610..85788748f 100755
>>> --- a/.ci/linux-build.sh
>>> +++ b/.ci/linux-build.sh
>>> @@ -139,7 +139,7 @@ else
>>>              export DPDK_EAL_OPTIONS="--lcores 0@1,1@1,2@1"
>>>          fi
>>>          $run_as_root make $testsuite TESTSUITEFLAGS="$JOBS $TEST_RANGE" \
>>> -                                     RECHECK=yes
>>> +                                     RECHECK=yes GITHUB_ACTIONS=$GITHUB_ACTIONS
>>>      done
>>>  fi
>>>
>>> diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
>>> index 0b881ca91..586b0cdd9 100644
>>> --- a/.github/workflows/build-and-test.yml
>>> +++ b/.github/workflows/build-and-test.yml
>>> @@ -176,6 +176,13 @@ jobs:
>>>              testsuite:    check-kernel
>>>              test_range:   "100-"
>>>
>>> +          - compiler:     gcc
>>> +            testsuite:    check-offloads
>>> +            test_range:   "-100"
>>> +          - compiler:     gcc
>>> +            testsuite:    check-offloads
>>> +            test_range:   "100-"
>>> +
>>>      steps:
>>>      - name: checkout
>>>        uses: actions/checkout@v3
>>> diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
>>> index 0113aae8b..0620be0c7 100644
>>> --- a/tests/system-common-macros.at
>>> +++ b/tests/system-common-macros.at
>>> @@ -365,3 +365,7 @@ m4_define([OVS_CHECK_IPROUTE_ENCAP],
>>>  # OVS_CHECK_CT_CLEAR()
>>>  m4_define([OVS_CHECK_CT_CLEAR],
>>>      [AT_SKIP_IF([! grep -q "Datapath supports ct_clear action" ovs-vswitchd.log])])
>>> +
>>> +# OVS_CHECK_GITHUB_ACTION
>>> +m4_define([OVS_CHECK_GITHUB_ACTION],
>>> +    [AT_SKIP_IF([test "$GITHUB_ACTIONS" = "true"])])
>>
>> Can we use some pre-defined GHA env variable instead?
>> Or are they not available?
> 
> This is a pre-defined GH env. See above we re-export it as we run as root.

Hmm.   I got confused, because you're passing it directly to 'make'
and not as part of 'run_as_root'.  Maybe move it there, so it's
obvious that the problem is the same as with PATH?

> 
>>> diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at
>>> index 0bedee753..6bd49a3ee 100644
>>> --- a/tests/system-offloads-traffic.at
>>> +++ b/tests/system-offloads-traffic.at
>>> @@ -192,6 +192,7 @@ AT_CLEANUP
>>>  AT_SETUP([offloads - check interface meter offloading -  offloads disabled])
>>>  AT_KEYWORDS([dp-meter])
>>>  AT_SKIP_IF([test $HAVE_NC = "no"])
>>> +OVS_CHECK_GITHUB_ACTION()
>>>  OVS_TRAFFIC_VSWITCHD_START()
>>>
>>>  AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps bands=type=drop rate=1'])
>>> @@ -240,6 +241,7 @@ AT_CLEANUP
>>>
>>>  AT_SETUP([offloads - check interface meter offloading -  offloads enabled])
>>>  AT_KEYWORDS([offload-meter])
>>> +OVS_CHECK_GITHUB_ACTION()
>>>  CHECK_TC_INGRESS_PPS()
>>>  AT_SKIP_IF([test $HAVE_NC = "no"])
>>>  OVS_TRAFFIC_VSWITCHD_START([], [], [-- set Open_vSwitch . other_config:hw-offload=true])
>>>
>>> _______________________________________________
>>> dev mailing list
>>> dev@openvswitch.org
>>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>>
>
Eelco Chaudron Nov. 28, 2023, 6:16 p.m. UTC | #4
On 28 Nov 2023, at 13:10, Ilya Maximets wrote:

> On 11/28/23 08:43, Eelco Chaudron wrote:
>>
>>
>> On 27 Nov 2023, at 19:04, Ilya Maximets wrote:
>>
>>> On 11/27/23 13:39, Eelco Chaudron wrote:
>>>> This patch also adds the 'CHECK_GITHUB_ACTION' macro to skip
>>>> tests that won't execute successfully through GitHub actions.
>>>> We could not use the -k !keyword option, as it can not be
>>>> combined with a range of tests.
>>>>
>>>> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
>>>> ---
>>>>  .ci/linux-build.sh                   |    2 +-
>>>>  .github/workflows/build-and-test.yml |    7 +++++++
>>>>  tests/system-common-macros.at        |    4 ++++
>>>>  tests/system-offloads-traffic.at     |    2 ++
>>>>  4 files changed, 14 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
>>>> index 4f2e36610..85788748f 100755
>>>> --- a/.ci/linux-build.sh
>>>> +++ b/.ci/linux-build.sh
>>>> @@ -139,7 +139,7 @@ else
>>>>              export DPDK_EAL_OPTIONS="--lcores 0@1,1@1,2@1"
>>>>          fi
>>>>          $run_as_root make $testsuite TESTSUITEFLAGS="$JOBS $TEST_RANGE" \
>>>> -                                     RECHECK=yes
>>>> +                                     RECHECK=yes GITHUB_ACTIONS=$GITHUB_ACTIONS
>>>>      done
>>>>  fi
>>>>
>>>> diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
>>>> index 0b881ca91..586b0cdd9 100644
>>>> --- a/.github/workflows/build-and-test.yml
>>>> +++ b/.github/workflows/build-and-test.yml
>>>> @@ -176,6 +176,13 @@ jobs:
>>>>              testsuite:    check-kernel
>>>>              test_range:   "100-"
>>>>
>>>> +          - compiler:     gcc
>>>> +            testsuite:    check-offloads
>>>> +            test_range:   "-100"
>>>> +          - compiler:     gcc
>>>> +            testsuite:    check-offloads
>>>> +            test_range:   "100-"
>>>> +
>>>>      steps:
>>>>      - name: checkout
>>>>        uses: actions/checkout@v3
>>>> diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
>>>> index 0113aae8b..0620be0c7 100644
>>>> --- a/tests/system-common-macros.at
>>>> +++ b/tests/system-common-macros.at
>>>> @@ -365,3 +365,7 @@ m4_define([OVS_CHECK_IPROUTE_ENCAP],
>>>>  # OVS_CHECK_CT_CLEAR()
>>>>  m4_define([OVS_CHECK_CT_CLEAR],
>>>>      [AT_SKIP_IF([! grep -q "Datapath supports ct_clear action" ovs-vswitchd.log])])
>>>> +
>>>> +# OVS_CHECK_GITHUB_ACTION
>>>> +m4_define([OVS_CHECK_GITHUB_ACTION],
>>>> +    [AT_SKIP_IF([test "$GITHUB_ACTIONS" = "true"])])
>>>
>>> Can we use some pre-defined GHA env variable instead?
>>> Or are they not available?
>>
>> This is a pre-defined GH env. See above we re-export it as we run as root.
>
> Hmm.   I got confused, because you're passing it directly to 'make'
> and not as part of 'run_as_root'.  Maybe move it there, so it's
> obvious that the problem is the same as with PATH?

ACK will move it.

>>
>>>> diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at
>>>> index 0bedee753..6bd49a3ee 100644
>>>> --- a/tests/system-offloads-traffic.at
>>>> +++ b/tests/system-offloads-traffic.at
>>>> @@ -192,6 +192,7 @@ AT_CLEANUP
>>>>  AT_SETUP([offloads - check interface meter offloading -  offloads disabled])
>>>>  AT_KEYWORDS([dp-meter])
>>>>  AT_SKIP_IF([test $HAVE_NC = "no"])
>>>> +OVS_CHECK_GITHUB_ACTION()
>>>>  OVS_TRAFFIC_VSWITCHD_START()
>>>>
>>>>  AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps bands=type=drop rate=1'])
>>>> @@ -240,6 +241,7 @@ AT_CLEANUP
>>>>
>>>>  AT_SETUP([offloads - check interface meter offloading -  offloads enabled])
>>>>  AT_KEYWORDS([offload-meter])
>>>> +OVS_CHECK_GITHUB_ACTION()
>>>>  CHECK_TC_INGRESS_PPS()
>>>>  AT_SKIP_IF([test $HAVE_NC = "no"])
>>>>  OVS_TRAFFIC_VSWITCHD_START([], [], [-- set Open_vSwitch . other_config:hw-offload=true])
>>>>
>>>> _______________________________________________
>>>> dev mailing list
>>>> dev@openvswitch.org
>>>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>>>
>>
diff mbox series

Patch

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 4f2e36610..85788748f 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -139,7 +139,7 @@  else
             export DPDK_EAL_OPTIONS="--lcores 0@1,1@1,2@1"
         fi
         $run_as_root make $testsuite TESTSUITEFLAGS="$JOBS $TEST_RANGE" \
-                                     RECHECK=yes
+                                     RECHECK=yes GITHUB_ACTIONS=$GITHUB_ACTIONS
     done
 fi
 
diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml
index 0b881ca91..586b0cdd9 100644
--- a/.github/workflows/build-and-test.yml
+++ b/.github/workflows/build-and-test.yml
@@ -176,6 +176,13 @@  jobs:
             testsuite:    check-kernel
             test_range:   "100-"
 
+          - compiler:     gcc
+            testsuite:    check-offloads
+            test_range:   "-100"
+          - compiler:     gcc
+            testsuite:    check-offloads
+            test_range:   "100-"
+
     steps:
     - name: checkout
       uses: actions/checkout@v3
diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
index 0113aae8b..0620be0c7 100644
--- a/tests/system-common-macros.at
+++ b/tests/system-common-macros.at
@@ -365,3 +365,7 @@  m4_define([OVS_CHECK_IPROUTE_ENCAP],
 # OVS_CHECK_CT_CLEAR()
 m4_define([OVS_CHECK_CT_CLEAR],
     [AT_SKIP_IF([! grep -q "Datapath supports ct_clear action" ovs-vswitchd.log])])
+
+# OVS_CHECK_GITHUB_ACTION
+m4_define([OVS_CHECK_GITHUB_ACTION],
+    [AT_SKIP_IF([test "$GITHUB_ACTIONS" = "true"])])
diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at
index 0bedee753..6bd49a3ee 100644
--- a/tests/system-offloads-traffic.at
+++ b/tests/system-offloads-traffic.at
@@ -192,6 +192,7 @@  AT_CLEANUP
 AT_SETUP([offloads - check interface meter offloading -  offloads disabled])
 AT_KEYWORDS([dp-meter])
 AT_SKIP_IF([test $HAVE_NC = "no"])
+OVS_CHECK_GITHUB_ACTION()
 OVS_TRAFFIC_VSWITCHD_START()
 
 AT_CHECK([ovs-ofctl -O OpenFlow13 add-meter br0 'meter=1 pktps bands=type=drop rate=1'])
@@ -240,6 +241,7 @@  AT_CLEANUP
 
 AT_SETUP([offloads - check interface meter offloading -  offloads enabled])
 AT_KEYWORDS([offload-meter])
+OVS_CHECK_GITHUB_ACTION()
 CHECK_TC_INGRESS_PPS()
 AT_SKIP_IF([test $HAVE_NC = "no"])
 OVS_TRAFFIC_VSWITCHD_START([], [], [-- set Open_vSwitch . other_config:hw-offload=true])