Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp946141pxj; Fri, 11 Jun 2021 16:20:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydO80q22DcJmVtqOas4mxlwefPhjxAS8yHZaAlR6NHdlZb2xNvjPyy+y2Tykfzyx3cY38b X-Received: by 2002:aa7:c54c:: with SMTP id s12mr6030956edr.374.1623453650782; Fri, 11 Jun 2021 16:20:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623453650; cv=none; d=google.com; s=arc-20160816; b=NRpw5DrX8FVbzqlYO21Sz6sdmzmHdY5rUm5XGDb8pUhi06u5HFo0gkhhCy44SgEOVQ 51x2kpx0gJuvkc3evWRo1LFispdORlwBGBXazBehT84L6oDLje2EsIxeW04NAJbsPe/u v2vjv/SGxlsqhBZRyIxD27rTG/MayqdBM3YE4DiIBv8Xf7z9v4WCxlm6nybg8DMAGXKO k+IF/AGwElwjj8x6ZXob+bs+pt096DzhQ8pbJ2y6Ku80ZWaDJbXa/8Em5FOcpAdvo/GK mQEaUr2bV3jWBVdCT6rl96xGMA7qbI5Mro/6q/Z9fyAeLyQaBwKjRu64Ll3yTPLpu1f3 vshg== 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=x4YyY/PB/1GkntMMtzmLiz3DtgMaIMXhAiGH6HC8ZVo=; b=gd21RmXVASRSEM2i0t2PHFroXT0jmAQJ4C2oJf0uIniAZzhfSwnQXalGG5rPr+N35K LLT9pA1EQVejsrDJWVIJHO61f2oJcUnsDkA96elbyrELUHdnLcV9b7kDjEewaW+frfKM NFWMee+PqFfV2L1MUa9tbw8leQMlJD/IziR41nU9mVsgEEBcd3CqKHzaOhvI5BbjmbwJ 2kSg1G0uhix14FrtaiOxobHIyF+O64u1t3yGsxVryKyS6qnXp0rxsQToWnZfvrYh1K5X L6b9ZTKM2Gsudz0DWlV1U9+lZ54YO4pbDe7hCzspEaY4iO0Cs8RN6/Yaq+lgYjNDlaWu Pa2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fDx3Uoz4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id md14si6208099ejb.89.2021.06.11.16.20.28; Fri, 11 Jun 2021 16:20:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fDx3Uoz4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbhFKXUL (ORCPT + 99 others); Fri, 11 Jun 2021 19:20:11 -0400 Received: from mail-wr1-f46.google.com ([209.85.221.46]:45671 "EHLO mail-wr1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229976AbhFKXUJ (ORCPT ); Fri, 11 Jun 2021 19:20:09 -0400 Received: by mail-wr1-f46.google.com with SMTP id z8so7596540wrp.12 for ; Fri, 11 Jun 2021 16:18:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=x4YyY/PB/1GkntMMtzmLiz3DtgMaIMXhAiGH6HC8ZVo=; b=fDx3Uoz4IG/+tvm194biC9tPPWvPp2f3UOuFoUQeFiDeKRIUv/Ew5J5v9bZg4kSjNO j9P+CbLti2o4hrh+17RvqqH//0Hx3Xq6Ylyrr8rbiM5nrRRabbASL76BhaHkXaBktkCl 0j29DLRWhDXYuRMKSGth0Xea0LhU8rSNAe7iPHxEOd+pSYfbRfvj+xoSVqROCmvlSs3m yc1vd85ex23ndBeeS4CErZlBTJmwVXCH4zQfE6a0XNHaTCLJI0zojZVXFhiud8tWH1CD i8Zaj4tLb+qYYE3Dp/B8P420Jj8j9szhrJjUfBb7Nsu/9dCj9rqB0789dIIFG+R8mTTJ Bvow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=x4YyY/PB/1GkntMMtzmLiz3DtgMaIMXhAiGH6HC8ZVo=; b=G+RSVYmXWzY+qCngrd/naBfcGeVz8m2BRK8O7ZzhlsuUZwBoTYBHz6Kv1eWlt/SS0C vSV0pxMHhVwOxcb4AYyGv7pfWYYBvYcG6/KeI2e8FqvwiLgFDt6Z5EEpoYDYhhvPfj/Y IJzZDUaUKmQ9huZFiLHhmeTbr6KcD2onom3CKhEQ5p9PIQScjOdKUesuPTGu141caN+k GmAOaiIofceCJWPFGinhQxrsq27RxBRGpd2ZOZXSNac8A+eU9GZjVek3SG0yZUWHhsP1 AMeaOE4/MHZqrBDqZuk8VAi9SRXf7FFAWIMzFl14FQH5O4PpUDyku90da0vZxK3psPlm CBoA== X-Gm-Message-State: AOAM533rBzvvdl80ivqllqx6GJ8rd4uMOzv94gbIxczAvEVykfzj7c9w 781EIyH3O0Oo0T/SCBJ++5tspcVhSFGFPM/oYcYQAA== X-Received: by 2002:a5d:474d:: with SMTP id o13mr6216624wrs.176.1623453420286; Fri, 11 Jun 2021 16:17:00 -0700 (PDT) MIME-Version: 1.0 References: <20210611035725.1248874-1-davidgow@google.com> <8a7e6806-97f5-6f13-5e97-328cf0d3a95d@linuxfoundation.org> In-Reply-To: <8a7e6806-97f5-6f13-5e97-328cf0d3a95d@linuxfoundation.org> From: David Gow Date: Sat, 12 Jun 2021 07:16:49 +0800 Message-ID: Subject: Re: [PATCH] kunit: Fix result propagation for parameterised tests To: Shuah Khan Cc: Marco Elver , Brendan Higgins , Arpitha Raghunandan <98.arpi@gmail.com>, KUnit Development , "open list:KERNEL SELFTEST FRAMEWORK" , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 12, 2021 at 1:44 AM Shuah Khan wrote: > > On 6/11/21 2:29 AM, Marco Elver wrote: > > On Fri, 11 Jun 2021 at 05:57, David Gow wrote: > >> > >> When one parameter of a parameterised test failed, its failure would be > >> propagated to the overall test, but not to the suite result (unless it > >> was the last parameter). > >> > >> This is because test_case->success was being reset to the test->success > >> result after each parameter was used, so a failing test's result would > >> be overwritten by a non-failing result. The overall test result was > >> handled in a third variable, test_result, but this was disacarded after > >> the status line was printed. > >> > >> Instead, just propagate the result after each parameter run. > >> > >> Signed-off-by: David Gow > >> Fixes: fadb08e7c750 ("kunit: Support for Parameterized Testing") > > > > Reviewed-by: Marco Elver > > > > Would Cc: stable be appropriate? > > > > Thanks, > > -- Marco > > > >> --- > >> > >> This is fixing quite a serious bug where some test suites would appear > >> to succeed even if some of their component tests failed. It'd be nice to > >> get this into kunit-fixes ASAP. > >> > > Will apply this with cc stable. > Thanks! > >> (This will require a rework of some of the skip tests work, for which > >> I'll send out a new version soon.) > >> > > Thanks for the heads up. I will wait for new version. > Thanks: I've sent out v4 which fixes this: https://lore.kernel.org/linux-kselftest/20210611070802.1318911-1-davidgow@google.com/ It's rebased on top of this patch, so depends on it, and also depends on the first two patches in the "Do not typecheck binary assertions" series: https://lore.kernel.org/linux-kselftest/20210513193204.816681-1-davidgow@google.com/ > thanks, > -- Shuah