Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp610946pxb; Tue, 5 Apr 2022 15:54:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIZ0OM4xyDXaigXsG7jnLaw37MtP1v2gKDkiVXObdtkSfBCG5v8sxVtUvEk5MKQG7Itnn7 X-Received: by 2002:a17:90a:d354:b0:1ca:a0aa:bc23 with SMTP id i20-20020a17090ad35400b001caa0aabc23mr6642505pjx.142.1649199297230; Tue, 05 Apr 2022 15:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649199297; cv=none; d=google.com; s=arc-20160816; b=iWSCau69oL1ZRnaYhp7xKz5klpN0CkJfOZCUZjlg14aBsJyvRup1NdLBKjZHSjcnKu 2a9KK3uDyjmpsRpntgMG5bK/nMyqeBdkTFkoMkzaD9u1PSP1fkP17RiaD+LmTdqekxWc fElHEkY5TsJLeQTBGXR5TmdIqaRtS54Hi4WauiShgyFOih4lPOaf2IuTPCFazfoUeTrZ mZ6pHUxqqxNQ//1jdajHoOLfE/3+4B31/wV3e2DHTYcuBRcq6KFtI+VhwbuRMlMQDcxi +RdvR3sMCWJLBOSm5FHW21/3h1LHkSbZHdKNonvBo8o/xd4PAFRyopf1xKs9vVljHAuU WKuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9XwtcTIQM/Wy8afok+fkuigLv3wFDqVyQAv0CvoN8v0=; b=u7/Z5DIRPCb0UTMQtPFCpVue7cgNBsH9WCo6ikDAOgpUTzFe4b2EDRTiodrFRZt5Lf b2WPbe2b1raB7agNLT75kow8St6cNc16OoPYfnN/GoISl36WBfFkcDRY+r45B7qZXC3t V2c7o0ZzJiOVdOaJccGkCWAca+9cvHJxLfn5zoDfbnlK6vGt66jWiFaxoBOtz1RELSx9 NFXeCYDwjIP9606tAkzMcpNyB7BK51hO9obIfx51sOO4ETqeWfHaq6JNJfCpLkCKLE5F 6zTZ5uymwWXpyYxW4BhjdFuWuHJcv63r8g+clS8hzq/lvWEia424TyMXZeX9PgyjZg+c Jxww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AQJE5urI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id l16-20020a170903121000b0015651a49b5asi14600205plh.464.2022.04.05.15.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 15:54:57 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=AQJE5urI; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 30E321621B4; Tue, 5 Apr 2022 15:36:42 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376982AbiDEPMz (ORCPT + 99 others); Tue, 5 Apr 2022 11:12:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346175AbiDEJoc (ORCPT ); Tue, 5 Apr 2022 05:44:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D76CCA0F1; Tue, 5 Apr 2022 02:30:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 078316165C; Tue, 5 Apr 2022 09:30:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E11C7C385A2; Tue, 5 Apr 2022 09:30:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151012; bh=/kvIRSziW0x3o2dd/pwWaUBnYSKR0XEkNQf4oUXD/mg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AQJE5urI2Wdmh1q+aYtn1p2MQT8UT+epjoAqv++74CF0SRqkN1tjdrhYa/A7T0S3n 7tVFR0XAkadOO9b8kMkbrZcs/YpI401Z0qJY9SJJsc/wMf4RW5bCtJ0eikJf+SddRe AUqBbCDKF/fiuSsMLN7ovNwN+OIBZ8rz80WMxRyU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Peng Liu , Marco Elver , Daniel Latypov , Brendan Higgins , Alexander Potapenko , Dmitry Vyukov , Wang Kefeng , David Gow , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.15 263/913] kunit: make kunit_test_timeout compatible with comment Date: Tue, 5 Apr 2022 09:22:05 +0200 Message-Id: <20220405070347.739782572@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Peng Liu [ Upstream commit bdd015f7b71b92c2e4ecabac689642cc72553e04 ] In function kunit_test_timeout, it is declared "300 * MSEC_PER_SEC" represent 5min. However, it is wrong when dealing with arm64 whose default HZ = 250, or some other situations. Use msecs_to_jiffies to fix this, and kunit_test_timeout will work as desired. Link: https://lkml.kernel.org/r/20220309083753.1561921-3-liupeng256@huawei.com Fixes: 5f3e06208920 ("kunit: test: add support for test abort") Signed-off-by: Peng Liu Reviewed-by: Marco Elver Reviewed-by: Daniel Latypov Reviewed-by: Brendan Higgins Tested-by: Brendan Higgins Cc: Alexander Potapenko Cc: Dmitry Vyukov Cc: Wang Kefeng Cc: David Gow Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- lib/kunit/try-catch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kunit/try-catch.c b/lib/kunit/try-catch.c index 0dd434e40487..71e5c5853099 100644 --- a/lib/kunit/try-catch.c +++ b/lib/kunit/try-catch.c @@ -52,7 +52,7 @@ static unsigned long kunit_test_timeout(void) * If tests timeout due to exceeding sysctl_hung_task_timeout_secs, * the task will be killed and an oops generated. */ - return 300 * MSEC_PER_SEC; /* 5 min */ + return 300 * msecs_to_jiffies(MSEC_PER_SEC); /* 5 min */ } void kunit_try_catch_run(struct kunit_try_catch *try_catch, void *context) -- 2.34.1