Linux Test Project
 help / color / mirror / Atom feed
From: Richard Palethorpe <rpalethorpe@suse.de>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH RESEND] syscalls/swapon03: do not fail if /proc/swaps is absent
Date: Mon, 30 Apr 2018 09:50:09 +0200	[thread overview]
Message-ID: <87efixxhe6.fsf@rpws.prws.suse.cz> (raw)
In-Reply-To: <20180429220615.1206-1-smuckle.linux@gmail.com>

Hello Steve,

Steve Muckle writes:

> If the /proc/swaps file is absent the test should be skipped due
> to incompatible configuration.
>
> Signed-off-by: Steve Muckle <smuckle.linux@gmail.com>
> ---
>  testcases/kernel/syscalls/swapon/swapon03.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/swapon/swapon03.c b/testcases/kernel/syscalls/swapon/swapon03.c
> index d3f73b044fe1..955ac247b6a2 100644
> --- a/testcases/kernel/syscalls/swapon/swapon03.c
> +++ b/testcases/kernel/syscalls/swapon/swapon03.c
> @@ -328,6 +328,9 @@ static void setup(void)
>  
>  	tst_require_root();
>  
> +	if (access("/proc/swaps", F_OK))
> +		tst_brkm(TCONF, NULL, "swap not supported by kernel");
> +
>  	tst_tmpdir();
>  
>  	switch ((fs_type = tst_fs_type(cleanup, "."))) {

LGTM

-- 
Thank you,
Richard.

  reply	other threads:[~2018-04-30  7:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-29 22:06 [LTP] [PATCH RESEND] syscalls/swapon03: do not fail if /proc/swaps is absent Steve Muckle
2018-04-30  7:50 ` Richard Palethorpe [this message]
2018-04-30 11:20 ` Petr Vorel
2018-05-01 20:41   ` Steve Muckle

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=87efixxhe6.fsf@rpws.prws.suse.cz \
    --to=rpalethorpe@suse.de \
    --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