All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC] [PATCH 01/15] lib/tst_mkfs: Clear first 512k of the device
Date: Thu, 7 Sep 2017 10:34:28 +0200	[thread overview]
Message-ID: <20170907083428.GA32577@rei.lan> (raw)
In-Reply-To: <1786606525.10020364.1504770171451.JavaMail.zimbra@redhat.com>

Hi!
> > If we cal tst_mkfs() from a test more than once we end up with the very
> > same bug we already fixed by clearing the device in
> > tst_acquire_device(), i.e. some mkfs programs will not format it when
> > there is a valid FS signature there.
> > 
> > So this commit moves the code to clear up the first 512k of the device
> > from tst_acquire_device() to the tst_mkfs() where it rightfully belongs.
> 
> Didn't we move the clearing to tst_acquire_device() because of shell library
> some time ago? tst_mkfs() from tst_test.sh is not using tst_mkfs_().

Right, the shell mkfs test would fail in a case that we have a device
passed via LTP_DEV because the start of the device wouldn't be cleaned
at all.

I guess that the easiest solution would be leaving the code to clear the
start of the device in the acquire_device() as well. We would end up
clearing it twice in some situations though.

-- 
Cyril Hrubis
chrubis@suse.cz

      reply	other threads:[~2017-09-07  8:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 16:09 [LTP] [RFC] [PATCH 01/15] lib/tst_mkfs: Clear first 512k of the device Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 02/15] lib: Add interface to list supported filesystems Cyril Hrubis
2017-09-07  7:48   ` Jan Stancek
2017-09-07  8:25   ` Jan Stancek
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 03/15] SAFE_MOUNT: Handle FUSE mounts as well Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 04/15] lib/tst_test: Add .all_filesystems flag Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 05/15] lib/tst_fs: Add tst_fill_fs() Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 06/15] syscalls/fallocate05: New test Cyril Hrubis
2017-09-07  8:51   ` Jan Stancek
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 07/15] syscalls/msync04: Run test for all filesystems Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 08/15] syscalls/fallocate04: Convert to the new library Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 09/15] syscalls/fallocate04: Run test for all filesystems Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 10/15] syscalls/setxattr01: Convert to the new library Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 11/15] syscalls/setxattr01: Run test for all filesystems Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 12/15] syscallse/setxattr02: Convert to the new library Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 13/15] syscalls/fsync01: " Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 14/15] syscalls/fsync01: Run test for all filesystems Cyril Hrubis
2017-09-05 16:09 ` [LTP] [RFC] [PATCH 15/15] fs/fs_fill: Add a test to fill a FS in a few threads Cyril Hrubis
2017-09-07  9:13   ` Jan Stancek
2017-09-07  7:42 ` [LTP] [RFC] [PATCH 01/15] lib/tst_mkfs: Clear first 512k of the device Jan Stancek
2017-09-07  8:34   ` 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=20170907083428.GA32577@rei.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 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.