public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Andrea Cervesato <andrea.cervesato@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v8] Refactor aiocp using new LTP API
Date: Mon, 22 Aug 2022 12:25:20 +0200	[thread overview]
Message-ID: <YwNZkNhdNgAtXPAq@yuki> (raw)
In-Reply-To: <20220816115905.29680-1-andrea.cervesato@suse.com>

Hi!
> +	while (i < size) {
> +		if (!tst_remaining_runtime())
> +			tst_brk(TCONF, "Out of runtime!");
>  
> -	if (!prefix_max) {
> -		fprintf(stderr, "Path '%s' not found in /proc/mounts\n", path);
> -		return 0;
> -	}
> -
> -	printf("Path '%s' is on device '%s'\n", path, dev_name);
> +		offset = rand() % (bufsize / 2);

This is now length not offset, also now the size we pass to the write
varies between 0 and bufsize/2. Shouldn't we rather go for a size
between bufsize/2 and bufsize?

	len = rand() % (bufsize/2) + bufsize/2;
	towrite = MIN(len, size-i);


-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-08-22 10:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-16 11:59 [LTP] [PATCH v8] Refactor aiocp using new LTP API Andrea Cervesato via ltp
2022-08-22 10:25 ` Cyril Hrubis [this message]
2022-10-11 12:29   ` Richard Palethorpe
  -- strict thread matches above, loose matches on Subject: below --
2022-10-13  8:21 [LTP] [PATCH v8 0/2] Rewrite aio-stress test Andrea Cervesato via ltp
2022-10-13  8:21 ` [LTP] [PATCH v8] Refactor aiocp using new LTP API Andrea Cervesato via ltp
2022-10-24  7:27   ` Richard Palethorpe

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=YwNZkNhdNgAtXPAq@yuki \
    --to=chrubis@suse.cz \
    --cc=andrea.cervesato@suse.com \
    --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