All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 15/16] fs/fs_fill: Add a test to fill a FS in a few threads
Date: Thu, 9 Nov 2017 11:19:15 +0100	[thread overview]
Message-ID: <20171109101915.GA7738@rei> (raw)
In-Reply-To: <CAEemH2f8Dya2XUvZZ2t9XMbbVFo_tM5B=LuzjZqyB8ZCA6qvVA@mail.gmail.com>

Hi!
> This case always broken in SAFE_* operations, seems the reason is no
> space left on the device,
> so I wonder if is it necessary to create so many thread "CPUs + 2" to
> run the test?
> 
> What about just creating half of CPU number thread (nthreads =
> tst_ncpus_conf()/2 + 1) there?
> 
> $ git diff
> diff --git a/testcases/kernel/fs/fs_fill/fs_fill.c
> b/testcases/kernel/fs/fs_fill/fs_fill.c
> index a50a22f..13207c4 100644
> --- a/testcases/kernel/fs/fs_fill/fs_fill.c
> +++ b/testcases/kernel/fs/fs_fill/fs_fill.c
> @@ -106,7 +106,7 @@ static void testrun(void)
> 
>  static void setup(void)
>  {
> -       nthreads = tst_ncpus_conf() + 2;
> +       nthreads = tst_ncpus_conf()/2 + 1;
> 
>         tst_res(TINFO, "Running %i writer threads", nthreads);
>  }

This does not fix the problem, only makes it less likely.

The correct fix is to use open() instead of SAFE_OPEN() in the
tst_fill_fs() and just return from the function when we get ENOSPC. I
can fix that, or you can send the patch. Either way thanks for pointing
out the mistake.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2017-11-09 10:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11 14:41 [LTP] [PATCH v3 01/16] lib/tst_mkfs: Clear first 512k of the device Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 02/16] lib: Add interface to list supported filesystems Cyril Hrubis
2017-11-09 18:38   ` Sandeep Patil
2017-10-11 14:41 ` [LTP] [PATCH v3 03/16] SAFE_MOUNT: Handle FUSE mounts as well Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 04/16] lib/tst_test: Add .all_filesystems flag Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 05/16] lib/tst_fs: Add tst_fill_fs() Cyril Hrubis
2017-11-09 18:50   ` Sandeep Patil
2017-10-11 14:41 ` [LTP] [PATCH v3 06/16] syscalls/fallocate05: New test Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 07/16] syscalls/msync04: Run test for all filesystems Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 08/16] syscalls/fallocate04: Convert to the new library Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 09/16] syscalls/fallocate04: Run test for all filesystems Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 10/16] syscalls/setxattr01: Convert to the new library Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 11/16] syscalls/setxattr01: Run test for all filesystems Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 12/16] syscallse/setxattr02: Convert to the new library Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 13/16] syscalls/fsync01: " Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 14/16] syscalls/fsync01: Run test for all filesystems Cyril Hrubis
2017-10-11 14:41 ` [LTP] [PATCH v3 15/16] fs/fs_fill: Add a test to fill a FS in a few threads Cyril Hrubis
2017-11-09 10:03   ` Li Wang
2017-11-09 10:19     ` Cyril Hrubis [this message]
2017-11-09 10:43       ` Li Wang
2017-11-09 10:50         ` Cyril Hrubis
2017-11-09 10:58           ` Li Wang
2017-10-11 14:41 ` [LTP] [PATCH v3 16/16] doc: Update device flags in test-writing-guidelines Cyril Hrubis
2017-11-09 18:51   ` Sandeep Patil
2017-11-01 12:24 ` [LTP] [PATCH v3 01/16] lib/tst_mkfs: Clear first 512k of the device Cyril Hrubis
2017-11-02  9:26   ` Jan Stancek
2017-11-02 13:15     ` Cyril Hrubis

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=20171109101915.GA7738@rei \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.