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 picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CEDAECAAA1 for ; Tue, 30 Aug 2022 14:47:20 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 59DF03CA6D7 for ; Tue, 30 Aug 2022 16:47:18 +0200 (CEST) Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 50CD73C6651 for ; Tue, 30 Aug 2022 16:47:08 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id 52F5710000D5 for ; Tue, 30 Aug 2022 16:47:07 +0200 (CEST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 48CBB21EAF; Tue, 30 Aug 2022 14:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1661870827; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wz0tjm7vGcd7gRn65CC5KnVa3w4Jj2NZv5TbHZtBqJI=; b=jcqkWMuFWEq0RnMNQi+/KdgAgAreBHdMWvVBUmvv2dZ8xg6L2xwNvzmChuzJ/p/G/byw0l c/nV6XL0xWH5ic/QSeU30rhmJV6IZGLCABm4G+KFqj2WqucLcpFW5glUOsBFEe3ZAELjy3 WEI0sjK5LaLL4PWJvA7VOoMKkHBJglI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1661870827; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wz0tjm7vGcd7gRn65CC5KnVa3w4Jj2NZv5TbHZtBqJI=; b=lyccH1LSvgnUEK4nZunNwcdqeQhvH5FjtGpYLsbc08A/7+8DaM/N+OBjZCv3D5KYEcSBPg XAnL1CKJQvmAswAQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2F3D013B0C; Tue, 30 Aug 2022 14:47:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id QPyyCusiDmOSJQAAMHmgww (envelope-from ); Tue, 30 Aug 2022 14:47:07 +0000 Date: Tue, 30 Aug 2022 16:49:06 +0200 From: Cyril Hrubis To: Martin Doucha Message-ID: References: <20220830135007.16818-1-mdoucha@suse.cz> <20220830135007.16818-4-mdoucha@suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220830135007.16818-4-mdoucha@suse.cz> X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean Subject: Re: [LTP] [PATCH 03/10] ksm: Add max_runtime to tests X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ltp@lists.linux.it Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Hi! > ksm02, ksm04 and ksm05 take 10+ seconds to finish. Set max_runtime to avoid > random timeout issues. I wonder if we can do better. I guess that the actual runtime does depends on the size of the RAM because we wait for at least two finished full scans for ksmd. I guess that for large enough machines we would end up with minutes of runtime. So I guess that it would make more sense to treat the max_runtime as a upper bound and set it to large enough number as we do for AIO testcases (30 minutes) and then make the wait_ksmd_full_scan() runtime avare so that it exits when the runtime is exhausted. With that we would get a clear message that we timed-out in the loop that waited for the ksmd scan. > Signed-off-by: Martin Doucha > --- > testcases/kernel/mem/ksm/ksm02.c | 1 + > testcases/kernel/mem/ksm/ksm04.c | 1 + > testcases/kernel/mem/ksm/ksm05.c | 1 + > 3 files changed, 3 insertions(+) > > diff --git a/testcases/kernel/mem/ksm/ksm02.c b/testcases/kernel/mem/ksm/ksm02.c > index 1cb7d8e73..1f5677425 100644 > --- a/testcases/kernel/mem/ksm/ksm02.c > +++ b/testcases/kernel/mem/ksm/ksm02.c > @@ -110,6 +110,7 @@ static struct tst_test test = { > }, > .test_all = verify_ksm, > .min_kver = "2.6.32", > + .max_runtime = 20, > .needs_cgroup_ctrls = (const char *const []){ "cpuset", NULL }, > }; > > diff --git a/testcases/kernel/mem/ksm/ksm04.c b/testcases/kernel/mem/ksm/ksm04.c > index 39c741876..f7dc5befc 100644 > --- a/testcases/kernel/mem/ksm/ksm04.c > +++ b/testcases/kernel/mem/ksm/ksm04.c > @@ -112,6 +112,7 @@ static struct tst_test test = { > }, > .test_all = verify_ksm, > .min_kver = "2.6.32", > + .max_runtime = 20, > .needs_cgroup_ctrls = (const char *const []){ > "memory", "cpuset", NULL > }, > diff --git a/testcases/kernel/mem/ksm/ksm05.c b/testcases/kernel/mem/ksm/ksm05.c > index 146a9a3b7..6f94c4a9c 100644 > --- a/testcases/kernel/mem/ksm/ksm05.c > +++ b/testcases/kernel/mem/ksm/ksm05.c > @@ -88,6 +88,7 @@ static struct tst_test test = { > .forks_child = 1, > .test_all = test_ksm, > .min_kver = "2.6.32", > + .max_runtime = 10, > .save_restore = (const struct tst_path_val[]) { > {"!/sys/kernel/mm/ksm/run", "1"}, > {} > -- > 2.37.2 > > > -- > Mailing list info: https://lists.linux.it/listinfo/ltp -- Cyril Hrubis chrubis@suse.cz -- Mailing list info: https://lists.linux.it/listinfo/ltp