All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/2] swapon01: Simplify code, add copyright
Date: Fri, 19 Jan 2024 14:36:34 +0100	[thread overview]
Message-ID: <20240119133634.GA27666@pevik> (raw)
In-Reply-To: <ZapkKSTNkXsnulC3@yuki>

Hi Cyril,

> Hi!
> >  /*\
> > @@ -21,18 +22,11 @@

> >  static void verify_swapon(void)
> >  {
> > -	TEST(tst_syscall(__NR_swapon, SWAP_FILE, 0));
> > +	TST_EXP_PASS(tst_syscall(__NR_swapon, SWAP_FILE, 0));

> > -	if (TST_RET == -1) {
> > -		tst_res(TFAIL | TTERRNO, "Failed to turn on swapfile");
> > -	} else {
> > -		tst_res(TPASS, "Succeeded to turn on swapfile");
> > -		/*we need to turn this swap file off for -i option */
> > -		if (tst_syscall(__NR_swapoff, SWAP_FILE) != 0) {
> > -			tst_brk(TBROK | TERRNO, "Failed to turn off swapfile,"
> > -				" system reboot after execution of LTP "
> > -				"test suite is recommended.");
> > -		}
> > +	if (tst_syscall(__NR_swapoff, SWAP_FILE) != 0) {

> Maybe if (TST_PASS && tst_syscall(__NR_swapoff, ...) != 0) {

Rebased, add this change and merged. Thanks!

Kind regards,
Petr


> Otherwise it looks good, with that change:

> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

> > +		tst_brk(TBROK | TERRNO,
> > +				"Failed to turn off swapfile, system reboot recommended");
> >  	}
> >  }

> > -- 
> > 2.42.0

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2024-01-19 13:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-11 16:24 [LTP] [PATCH 0/2] swapon01: Test on all filesystems, cleanup Petr Vorel
2023-10-11 16:24 ` [LTP] [PATCH 1/2] swapon01: Test on all filesystems Petr Vorel
2024-01-19 11:42   ` Cyril Hrubis
2024-01-19 12:26     ` Li Wang
2024-01-19 14:33       ` Petr Vorel
2024-01-19 14:53         ` Cyril Hrubis
2023-10-11 16:24 ` [LTP] [PATCH 2/2] swapon01: Simplify code, add copyright Petr Vorel
2024-01-19 11:59   ` Cyril Hrubis
2024-01-19 13:36     ` Petr Vorel [this message]
2023-10-12  9:28 ` [LTP] [PATCH 0/2] swapon01: Test on all filesystems, cleanup Marius Kittler
2024-01-12  7:18   ` Li Wang

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=20240119133634.GA27666@pevik \
    --to=pvorel@suse.cz \
    --cc=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.