From patchwork Tue Apr 14 13:15:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 1270286 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 491mFH0NHkz9sTW; Tue, 14 Apr 2020 23:15:29 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1jOLPN-0005k0-Pi; Tue, 14 Apr 2020 13:15:21 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jOLPM-0005ju-CX for kernel-team@lists.ubuntu.com; Tue, 14 Apr 2020 13:15:20 +0000 Received: from 1.general.ppisati.uk.vpn ([10.172.193.134] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jOLPM-0004cV-27 for kernel-team@lists.ubuntu.com; Tue, 14 Apr 2020 13:15:20 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH] UBUNTU SAUCE: ubuntu_bpf: llvm10 breaks tests_maps, revert to llvm9 Date: Tue, 14 Apr 2020 15:15:19 +0200 Message-Id: <20200414131519.70521-1-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/1872708 Focal selftest/bpf test_maps failt when built with Clang & Llvm 10, revert to Clang & Llvm 9. Signed-off-by: Paolo Pisati --- ubuntu_bpf/ubuntu_bpf.py | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/ubuntu_bpf/ubuntu_bpf.py b/ubuntu_bpf/ubuntu_bpf.py index fee3cf29..cd32cb1f 100644 --- a/ubuntu_bpf/ubuntu_bpf.py +++ b/ubuntu_bpf/ubuntu_bpf.py @@ -9,18 +9,22 @@ class ubuntu_bpf(test.test): def install_required_pkgs(self): arch = platform.processor() + series = platform.dist()[2] pkgs = [ 'build-essential', - 'clang', 'git', 'libcap-dev', 'libelf-dev', - 'llvm', ] gcc = 'gcc' if arch in ['ppc64le', 'aarch64', 's390x'] else 'gcc-multilib' pkgs.append(gcc) + if series == 'focal': + pkgs.extend(['clang-9', 'llvm-9']) + else: + pkgs.extend(['clang', 'llvm']) + cmd = 'apt-get install --yes --force-yes ' + ' '.join(pkgs) self.results = utils.system_output(cmd, retain_output=True) @@ -47,11 +51,30 @@ class ubuntu_bpf(test.test): # Assist local testing by restoring the linux repo to vanilla. self.extract() os.chdir(self.srcdir) + + series = platform.dist()[2] + if series == 'focal': + os.environ["CLANG"] = "clang-9" + os.environ["LLC"] = "llc-9" + os.environ["LLVM_OBJCOPY"] = "llvm-objcopy-9" + os.environ["LLVM_READELF"] = "llvm-readelf-9" + utils.make('-C linux/tools/testing/selftests TARGETS=bpf clean all') def run_once(self, test_name): if test_name == 'setup': return + + # + # llvm10 breaks bpf test_maps, revert to llvm9 instead + # + series = platform.dist()[2] + if series == 'focal': + os.environ["CLANG"] = "clang-9" + os.environ["LLC"] = "llc-9" + os.environ["LLVM_OBJCOPY"] = "llvm-objcopy-9" + os.environ["LLVM_READELF"] = "llvm-readelf-9" + os.chdir(os.path.join(self.srcdir, 'linux/tools/testing/selftests/bpf')) cmd = './%s' % test_name self.results = utils.system_output(cmd, retain_output=True)