public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] syscalls/quotactl: Skip tests if FS quota is not supported
Date: Fri, 12 Mar 2021 11:39:27 +0100	[thread overview]
Message-ID: <YEtE319q3N4z0qQL@pevik> (raw)
In-Reply-To: <20210309171104.30821-2-mdoucha@suse.cz>

Hi Martin,

> --- a/testcases/kernel/syscalls/quotactl/quotactl04.c
...
> +static void do_mount(const char *source, const char *target,
> +	const char *filesystemtype, unsigned long mountflags,
> +	const void *data)
> +{
> +	TEST(mount(source, target, filesystemtype, mountflags, data));
> +
> +	if (TST_RET == -1 && TST_ERR == ESRCH)
> +		tst_brk(TCONF, "Kernel or device does not support FS quotas");
BTW I was also thinking about moving this also into safe_mount(), but
quotactl04.c is the only test which is using "-O quota" option, thus probably
useless.

Kind regards,
Petr

> +
> +	if (TST_RET == -1) {
> +		tst_brk(TBROK | TTERRNO, "mount(%s, %s, %s, %lu, %p) failed",
> +			source, target, filesystemtype, mountflags, data);
> +	}
> +
> +	if (TST_RET) {
> +		tst_brk(TBROK | TTERRNO, "mount(%s, %s, %s, %lu, %p) failed",
> +			source, target, filesystemtype, mountflags, data);
> +	}
> +
> +	mount_flag = 1;
> +}

  parent reply	other threads:[~2021-03-12 10:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 17:11 [LTP] [PATCH 1/2] Add FS quota availability check functions Martin Doucha
2021-03-09 17:11 ` [LTP] [PATCH 2/2] syscalls/quotactl: Skip tests if FS quota is not supported Martin Doucha
2021-03-12 10:33   ` Petr Vorel
2021-03-12 10:39   ` Petr Vorel [this message]
2021-03-12 10:21 ` [LTP] [PATCH 1/2] Add FS quota availability check functions Petr Vorel
2021-03-12 10:28 ` Petr Vorel
2021-03-12 17:15   ` Martin Doucha
2021-03-12 17:37     ` Petr Vorel

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=YEtE319q3N4z0qQL@pevik \
    --to=pvorel@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