From patchwork Wed Mar 8 15:18:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eelco Chaudron X-Patchwork-Id: 1754179 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=AQlJ3177; 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 4PWwtm63Qzz1yXD for ; Thu, 9 Mar 2023 02:18:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id F14CE4033A; Wed, 8 Mar 2023 15:18:20 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org F14CE4033A 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=AQlJ3177 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 huNoAfZ6CP-9; Wed, 8 Mar 2023 15:18:19 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id B8AD5401FE; Wed, 8 Mar 2023 15:18:18 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org B8AD5401FE Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 880ABC0035; Wed, 8 Mar 2023 15:18:18 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 62C28C0032 for ; Wed, 8 Mar 2023 15:18:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 30B11813DD for ; Wed, 8 Mar 2023 15:18:17 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 30B11813DD Authentication-Results: smtp1.osuosl.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=AQlJ3177 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id b4p7PBPrvsWM for ; Wed, 8 Mar 2023 15:18:16 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 74C63813D5 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 74C63813D5 for ; Wed, 8 Mar 2023 15:18:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678288695; 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=BatBY5XHZ4B+lPgme5v3TVm0H1W4xhALq+fofdxoieQ=; b=AQlJ3177guCOK4GJtjJ3XY3bwHvHD+kjuevJ2fQwhS7Jo9MEp9Jod9C3+0abuV1NdGlO1W pMxaz10D63CL6XL05/jIBa9KaEBX34jA0sgJ+ryUoxasULW1MBzXtlAlyX3cL9rXaXtp0b cI6y4ddo063Plhf2M5iXOnXHhgJcGb8= 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-121-_qdTbPsAOriSnBFWGX6gXw-1; Wed, 08 Mar 2023 10:18:13 -0500 X-MC-Unique: _qdTbPsAOriSnBFWGX6gXw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88324857F46; Wed, 8 Mar 2023 15:18:13 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.193.129]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA63314171B6; Wed, 8 Mar 2023 15:18:12 +0000 (UTC) From: Eelco Chaudron To: dev@openvswitch.org Date: Wed, 8 Mar 2023 16:18:02 +0100 Message-Id: <167828863147.885480.13095064024409589366.stgit@ebuild.local> User-Agent: StGit/1.5 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Cc: simon.horman@corigine.com, i.maximets@ovn.org Subject: [ovs-dev] [PATCH v3 1/2] github: Combine ASAN and UBSAN runs. 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" Combine the ASAN and UBSAN tests into a single sanitizer run. Signed-off-by: Eelco Chaudron Reviewed-by: Simon Horman --- v2: Introduction of this patch in the patch set. v3: Moved Ubuntu test image upgrade to second patch. .ci/linux-build.sh | 14 +++++--------- .github/workflows/build-and-test.yml | 8 ++------ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index 10021fddb..6394a8137 100755 --- a/.ci/linux-build.sh +++ b/.ci/linux-build.sh @@ -148,17 +148,13 @@ else CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} ${SPARSE_FLAGS}" fi -if [ "$ASAN" ]; then - # This will override default option configured in tests/atlocal.in. +if [ "$SANITIZERS" ]; then + # This will override the default ASAN_OPTIONS configured in + # tests/atlocal.in, however, it will use the defined UBSAN_OPTIONS. export ASAN_OPTIONS='detect_leaks=1' CFLAGS_ASAN="-fno-omit-frame-pointer -fno-common -fsanitize=address" - CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} ${CFLAGS_ASAN}" -fi - -if [ "$UBSAN" ]; then - # Use the default options configured in tests/atlocal.in, in UBSAN_OPTIONS. - CFLAGS_UBSAN="-fno-omit-frame-pointer -fno-common -fsanitize=undefined" - CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} ${CFLAGS_UBSAN}" + CFLAGS_UBSAN="-fsanitize=undefined" + CFLAGS_FOR_OVS="${CFLAGS_FOR_OVS} ${CFLAGS_ASAN} ${CFLAGS_UBSAN}" fi OPTS="${EXTRA_OPTS} ${OPTS} $*" diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 82675b973..9f518ff01 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -9,14 +9,13 @@ jobs: automake libtool gcc bc libjemalloc2 libjemalloc-dev \ libssl-dev llvm-dev libelf-dev libnuma-dev libpcap-dev \ ninja-build selinux-policy-dev libbpf-dev - ASAN: ${{ matrix.asan }} - UBSAN: ${{ matrix.ubsan }} CC: ${{ matrix.compiler }} DPDK: ${{ matrix.dpdk }} DPDK_SHARED: ${{ matrix.dpdk_shared }} LIBS: ${{ matrix.libs }} M32: ${{ matrix.m32 }} OPTS: ${{ matrix.opts }} + SANITIZERS: ${{ matrix.sanitizers }} TESTSUITE: ${{ matrix.testsuite }} name: linux ${{ join(matrix.*, ' ') }} @@ -36,10 +35,7 @@ jobs: testsuite: test - compiler: clang testsuite: test - asan: asan - - compiler: clang - testsuite: test - ubsan: ubsan + sanitizers: sanitizers - compiler: gcc testsuite: test