From patchwork Tue Oct 26 15:32:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Righi X-Patchwork-Id: 1546499 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=ppKDINrD; dkim-atps=neutral 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=) 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 bilbo.ozlabs.org (Postfix) with ESMTPS id 4Hdwn96kYyz9t0k for ; Wed, 27 Oct 2021 02:32:44 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1mfORB-0006jd-IJ; Tue, 26 Oct 2021 15:32:29 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1mfORA-0006jW-07 for kernel-team@lists.ubuntu.com; Tue, 26 Oct 2021 15:32:28 +0000 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id BAD363F166 for ; Tue, 26 Oct 2021 15:32:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1635262347; bh=4+tNp9UcqxyR07iDAivblaMM733b/Poaf1Qd0nTQE8g=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=ppKDINrDZoa1sx/m1a/BAlFF0lF9wToP34/fjskcC71NYvmJZ7jExqD9n4yeJET/n 4rwEzI01IE0Zwc7orkKt3FWCfVLGEmlN9igB1rnUdISSZc57xC3yllSrh0yNc+We6J 4nnKIXCpAok2dg5nKdCG043M8jq7/uFokCZb8ZLZqOr+FvzREhG7Wn4gsyv8sB6uk6 PMFkoa5ZeRbhsuHwn4IA3lHjT5NEU2LoVDGMA9V3KjXPmtDLZbAVJpr9FQtqUCjnEq Zr/DI5LCl0RVxYe5a2ISt7zJLKgQcMQz30aKcp9SQS+pIH+TyRoMcwjF5YJKDosUiM A2NgLIXWxuOOA== Received: by mail-ed1-f71.google.com with SMTP id t1-20020a056402524100b003dd9a419eb5so1681698edd.4 for ; Tue, 26 Oct 2021 08:32:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=4+tNp9UcqxyR07iDAivblaMM733b/Poaf1Qd0nTQE8g=; b=Yn2h8ks2SX5cnnklAXA1WsSqjySigLxsci20vSl8MUgRzQhSLYbfAepoPGbDCY3qrr 6kK3D5nP2U+xfJRbTQgi2Yx6CS6S0N5DeTTazx+Nw6Psok+nbe/5KHD8Zqc26oITwrmI W0Ivk1q2gcydWlkQTqaQKKVxHzzArOZbneTJgbORDHK/pXvuvvuyG28Qu3OC+tDSAiZo XJHzZhLFA1absyVZrIOTK8jTmJkBdyEaSIOBZ4984hbugNrVNVT0h9IiUvMU5HFS64jo T1loNkK1LlGMkiuA0Vsv5VAaNtEQzxHgGSLlMLKDeDeR7qy6SPbc/DLiLMscd0EZd8C1 SDKw== X-Gm-Message-State: AOAM530EKWTYehN024Hm9TaERi1l/aYoN3j3+yEM7h03WQOodZ3kbhgX VoLrLqh+XQxBPTTc+8KIhP9Cov2wvJsnWAMVIFJN4Trh3xGYVeDVDUSY7JIaGpGkXUD7cEhDEar 3z6JKMVdjtA7sqTZwT9SdOWU8/U+bpZuZ6j7W+kM5wQ== X-Received: by 2002:a05:6402:35c5:: with SMTP id z5mr37029577edc.388.1635262347308; Tue, 26 Oct 2021 08:32:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg2SgzGVq/lM9vlNZwkYiJs5cF5ixZZwvmi1KRwn2zHCXKS54HARneWssbxSlsyhpCdcpnrA== X-Received: by 2002:a05:6402:35c5:: with SMTP id z5mr37029551edc.388.1635262347108; Tue, 26 Oct 2021 08:32:27 -0700 (PDT) Received: from arighi-desktop.homenet.telecomitalia.it ([2001:67c:1560:8007::aac:c1b6]) by smtp.gmail.com with ESMTPSA id x13sm9295164ejv.64.2021.10.26.08.32.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Oct 2021 08:32:26 -0700 (PDT) From: Andrea Righi To: kernel-team@lists.ubuntu.com Subject: [ACT][PATCH] UBUNTU: SAUCE: ubuntu_bpf: properly compile BPF tests with kernels >= 5.15 Date: Tue, 26 Oct 2021 17:32:24 +0200 Message-Id: <20211026153224.56258-1-andrea.righi@canonical.com> X-Mailer: git-send-email 2.32.0 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/1948831 ubuntu_bpf fails to build with the following error: ERROR: Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. Make sure to copy a valid .config and run `make modules_prepare` to setup the kernel source directory so that the BPF tests can be built correctly. Signed-off-by: Andrea Righi --- ubuntu_bpf/ubuntu_bpf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ubuntu_bpf/ubuntu_bpf.py b/ubuntu_bpf/ubuntu_bpf.py index e4543a94..cbe2a7a1 100644 --- a/ubuntu_bpf/ubuntu_bpf.py +++ b/ubuntu_bpf/ubuntu_bpf.py @@ -88,6 +88,11 @@ class ubuntu_bpf(test.test): os.environ["LLVM_OBJCOPY"] = "llvm-objcopy-9" os.environ["LLVM_READELF"] = "llvm-readelf-9" + if self.kv.startswith('5.15.0'): + from shutil import copyfile + copyfile('/boot/config-' + self.kv, 'linux/.config') + utils.make('-C linux modules_prepare') + utils.make('-C linux/tools/testing/selftests TARGETS=bpf SKIP_TARGETS= clean all') def run_once(self, test_name):