public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/3] lib: add .min_cpus in tst_test struct
Date: Mon, 7 Dec 2020 15:41:36 +0100	[thread overview]
Message-ID: <X84/IAwVIwXjN+6Z@yuki.lan> (raw)
In-Reply-To: <20201204063305.6820-1-liwang@redhat.com>

Hi!
Pushed with two fixes, thanks.

> +	/* Minimum numbers of online CPU required by the test */
                      ^
		      number
> +	unsigned long min_cpus;
> +
>  	/*
>  	 * If set non-zero number of request_hugepages, test will try to reserve the
>  	 * expected number of hugepage for testing in setup phase. If system does not
> diff --git a/lib/tst_test.c b/lib/tst_test.c
> index 535c0ff4c..c4e04eb4a 100644
> --- a/lib/tst_test.c
> +++ b/lib/tst_test.c
> @@ -918,6 +918,9 @@ static void do_setup(int argc, char *argv[])
>  	if (tst_test->all_filesystems)
>  		tst_test->needs_device = 1;
>  
> +	if (tst_test->min_cpus > tst_ncpus())
                                   ^
				   Added (unsigned long) cast to silence
				   warnings.
> +		tst_brk(TCONF, "Test needs at least %lu CPUs online", tst_test->min_cpus);
> +
>  	if (tst_test->request_hugepages)
>  		tst_request_hugepages(tst_test->request_hugepages);
>  
> -- 
> 2.21.3
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Cyril Hrubis
chrubis@suse.cz

      parent reply	other threads:[~2020-12-07 14:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03 11:06 [LTP] [PATCH 1/3] lib: add .min_cpus in tst_test struct Li Wang
2020-12-03 11:06 ` [LTP] [PATCH 2/3] syscalls: take use of .min_cpus Li Wang
2020-12-03 11:06 ` [LTP] [PATCH 3/3] af_alg07: add dynamic bias for ARM Li Wang
2020-12-03 12:32   ` Richard Palethorpe
2020-12-03 14:27     ` Martin Doucha
2020-12-03 12:18 ` [LTP] [PATCH 1/3] lib: add .min_cpus in tst_test struct Richard Palethorpe
2020-12-04  6:33 ` [LTP] [PATCH v2 " Li Wang
2020-12-04  6:33   ` [LTP] [PATCH v2 2/3] syscalls: make use of .min_cpus Li Wang
2020-12-07 14:41     ` Cyril Hrubis
2020-12-04  6:33   ` [LTP] [PATCH v2 3/3] af_alg07: add dynamic bias for ARM Li Wang
2020-12-09  6:12     ` Li Wang
2020-12-09  9:17       ` Richard Palethorpe
2020-12-09 11:26     ` Martin Doucha
2020-12-09 12:37       ` Li Wang
2020-12-07 14:41   ` Cyril Hrubis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X84/IAwVIwXjN+6Z@yuki.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox