From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52DC5C433E7 for ; Wed, 2 Sep 2020 12:52:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26BB3206F0 for ; Wed, 2 Sep 2020 12:52:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="pIMqb6bV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726406AbgIBMw4 (ORCPT ); Wed, 2 Sep 2020 08:52:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727064AbgIBMwb (ORCPT ); Wed, 2 Sep 2020 08:52:31 -0400 Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16741C061246 for ; Wed, 2 Sep 2020 05:52:31 -0700 (PDT) Received: by mail-qt1-x843.google.com with SMTP id x12so3406928qtp.1 for ; Wed, 02 Sep 2020 05:52:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Pvl3SWJ9e5sce/rNKaSduyhhxTz1BgiMnI37NgwAhUY=; b=pIMqb6bVqWYzxtZFWJSmWNZTz/EKtlBYMVpJ1K3XEhvzHRG+pUoB71bDqhI9uFBunZ 0ELFd1MpKzQV7R7HqrjpoygMTptfUS3x9DM9irg13KRTLIwpsXzY08GHwgEhIHcK+JG3 5dF9VrfpoF6k+pqSgyuqE7WXB8lmuNVHJfO1SyLKglUoE1+u1A2KVu8DI+woV91/Rq5l VvS69IgnUJmomuB85Tj2Tovhgf+DLbtjQ6aPDI1VO+d6Igxe+o1Z6Yx9cNfB6EtRMf3w hvPdpp04eEOxT9aVpqI4jjroa4TIBvpK7unQsS+nvWg3hdKGrgCHZndy7EMCrad54QkP OtlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Pvl3SWJ9e5sce/rNKaSduyhhxTz1BgiMnI37NgwAhUY=; b=AsgI+Kt9TdndwWeJ9RNd59d8m2l6NRbdsj54wHDHFtrvE67A1TspM9THRQI7qyESVx DkXLGCWpXhB/Z1jUJOsEo/DL1puekeJ3AB7J0THC+6PyIa/hBaTvzi7Yidh9PVckmP+c OzFc5NG+J/m2DOZvjZsWf7oM24maIMqrTSGTctR82L27vkMBgo6FQUAdxIQC+f/l5Lw1 Gzv0KWmk/BYf1rTY0mgVfVeZNdz/1PhKdgd8Xq+0aVDMFc2iOnbOussgAUQvXhKGpQNW 6wh2ADYsWz5RkLiVbRm1rs6MQ/G712L7+NmSZO8knD96GW8ImWvvdcwXPxmgWiIck0v1 pcbw== X-Gm-Message-State: AOAM533jyYZG0g5LDsniA1NEY+kimy0QKX+JC/qU5k8FqAboUXqg0a27 G+35aocoeaKamU+UdusjSDDd7A== X-Google-Smtp-Source: ABdhPJzbj9HoMDTrZSIHvhNE2C9Cwm3ZM61DpTVhFH/mNvlJbuBbLY7DbYz1/PBcCkRU6zj6OTP/9Q== X-Received: by 2002:aed:27dd:: with SMTP id m29mr6853784qtg.165.1599051150238; Wed, 02 Sep 2020 05:52:30 -0700 (PDT) Received: from lca.pw (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id 184sm4731438qkl.104.2020.09.02.05.52.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 05:52:29 -0700 (PDT) Date: Wed, 2 Sep 2020 08:52:24 -0400 From: Qian Cai To: Uriel Guajardo Cc: brendanhiggins@google.com, urielguajardo@google.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, sfr@canb.auug.org.au, linux-next@vger.kernel.org Subject: Re: [PATCH 2/2] kunit: ubsan integration Message-ID: <20200902125223.GA5676@lca.pw> References: <20200806174326.3577537-1-urielguajardojr@gmail.com> <20200806174326.3577537-2-urielguajardojr@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200806174326.3577537-2-urielguajardojr@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 06, 2020 at 05:43:26PM +0000, Uriel Guajardo wrote: > Integrates UBSAN into the KUnit testing framework. It fails KUnit tests > whenever it reports undefined behavior. > > Signed-off-by: Uriel Guajardo It looks like this patch had been merged into linux-next but the "[PATCH 1/2] kunit: support failure from dynamic analysis tools" did not. Hence, it caused a compiling failure. lib/ubsan.c: In function ‘ubsan_prologue’: lib/ubsan.c:141:2: error: implicit declaration of function ‘kunit_fail_current_test’; did you mean ‘kunit_init_test’? [-Werror=implicit-function-declaration] kunit_fail_current_test(); ^~~~~~~~~~~~~~~~~~~~~~~ kunit_init_test cc1: some warnings being treated as errors > --- > lib/ubsan.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/lib/ubsan.c b/lib/ubsan.c > index cb9af3f6b77e..1460e2c828c8 100644 > --- a/lib/ubsan.c > +++ b/lib/ubsan.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > > #include "ubsan.h" > > @@ -137,6 +138,7 @@ static void ubsan_prologue(struct source_location *loc, const char *reason) > { > current->in_ubsan++; > > + kunit_fail_current_test(); > pr_err("========================================" > "========================================\n"); > pr_err("UBSAN: %s in %s:%d:%d\n", reason, loc->file_name, > -- > 2.28.0.163.g6104cc2f0b6-goog >