From patchwork Mon Nov 28 14:25:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1709767 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Z0+ycutV; dkim-atps=neutral Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NLSSJ1P3Cz23nB for ; Tue, 29 Nov 2022 01:25:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 52E5640356; Mon, 28 Nov 2022 14:25:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 52E5640356 Authentication-Results: smtp4.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Z0+ycutV X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tb9VuGMjWjDV; Mon, 28 Nov 2022 14:25:49 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id DFAE9401DC; Mon, 28 Nov 2022 14:25:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org DFAE9401DC Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9ABC0C0033; Mon, 28 Nov 2022 14:25:47 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id BA6F9C002D for ; Mon, 28 Nov 2022 14:25:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 966D6400CF for ; Mon, 28 Nov 2022 14:25:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 966D6400CF Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Z0+ycutV X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p4xtXgunhXBL for ; Mon, 28 Nov 2022 14:25:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org D0A08400CC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id D0A08400CC for ; Mon, 28 Nov 2022 14:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669645544; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cGQsHzGhYabV9pwfc/x6tgl8SFODB3dkjJSIyFegf20=; b=Z0+ycutVfU2E3HQ3n3guqQK/0MlYa2Q5iJ463O5nMyBR5gPBd5gsC33mrqH30dU+DDuRtQ kd5Z18hDpe4WG1zCywYjOxnHZI3p45Mi21YGI4p5J8SjNq9Ir6SN31Qsw6CTRnVgPhJqjQ UuJxGbm7ef/YtVhz1Nk8bTBn6246pjw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-38-mwFrUOoJOHu2fV44wMGw6g-1; Mon, 28 Nov 2022 09:25:43 -0500 X-MC-Unique: mwFrUOoJOHu2fV44wMGw6g-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D483829ABA14 for ; Mon, 28 Nov 2022 14:25:42 +0000 (UTC) Received: from amusil.redhat.com (ovpn-193-48.brq.redhat.com [10.40.193.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4CF80492B08; Mon, 28 Nov 2022 14:25:42 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Mon, 28 Nov 2022 15:25:40 +0100 Message-Id: <20221128142541.300300-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 1/2] CI: Refactor the linux-build.sh X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Update the build script, so it is easier to define opts/flags per compiler, but also per architecture. Signed-off-by: Ales Musil --- .ci/linux-build.sh | 48 +++++++++++++++++++++----------------- .github/workflows/test.yml | 8 +++---- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index dc1ca5240..d7a49b6c0 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -3,9 +3,10 @@ set -o errexit set -x +ARCH=${ARCH:-"x86_64"} COMMON_CFLAGS="" OVN_CFLAGS="" -EXTRA_OPTS="--enable-Werror" +OPTS="$OPTS --enable-Werror" function configure_ovs() { @@ -23,28 +24,33 @@ function configure_ovn() { cat config.log; exit 1; } } -save_OPTS="${OPTS} $*" -OPTS="${EXTRA_OPTS} ${save_OPTS}" - -# If AddressSanitizer and UndefinedBehaviorSanitizer are requested, enable them, -# but only for OVN, not for OVS. However, disable some optimizations for -# OVS, to make sanitizer reports user friendly. -if [ "$SANITIZERS" ]; then - # Use the default options configured in tests/atlocal.in, in UBSAN_OPTIONS. - COMMON_CFLAGS="${COMMON_CFLAGS} -O1 -fno-omit-frame-pointer -fno-common -g" - OVN_CFLAGS="${OVN_CFLAGS} -fsanitize=address,undefined" -fi +function configure_gcc() +{ + if [ "$ARCH" = "x86_64" ]; then + # Enable sparse only for x86_64 architecture. + OPTS="$OPTS --enable-sparse" + elif [ "$ARCH" = "x86" ]; then + # Adding m32 flag directly to CC to avoid any possible issues + # with API/ABI difference on 'configure' and 'make' stages. + export CC="$CC -m32" + fi +} -if [ "$CC" = "clang" ]; then +function configure_clang() +{ + # If AddressSanitizer and UndefinedBehaviorSanitizer are requested, + # enable them, but only for OVN, not for OVS. However, disable some + # optimizations for OVS, to make sanitizer reports user friendly. + if [ "$SANITIZERS" ]; then + # Use the default options configured in tests/atlocal.in, + # in UBSAN_OPTIONS. + COMMON_CFLAGS="${COMMON_CFLAGS} -O1 -fno-omit-frame-pointer -fno-common -g" + OVN_CFLAGS="${OVN_CFLAGS} -fsanitize=address,undefined" + fi COMMON_CFLAGS="${COMMON_CFLAGS} -Wno-error=unused-command-line-argument" -elif [ "$M32" ]; then - # Not using sparse for 32bit builds on 64bit machine. - # Adding m32 flag directly to CC to avoid any possible issues with API/ABI - # difference on 'configure' and 'make' stages. - export CC="$CC -m32" -else - OPTS="$OPTS --enable-sparse" -fi +} + +configure_$CC if [ "$TESTSUITE" ]; then if [ "$TESTSUITE" = "system-test" ]; then diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf98a30fa..0f8d9d193 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,9 +19,9 @@ jobs: libssl-dev llvm-dev libelf-dev libnuma-dev libpcap-dev \ selinux-policy-dev ncat python3-scapy isc-dhcp-server m32_dependecies: gcc-multilib + ARCH: ${{ matrix.cfg.arch }} CC: ${{ matrix.cfg.compiler }} LIBS: ${{ matrix.cfg.libs }} - M32: ${{ matrix.cfg.m32 }} OPTS: ${{ matrix.cfg.opts }} TESTSUITE: ${{ matrix.cfg.testsuite }} TEST_RANGE: ${{ matrix.cfg.test_range }} @@ -56,7 +56,7 @@ jobs: - { compiler: clang, testsuite: system-test, sanitizers: sanitizers, test_range: "-100" } - { compiler: clang, testsuite: system-test, sanitizers: sanitizers, test_range: "101-200" } - { compiler: clang, testsuite: system-test, sanitizers: sanitizers, test_range: "201-" } - - { compiler: gcc, m32: m32, opts: --disable-ssl} + - { arch: x86, compiler: gcc, opts: --disable-ssl } steps: - name: checkout @@ -90,11 +90,11 @@ jobs: run: sudo apt install -y ${{ env.dependencies }} - name: install libunbound libunwind - if: matrix.cfg.m32 == '' + if: matrix.cfg.arch != 'x86' run: sudo apt install -y libunbound-dev libunwind-dev - name: install 32-bit dependencies - if: matrix.cfg.m32 != '' + if: matrix.cfg.arch == 'x86' run: sudo apt install -y ${{ env.m32_dependecies }} - name: update PATH From patchwork Mon Nov 28 14:25:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ales Musil X-Patchwork-Id: 1709768 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=e21uaCBY; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4NLSSL4cz4z23nB for ; Tue, 29 Nov 2022 01:25:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 868E94059F; Mon, 28 Nov 2022 14:25:52 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 868E94059F Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=e21uaCBY X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id emrKurKSjk3S; Mon, 28 Nov 2022 14:25:51 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 812DC40447; Mon, 28 Nov 2022 14:25:50 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 812DC40447 Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A188DC0084; Mon, 28 Nov 2022 14:25:49 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 19F4FC002D for ; Mon, 28 Nov 2022 14:25:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D8AAB60AEB for ; Mon, 28 Nov 2022 14:25:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D8AAB60AEB Authentication-Results: smtp3.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=e21uaCBY X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d0V-XaSVVTrr for ; Mon, 28 Nov 2022 14:25:47 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 22DEB605DB Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp3.osuosl.org (Postfix) with ESMTPS id 22DEB605DB for ; Mon, 28 Nov 2022 14:25:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669645546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tkMTx9iZBrIFFjH1km2s7WrcaMVMdlWYwrEqYyanWuQ=; b=e21uaCBY322+Trlkz2XZOLOnX09f0j6sE5n1tVmO1EerPnamo93ZK93VqKQrxB4PA7Ubgx EF4tM1rKXFJlr3CbLuGtPE2u0T1tUBxifB5S9eDYilImbuOSChh2kOVfvPha8uozbgnnhA zW8sSfIWKlvMq2GPUm6Z8fwSNplJfXo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-659-sHHlbYXvOZSFepClcoVPkQ-1; Mon, 28 Nov 2022 09:25:45 -0500 X-MC-Unique: sHHlbYXvOZSFepClcoVPkQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7CFE2811E7A for ; Mon, 28 Nov 2022 14:25:44 +0000 (UTC) Received: from amusil.redhat.com (ovpn-193-48.brq.redhat.com [10.40.193.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 446BF492B05; Mon, 28 Nov 2022 14:25:43 +0000 (UTC) From: Ales Musil To: dev@openvswitch.org Date: Mon, 28 Nov 2022 15:25:41 +0100 Message-Id: <20221128142541.300300-2-amusil@redhat.com> In-Reply-To: <20221128142541.300300-1-amusil@redhat.com> References: <20221128142541.300300-1-amusil@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH ovn 2/2] CI: Update Cirrus CI to run ARM jobs X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" The Cirrus CI script was configured to run FreeBSD job, however it seems that this job didn't run for several years. Update the .cirrus.yml to run ARM jobs instead. As first phase only the regular "test" for GCC and Clang. We cannot run sanitizers for now as they are very slow on Cirrus CI and just timeout without ever finishing. Signed-off-by: Ales Musil --- .cirrus.yml | 61 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 23 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c71a0a249..5511e5186 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,31 +1,46 @@ -freebsd_build_task: +arm_unit_tests_task: - freebsd_instance: - matrix: - image: freebsd-12-0-release-amd64 - image: freebsd-11-2-release-amd64 - cpu: 4 - memory: 8G + arm_container: + image: quay.io/fedora/fedora:37 + memory: 4G + cpu: 2 env: - DEPENDENCIES: automake libtool gmake gcc wget openssl - python py27-six py27-sphinx py27-openssl - python3 py36-six py36-openssl + ARCH: aarch64 + CIRRUS_CLONE_SUBMODULES: true + PATH: ${HOME}/bin:${HOME}/.local/bin:${PATH} + DEPENDENCIES: autoconf automake clang curl ethtool gcc git + glibc-langpack-en groff iproute iproute-tc iputils libcap-ng-devel + libtool net-tools nmap-ncat openssl openssl-devel python3-devel + python3-pip python3-sphinx tcpdump unbound unbound-devel wget matrix: - COMPILER: gcc - COMPILER: clang + - CC: gcc + TESTSUITE: test + TEST_RANGE: -500 + - CC: gcc + TESTSUITE: test + TEST_RANGE: 501-1000 + - CC: gcc + TESTSUITE: test + TEST_RANGE: 1001- + - CC: clang + TESTSUITE: test + TEST_RANGE: -500 + - CC: clang + TESTSUITE: test + TEST_RANGE: 501-1000 + - CC: clang + TESTSUITE: test + TEST_RANGE: 1001- - prepare_script: - - pkg install -y ${DEPENDENCIES} + name: ARM64 ${CC} ${TESTSUITE} ${TEST_RANGE} - configure_script: - - ./boot.sh - - ./configure CC=${COMPILER} MAKE=gmake OVS_CFLAGS='-Wall' --enable-Werror - || { cat config.log; exit 1; } + dependencies_script: + - dnf -y update + - dnf -y install ${DEPENDENCIES} - build_script: - - gmake -j8 + prepare_script: + - ./.ci/linux-prepare.sh - check_script: - - gmake -j8 check TESTSUITEFLAGS=-j8 RECHECK=yes - || { cat ./tests/testsuite.log; exit 1; } + build_script: + - ./.ci/linux-build.sh