Linux Test Project
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 04/15] lib/tst_test: Add .all_filesystems flag
Date: Wed, 11 Oct 2017 04:42:47 -0400 (EDT)	[thread overview]
Message-ID: <1573092724.28358902.1507711367946.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20171010123205.20147-4-chrubis@suse.cz>



----- Original Message -----
> This commit adds a support for re-runing a test on all available
> filesystems simply by turning on .all_filesystems flag in the tst_test
> structure.
> 
> The .all_filesystems flag implies .needs_device, the .format_filesystem and
> .mount_filesystem works as usuall but the device is formatted and mounted for
> each filesystem before we run the test function. The .setup and .cleanup
> functions are executed for each filesystem. The currently tested filesystem
> type is stored in the tst_device->fs_type.
> 
> This allows us to easily run a test that tests filesystem specific
> syscall for all supported filesystems without a need to hardcode all fs
> types into a runtest file and with a minimal changes to the test code.
> 
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>

Hi,

Overall series looks good to me. My tests on RHEL 5.6/6.0/7.4 and 4.14-rc
kernels went all without issues. Couple notes below.

1) When this is merged, we should also add some notes to docs.
For example: timeout applies for one filesystem, not all
combined.

2)
<snip>

> +static int run_tcases_per_fs(void)
> +{
> +	int ret = 0;
> +	unsigned int i;
> +	const char *const *filesystems = tst_get_supported_fs_types();
> +
> +	if (!filesystems[0])
> +		tst_brk(TCONF, "There are no supported filesystems");
> +
> +	for (i = 0; filesystems[i]; i++) {
> +		tdev.fs_type = filesystems[i];
> +
> +		prepare_device();
> +
> +		ret = fork_testrun();
> +
> +		if (mntpoint_mounted) {
> +			tst_umount(tst_test->mntpoint);
> +			mntpoint_mounted = 0;
> +		}
> +
> +		if (ret == TCONF) {
> +			update_results(ret);
> +			continue;
> +		}
> +
> +		if (ret == 0)
> +			continue;
> +
> +		do_exit(ret);
> +	}

I'm on the fence here, if we should stop immediately after we get
a TFAIL or TBROK. For example: Is a TFAIL on ext2 reason to stop
testing xfs?

3) fs_fill test is still quite verbose

# ./fs_fill > log2 2>&1
# du -h log2
688K	log2

# grep Got log2
fs_fill.c:96: PASS: Got 5713 ENOSPC
fs_fill.c:96: PASS: Got 9 ENOSPC
fs_fill.c:96: PASS: Got 1709 ENOSPC

I'm running this on single CPU KVM guest, which is (presumably due to caching
and host SSD) able to trigger ENOSPC many times in those 2 seconds.

I expect baremetal systems with many CPUs producing lot of output as well,
because we start tst_fill_fs() in NR_CPU+2 threads.

Regards,
Jan

  reply	other threads:[~2017-10-11  8:42 UTC|newest]

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