Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1652032rwi; Wed, 19 Oct 2022 13:31:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6D0uYo9PwJZp3Tgo8bjklH9mpcsFLxaa/rcBdub4CqIg1lfWzH2JW1tEQNmwvyP7acmcSz X-Received: by 2002:a17:907:31c9:b0:740:ef93:2ffd with SMTP id xf9-20020a17090731c900b00740ef932ffdmr8290485ejb.584.1666211505403; Wed, 19 Oct 2022 13:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666211505; cv=none; d=google.com; s=arc-20160816; b=s7tQcQtfClpSq9Y8188MrWUGgTWy1n6en8HMDuaPW3thyM2+wV4zQfqoMha4KzTUcy HOsJBT6Q28ykVdz7eiakYox20wEakFsSh514AcrJRSsugv0WSDk+F45lTVv9E31YxasK e9JlxIL1B1MH2ADXu5DgEzb/iA6qfyNBkVXfYpQWP76rubOF4l79YnYKU1otUN8ZVL5f 4I1FyQjEPOExmb7wcr0qPz3FwWgoXteRnax53ea9opu5YKXTFCAgd3Jj7mO8SqOndOSG 4J40fvpLew37faoxQ9OVnkx22NZapiCJeQonGkYrTpoLtbud0bWPnltMbxOWgZDE3gKd qmvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=cXqWYGSUyr7OrNHL1T/x/7EkjfHttBM4QCa4eRu5CdE=; b=KYyQMFshlY1YXY6jGb6B8XpUOlhqx51etuE+l+YyhacvPc25RnPJLxTBn3G91alATY DK3t6qsDshMRFUQii/AEZNosXIcyEkThhznHpxekt9WId50HyNZtbhf5nI+AtFhMOk2X wB9NW8BgvKTZkmdhDX0qLckFzR3Wz+FlScJuJLjIguGUHJM1E2vWp3RfB3tgKNLnB/r8 lw/nLoQzZ2+5UIhxpmIGNdEj8aYYob/+Y+B07lry0GM+WsQubgK8gbW3mwt+rAxOSz7O Cjr7FfKmi86yMBg1ic/aSYyR8MYEFM/lAaziuPxGfepy1nRHTv3mIdAiICJVrnTCKqLO Cjvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ox4rhvjt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk30-20020a1709077f9e00b0077a19529760si15605259ejc.65.2022.10.19.13.30.57; Wed, 19 Oct 2022 13:31:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ox4rhvjt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231230AbiJSTs6 (ORCPT + 99 others); Wed, 19 Oct 2022 15:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230437AbiJSTsz (ORCPT ); Wed, 19 Oct 2022 15:48:55 -0400 Received: from mail-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F14241D3A5B; Wed, 19 Oct 2022 12:48:53 -0700 (PDT) Received: by mail-qk1-x733.google.com with SMTP id o2so11434959qkk.10; Wed, 19 Oct 2022 12:48:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=cXqWYGSUyr7OrNHL1T/x/7EkjfHttBM4QCa4eRu5CdE=; b=ox4rhvjtu73vL7Eoxb3ELsaih0GlyG+yB5zAmkNS2KiGxZogVp8NBKoF6fDJ9BzkmB g5m7neSOBU7hxoeYpgeJhyW82i4iUuH+nAkA1889hB4gGWH4W84vgK2aEjqfKIUmw9e2 6KQeu2jyaZbGrHtlleYWE765geA3KCNVdXzxzwVlSMf01m+k+kOLAS12he6YgxdoOX82 rXVagiCyq1Cr/b1T2PqecVmN8w/Y2jDApucHSTERZlg+zPKUq8lW7N0qfzAdtRJFAukt UcCZNp5iz9eOTx0EkWGUMtkEpjXHNVJLVNrndqpioDkYpW6THJL9HVRtB1vn9S37Go8D hl0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=cXqWYGSUyr7OrNHL1T/x/7EkjfHttBM4QCa4eRu5CdE=; b=FXLA2xf6CdAGhzY4bmALR2AwuCgobBh62urC+rE92sV41FHBkSv4gM5xz2qGsN8e4x rt1C25T3wjOH6lVWZHKE/yG5RrIyg/g+bimR0akT4a4JrmJk/IHsQ1j4uPSH2Gp7CnLD Wzen4PrFPJMeTEZmCfyhQG/I8ea1Qrln6BxwFM4JNcuBWsbv44n1WSYznyZqzRznnJqi kWdvx8yy0Ur8EPI9LnNHvEirS7S7gz4cdmgutvgmzfr2FanYU7klth70G6yBSL/4in2T xVckRsINL9HSO4Ptv5mFNv27yUaW7zL2i5zO56akr6lm/PpKgK0FmrzvApuOMGyJbjX3 Sekw== X-Gm-Message-State: ACrzQf1r0tdH4Hc0Bv/JePCYuGiougGO9/kHAi99w44TPPcxpm/7vdP/ OXrmYZ7ZVB14jLPZYIXO92FKgCppYHQ9uyhl4Qo= X-Received: by 2002:a05:620a:d94:b0:6bc:5a8c:3168 with SMTP id q20-20020a05620a0d9400b006bc5a8c3168mr6743224qkl.56.1666208933104; Wed, 19 Oct 2022 12:48:53 -0700 (PDT) MIME-Version: 1.0 References: <20221019085747.3810920-1-davidgow@google.com> In-Reply-To: From: Andrey Konovalov Date: Wed, 19 Oct 2022 21:48:42 +0200 Message-ID: Subject: Re: [PATCH] kasan: Enable KUnit integration whenever CONFIG_KUNIT is enabled To: David Gow Cc: Andrey Konovalov , Alexander Potapenko , Andrey Ryabinin , Dmitry Vyukov , Andrew Morton , Vincenzo Frascino , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Daniel Latypov , Brendan Higgins , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 19, 2022 at 5:06 PM David Gow wrote: > > > How does KUnit detect a KASAN failure for other tests than the KASAN > > ones? I thought this was only implemented for KASAN tests. At least, I > > don't see any code querying kunit_kasan_status outside of KASAN tests. > > Yeah, there aren't any other tests which set up a "kasan_status" > resource to expect specific failures, but we still want the fallback > call to kunit_set_failure() so that any test which causes a KASAN > report will fail: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/kasan/report.c#n130 Ah, right. Thanks for the explanation! > > I'm currently switching KASAN tests from using KUnit resources to > > console tracepoints [1], and those patches will be in conflict with > > yours. > > Ah, sorry -- I'd seen these go past, and totally forgot about them! I > think all we really want to keep is the ability to fail tests if a > KASAN report occurs. The tricky bit is then disabling that for the > KASAN tests, so that they can have "expected" failures. I wonder what's the best solution to support this, assuming KASAN tests are switched to using tracepoints... I guess we could still keep the per-task KUnit flag, and only use it for non-KASAN tests. However, they will still suffer from the same issue tracepoints solve for KASAN tests: if a bug is triggered in a context other than the current task, the test will succeed.