Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp666431pxb; Tue, 5 Apr 2022 17:58:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypD5TZdpRDLIE6mggSfBzLQ5oDQ78mMBpBLKE7y0Es+ZstUiHoppy6uzMxDDyf8J975q3f X-Received: by 2002:a17:907:2d90:b0:6d8:9fc9:ac36 with SMTP id gt16-20020a1709072d9000b006d89fc9ac36mr6062015ejc.28.1649206660052; Tue, 05 Apr 2022 17:57:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649206660; cv=none; d=google.com; s=arc-20160816; b=ODQhddAU9zBQdI9V5lvUTLP5nd4L0M5cw3NDos69aJTeeTiUvq40I8ac2MjdUyAnwU 53hBW0AoRnD4aAv/kyFHCYhFXad7ZkHaAdRoRgmh6k0bkTB7P0UfRJv7BoGmQW5h6+bK Adm9fSxDZ7Odr3oymUO6sW2mRuoWnUlRbs3VWDO5o7p5xA+xfBm8kq4QplsN9nqF85V+ qPeEkIW7t6+U6idq5l7b9d5t879iPhHf5C7cuRoiRnJL2k39mavSUstjFAZNXDghU1P7 RT34pGqZ5kJes5d2Z2pze8iPCgjhyYl+etnp0sHItUutPI/T64RWxNM1SsVN2NE8uwaT L3Cg== 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=Ps0ioUGeeYLDwxXBXJAOUA5M5s+C9QYUTUR2zx4Pa3Fbc/ulny9oKOREqAz8KDmomB mQ9N9OMZDUtQTnxH0dz9oCSLIDjRvfJ4AO/x2lQCN0o703BK+2lg+GqkECES9xjR2cb2 C1ClBxhAMwaKluG1l5Olu51WBymDi+BxzxPZro6ry0jT1uGk9EJ7xhiL5CfgUPucSZs/ f+sNobtVAFNhA5v/Mdwf3izmhH3ZRr33mxeiGJeeElzLudYEIxVBCUR64k+HZfHlqmIf 8iarVcFxUpZByVcLdzu9RXiC7aP80B5r87OfoBHtpKrj4j19l33JRhGIA8xKYnRDzOZR +4XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zGheEi+o; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d16-20020a1709061f5000b006e03cb5bebdsi10387255ejk.753.2022.04.05.17.57.12; Tue, 05 Apr 2022 17:57:40 -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=@linuxfoundation.org header.s=korg header.b=zGheEi+o; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356935AbiDEMKL (ORCPT + 99 others); Tue, 5 Apr 2022 08:10:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244761AbiDEIwh (ORCPT ); Tue, 5 Apr 2022 04:52:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3907E0B0; Tue, 5 Apr 2022 01:43:35 -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 ams.source.kernel.org (Postfix) with ESMTPS id 8FD74B81A32; Tue, 5 Apr 2022 08:43:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA5CAC385A0; Tue, 5 Apr 2022 08:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148213; bh=/kvIRSziW0x3o2dd/pwWaUBnYSKR0XEkNQf4oUXD/mg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zGheEi+otXcf3afYtCNJQVzgE+M0ic2amkZ2DWLhLFZ2yqyMS9KsfYyWGK78fWMv3 D6uFY2ZSsHYosbUUbu/rMHXr5h6xUdthx7oU32gi+p3WMqsN4fZTSyWdXc1EGKY4b9 uFsNzqevD3zyPjbYR70kr4PA68kKYq7k+sSXV7bs= 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.16 0276/1017] kunit: make kunit_test_timeout compatible with comment Date: Tue, 5 Apr 2022 09:19:49 +0200 Message-Id: <20220405070402.459185133@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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