Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp857949pxj; Fri, 11 Jun 2021 13:29:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw04gs4VekxaKPR98+A6bCz9T0KZSVwFaZ6GbI8X4pmo2YUX6/KEqazcn+ofiIhKL407EWS X-Received: by 2002:a05:6402:19b9:: with SMTP id o25mr5350719edz.192.1623443388266; Fri, 11 Jun 2021 13:29:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623443388; cv=none; d=google.com; s=arc-20160816; b=06e0wj610pterpCjOI4j8o1o1LkkY1Vfv2cDuBo5B3uiJJA9F2YvNshVwj068mIHqU sCDoJuWBiKP6H6U3+CTp3luJAnQcv3vN3Ua7f4QA4KL8NRWmefYXRUIqGqY3OWZlF6iK YGVALrWpuf7RKqQP4zVHV4QKPcxry3N5sjA+WjZISsWAMHiuc+RDLRD66saX0uanzcA2 w3wCBiifBg4ev6xqF7nKMOs+X0ekR/NQPhe6j5IJS23PQZ/sHwRxqgUuwKRRMIlNfovl zBB9Litq8iTvcj6xZaezEen1CWGzCY/c1qCK+F2fE3buDI69Wpo8V1z48Ms4ond0k2DD gZvA== 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=oLhmhHYRPO5l9zgQx7lROFz0cEU6ynaEXV/+WtT2CNs=; b=hgBOnfX5lZ2vZ0+8OaNq+DU6eWMgfQ9IzznAvOQz50aVto/vfqEpX4gfI25/mhq49y XLtmzy/wHfh0C9MwwHFr4DkdeNIuM0wAFa4TBN2/VuweVyQ/qLLYYbCS7t5s3vzk+ZWz WzRvg+DHyiOfkxDGc0/0usfXZW4kS0pmHuuLnrzoyJs2wYCjEuSVS4Cqfb20Wf7olI7n 6EdxaSJcQzX7muUqh2Sj+qUdTmys+0DqAx4IaikT6vHO8i99b5wV9OOmufnRfaq3l3Ko n5NNqrDu6Djd2Y2oIa11pGvplIF09jnx6Zp+LMk0khSjG0Pj3Gqu694WbyK6UM2K9wyN ibfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=frEwhe7g; 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 i4si5296386edc.17.2021.06.11.13.29.25; Fri, 11 Jun 2021 13:29:48 -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=frEwhe7g; 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 S229979AbhFKU2T (ORCPT + 99 others); Fri, 11 Jun 2021 16:28:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbhFKU2S (ORCPT ); Fri, 11 Jun 2021 16:28:18 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A86EC061574 for ; Fri, 11 Jun 2021 13:26:20 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id h12so5372688pfe.2 for ; Fri, 11 Jun 2021 13:26:20 -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=oLhmhHYRPO5l9zgQx7lROFz0cEU6ynaEXV/+WtT2CNs=; b=frEwhe7gHg5gVcBJCPK3ZddVU2cjwZvDRKE8MH1ZPO+262DJ5fGPZr5Ipij97rOQXB L9a/ZGeE7hdnmlidcVhcjvu/admFWK21zBL7q5o62E4X4rDfX+eiUGh9bBe6tQ5JyH1z F5MptC/894qiHceVceNGBteqWY4cfGUvMBSVrPSvM3xtjR9sZWj9HaeacyL4125UGxh2 hS731w+CvNupEqs64CopfRwZAjy85eY5v9S83hFLEBZ4R/Ayhzeq4LU8I4LHdw9ml2iT FgLVt4k+CFxMxSpDv/66+DaXiz4Wf2Op8lTwSP2LWNCPNoKHRsWxvfyUYEH/hDPg9o5a fUVA== 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=oLhmhHYRPO5l9zgQx7lROFz0cEU6ynaEXV/+WtT2CNs=; b=qgZAol1PZQMs1iCTTMf8A0qLpnHLJmlq4v6GEGRT8bxRJhdbjzyB0U422TyjNYTISU JpsRLaBUVB/l3afmltqB4eKoCNbK22QDsOuDdJ6U45osVuvvAzKpicn/em9t5hu66JKk DsTraL0poBdby6yLXW5JEVLhm4im6r/4UG42A4YNkxu7JEqXsuxOV0oQVNj9p4qC3J2B r43Jr53D8t+5lSGYipGpQsP4Wnjgr6cy67bfcpoi0bpG92lBvLPZtBH+uSwW9gGVTd37 98RyHWccULjRSKzo9UhY4XbUzuKM/ByXAu2konwd/hDTquLjwl61pY5KONom9pAspUek P6+g== X-Gm-Message-State: AOAM531g0FjMrNyztBRTw5CckzQcs03mtOh8sy2fAzpvVFRIkKocOcTB kT5qcNU1MYWVguIC3CPtnF160GtEZP7jAScFsJfb8A== X-Received: by 2002:a63:485a:: with SMTP id x26mr5351534pgk.159.1623443179362; Fri, 11 Jun 2021 13:26:19 -0700 (PDT) MIME-Version: 1.0 References: <20210611035725.1248874-1-davidgow@google.com> In-Reply-To: <20210611035725.1248874-1-davidgow@google.com> From: Brendan Higgins Date: Fri, 11 Jun 2021 13:26:08 -0700 Message-ID: Subject: Re: [PATCH] kunit: Fix result propagation for parameterised tests To: David Gow Cc: Arpitha Raghunandan <98.arpi@gmail.com>, Marco Elver , Shuah Khan , KUnit Development , "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 10, 2021 at 8:57 PM 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. nit: s/disacarded/discarded/g > Instead, just propagate the result after each parameter run. > > Signed-off-by: David Gow > Fixes: fadb08e7c750 ("kunit: Support for Parameterized Testing") I tried to reproduce the problem described and was unable to. Anyway, from the code it definitely looks like there is a bug like you describe. And it definitely looks like your change should fix it. Anyway, I tried testing your fix, but given I was unable to reproduce the failure, I am not super confident in my testing. Still, Reviewed-by: Brendan Higgins