public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Shuang Qiu <shuang.qiu@oracle.com>
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED
Date: Mon, 18 Aug 2014 15:00:34 +0800	[thread overview]
Message-ID: <53F1A492.60108@oracle.com> (raw)
In-Reply-To: <7f26ec5fbdf900ddb77ec9a40debc5291498ab1b.1389101980.git.jstancek@redhat.com>

Hi Jan,

In this case,if MPOL_F_MEMS_ALLOWED is undeclared,"ret = -1" will make 
some of cpuset_syscall_test failed.
i.e. test15 failed: cpuset_syscall 15 TFAIL : Test task exited 
abnormally.(expect return value is 0)
Why do we fail this test if MPOL_F_MEMS_ALLOWED is undeclared rather 
than skip this test.

Thanks
Shuang
On 01/07/2014 09:46 PM, Jan Stancek wrote:
> This is to fix compilation on RHEL5.3:
>    gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2
>    -I/root/ltp/testcases/kernel/include -DNUMA_VERSION1_COMPATIBILITY
>    -I../../../../../include -I../../../../../include
>    -L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib
>    -L/root/ltp/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../../libcontrollers
>    -L../../../../../lib  cpuset_syscall_test.c   -lltp -lcpu_set
>    -lcontrollers -lltp -lnuma -o cpuset_syscall_test
>    cpuset_syscall_test.c: In function ‘test_get_mempolicy’:
>    cpuset_syscall_test.c:190: error: ‘MPOL_F_MEMS_ALLOWED’ undeclared
>    (first use in this function)
>    cpuset_syscall_test.c:190: error: (Each undeclared identifier is
>    reported only once
>    cpuset_syscall_test.c:190: error: for each function it appears in.)
>    make[5]: *** [cpuset_syscall_test] Error 1
>
> This patch restores check which has been removed by this commit:
>    commit 87156a05a2ffd50f5e467d6f986daae9da7b9cf7
>    Author: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
>    Date:   Tue Oct 1 17:44:50 2013 +0400
>      cpuset/cpuset_syscall_test: fixes
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
>   .../cpuset_syscall_test/cpuset_syscall_test.c      |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
> index dd35cd0..e202295 100644
> --- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
> +++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
> @@ -186,8 +186,12 @@ void test_get_mempolicy(void)
>   		ret = 1;
>   		return;
>   	}
> +#if HAVE_DECL_MPOL_F_MEMS_ALLOWED
>   	ret = get_mempolicy(NULL, bitmask_mask(nmask), bitmask_nbits(nmask), 0,
>   			    MPOL_F_MEMS_ALLOWED);
> +#else
> +	ret = -1;
> +#endif
>   
>   	bitmask_displaylist(str, 256, nmask);
>   	puts(str);


------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  parent reply	other threads:[~2014-08-18  7:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-07 13:46 [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined Jan Stancek
2014-01-07 13:46 ` [LTP] [PATCH 2/3] cpuset/cpuset_syscall_test: check HAVE_DECL_MPOL_F_MEMS_ALLOWED Jan Stancek
2014-01-09 18:48   ` chrubis
2014-08-18  7:00   ` Shuang Qiu [this message]
2014-08-18  7:49     ` Jan Stancek
2014-10-15 12:16       ` Cyril Hrubis
2014-01-07 13:46 ` [LTP] [PATCH 3/3] syscalls/dup3_02: define O_CLOEXEC if needed Jan Stancek
2014-01-08 13:00 ` [LTP] [PATCH 1/3] lib: errnos: use ERFKILL only if it's defined chrubis

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=53F1A492.60108@oracle.com \
    --to=shuang.qiu@oracle.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