From mboxrd@z Thu Jan 1 00:00:00 1970 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 5EED8C433FE for ; Wed, 9 Mar 2022 10:05:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231928AbiCIKGK (ORCPT ); Wed, 9 Mar 2022 05:06:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbiCIKGH (ORCPT ); Wed, 9 Mar 2022 05:06:07 -0500 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A21613CEED for ; Wed, 9 Mar 2022 02:05:08 -0800 (PST) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-2d07ae0b1c0so17044747b3.2 for ; Wed, 09 Mar 2022 02:05:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3ts1/JyZlYWr+VS9x1U6wWLuWTL/1XWXl7pSXJy75es=; b=kIGAA3FTHLFrsQLliUZIrXCp2oz6cMaC+RZr6kbuzu01pYu9j/egDapYHdtKN/eMIW yKtGP79Jn4tSKPSOZGepCO8j23Avps1mS7wlQbDtldTd+QEp9HSjCkDDD/PGltCQ+Lyf k37Hj9ij+c+yd4I0W+PKUNB6SUQDOjfyNUvEqa00Mj9C44r3R9qqlwuO7yku3jWn8r8x NXzGHWZY/ERFNs7RJ09dTs6S0fqVaOBqXgQylhhXH8jxJhOrPPWn4KImIHcC+7aeCEAJ EezurKqTXxUzCrAXEQIJ+J1ja3R/ZdwYcI3mBu5TP//S+ssopIFiavAhiJsgCacWZ5L8 eKEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3ts1/JyZlYWr+VS9x1U6wWLuWTL/1XWXl7pSXJy75es=; b=AJYOypb0v08xtUWDTAXAYoljM9FDsejyEtydYS+KA22ZtWQji+FxECDgdsnp5r99G1 GdFmYfGkyOM8bFrCw7zGNySArOvI7HZn8fYcxBLF7r4j+B7Ep78EDkATXoRVTuO4INUU Kj2+RjGZtNINIjJO7Bwl0Pv4gKPbvY+9rFc3qoQfi7Y61OqCzCUmii6SseJ/yk6P7s9c AC0UjJjbtA6P+bkhdWf9OMYFtLmmYGffIEimRhyiMuJzoTtOm+ARMSykMb7noEOt4ynB lt8UekAJrUC1gM+Hm+eu5d6uc6EIsm9W1Y4fhWjY2ux6BY+YrZffWx3Y4z4KG+iJHcV1 vZ6w== X-Gm-Message-State: AOAM533u5NQ/+OP0RA+p8qv/e06mOVoVT2jz+XRuo/S6a+rxTogL12nL 6xz6EVq7YrnktdSwiuFmneECKQhicSIcCiBUJbhBhA== X-Google-Smtp-Source: ABdhPJw/YRwSs6AWy6LoOEWcJ9Qxv03XdqFgsSGGnQ1xzavlc4bTO/BMkKNAaNHIiAS/FckEFkjyNS+7ZIbwEI4LKek= X-Received: by 2002:a81:9ad7:0:b0:2db:f000:32e7 with SMTP id r206-20020a819ad7000000b002dbf00032e7mr16235265ywg.412.1646820307524; Wed, 09 Mar 2022 02:05:07 -0800 (PST) MIME-Version: 1.0 References: <20220309083753.1561921-1-liupeng256@huawei.com> <20220309083753.1561921-3-liupeng256@huawei.com> In-Reply-To: <20220309083753.1561921-3-liupeng256@huawei.com> From: Marco Elver Date: Wed, 9 Mar 2022 11:04:30 +0100 Message-ID: Subject: Re: [PATCH v2 2/3] kunit: make kunit_test_timeout compatible with comment To: Peng Liu Cc: brendanhiggins@google.com, glider@google.com, dvyukov@google.com, akpm@linux-foundation.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, wangkefeng.wang@huawei.com, Daniel Latypov , David Gow Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 9 Mar 2022 at 09:19, 'Peng Liu' via kasan-dev wrote: > > 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. > > Fixes: 5f3e06208920 ("kunit: test: add support for test abort") > Signed-off-by: Peng Liu Reviewed-by: Marco Elver +Cc more KUnit folks. > --- > 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 6b3d4db94077..f7825991d576 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.18.0.huawei.25 > > -- > You received this message because you are subscribed to the Google Groups "kasan-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/20220309083753.1561921-3-liupeng256%40huawei.com.