public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Caspar Zhang <caspar@casparzhang.com>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net, Jeffrey Burke <jburke@redhat.com>
Subject: Re: [LTP] [PATCH] move_pages09: move_pages returns 0 if nothing got migrated
Date: Wed, 09 May 2012 18:25:27 +0800	[thread overview]
Message-ID: <4FAA4617.4090007@casparzhang.com> (raw)
In-Reply-To: <4FAA34D4.5000706@redhat.com>

On 05/09/2012 05:11 PM, Jan Stancek wrote:
> +		if ((tst_kvercmp(2, 6, 28)) >= 0) {
> +			if (ret == 0)
> +				tst_resm(TPASS, "move_pages succeeded");
> +			else
> +				tst_resm(TFAIL, "move_pages failed with: %s",
> +				    strerror(TEST_ERRNO));

Hi Jan,

We can use: tst_resm(TFAIL|TERRNO, "move_pages");

This will produce messages like:

TFAIL    : move_pages: errno=ENOENT(2): No such file or directory

> +		} else {
> +			if (ret == -1 && errno == ENOENT)
> +				tst_resm(TPASS, "move_pages failed with "
> +				    "ENOENT as expected");
> +			else
> +				tst_resm(TFAIL, "move_pages failed with: "
> +				    "%s", strerror(TEST_ERRNO));

Here as well.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      reply	other threads:[~2012-05-09 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-09  9:11 [LTP] [PATCH] move_pages09: move_pages returns 0 if nothing got migrated Jan Stancek
2012-05-09 10:25 ` Caspar Zhang [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=4FAA4617.4090007@casparzhang.com \
    --to=caspar@casparzhang.com \
    --cc=jburke@redhat.com \
    --cc=jstancek@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /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