From patchwork Wed May 17 11:18:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Wajdeczko X-Patchwork-Id: 683133 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F928C77B7A for ; Wed, 17 May 2023 11:20:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230258AbjEQLUg (ORCPT ); Wed, 17 May 2023 07:20:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230093AbjEQLUe (ORCPT ); Wed, 17 May 2023 07:20:34 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FD8C103 for ; Wed, 17 May 2023 04:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684322434; x=1715858434; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=8SpyRf+yeQrxbHtQ75fj/0ADY3ykc7S3MEaXhzRIDVw=; b=JvxVhVktXJbclCFUolhyymiK55D2E7BR2+QEMkEGrZINThwl1LcOO34d 39Sy72Wl7koFkhHJIXpGArCiK6l4mGdhENDOWnDeFnhAXLSvyT3SGIq1H UfIlQ+OP8fWfqFgGmQrooXZpFkO1Rk58nm+kMPHPu5hEazAAdkUKjeRXk XFQXZJftM7zF5TmESCKjEAQt4vhzpTQu7a8v02BO3XW7wA5IyW+GAvP5X 64Dlb6x4lKSsdoOOza2vDHOuJgTcAjqzgYFQXuDWobeqFBLGnKYsDaFrG 6g2F6sya2qd95nuBazRydLLpCzMRjrbFrNcZ72gdrV9tsKd8vyicSYd6P A==; X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="341115909" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="341115909" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 04:20:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10712"; a="766738744" X-IronPort-AV: E=Sophos;i="5.99,281,1677571200"; d="scan'208";a="766738744" Received: from mwajdecz-mobl.ger.corp.intel.com ([10.249.142.110]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 May 2023 04:20:31 -0700 From: Michal Wajdeczko To: linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com Subject: [PATCH v3 2/3] kunit: Fix reporting of the skipped parameterized tests Date: Wed, 17 May 2023 13:18:15 +0200 Message-Id: <20230517111816.984-3-michal.wajdeczko@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20230517111816.984-1-michal.wajdeczko@intel.com> References: <20230517111816.984-1-michal.wajdeczko@intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Logs from the parameterized tests that were skipped don't include SKIP directive thus they are displayed as PASSED. Fix that. Signed-off-by: Michal Wajdeczko Cc: David Gow Reviewed-by: Rae Moar Reviewed-by: David Gow --- lib/kunit/test.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/kunit/test.c b/lib/kunit/test.c index f5e4ceffd282..af48d0761d26 100644 --- a/lib/kunit/test.c +++ b/lib/kunit/test.c @@ -627,9 +627,11 @@ int kunit_run_tests(struct kunit_suite *suite) kunit_log(KERN_INFO, &test, KUNIT_SUBTEST_INDENT KUNIT_SUBTEST_INDENT - "%s %d %s", + "%s %d %s%s%s", kunit_status_to_ok_not_ok(test.status), - test.param_index + 1, param_desc); + test.param_index + 1, param_desc, + test.status == KUNIT_SKIPPED ? " # SKIP " : "", + test.status == KUNIT_SKIPPED ? test.status_comment : ""); /* Get next param. */ param_desc[0] = '\0';