public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
To: Xiong Zhou <xzhou@redhat.com>, ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v4 3/3] fcntl16: Skip fcntl16 test block2 and block3 on NFS
Date: Mon, 25 Aug 2014 12:26:29 +0400	[thread overview]
Message-ID: <53FAF335.7090506@oracle.com> (raw)
In-Reply-To: <1291208815.23057199.1408691123381.JavaMail.zimbra@redhat.com>



On 08/22/2014 11:05 AM, Xiong Zhou wrote:
>
> According to nfs(5), NLM supports advisory file locks only. So skip
> fcntl16 test block2 and block3 if NFS.
>
> Signed-off-by: Xiong Zhou <xzhou@redhat.com>
> ---

The entire series looks good for me.

Just found removed spaces below, but there is no need to resend the 
patch/series because it can be fixed at commit time. :)

Thanks.

Reviewed-by: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>


>   testcases/kernel/syscalls/fcntl/fcntl16.c | 27 +++++++++++++++++++++------
>   1 file changed, 21 insertions(+), 6 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/fcntl/fcntl16.c b/testcases/kernel/syscalls/fcntl/fcntl16.c
> index 44b6a80..67d3b17 100644
> --- a/testcases/kernel/syscalls/fcntl/fcntl16.c
> +++ b/testcases/kernel/syscalls/fcntl/fcntl16.c
> @@ -51,6 +51,8 @@
>   #include <sys/types.h>
>   #include <sys/wait.h>
>
> +#include "tst_fs_type.h"
> +
>   #define SKIPVAL 0x0f00
>   //#define       SKIP    SKIPVAL, 0, 0L, 0L, IGNORED
>   #define SKIP 0,0,0L,0L,0
> @@ -62,6 +64,7 @@
>   #define	NOBLOCK		2	/* immediate success */
>   #define	WILLBLOCK	3	/* blocks, succeeds, parent unlocks records */
>   #define	TIME_OUT	10
> +int NO_NFS = 1;			/* Test on NFS or not */
>
>   typedef struct {
>   	struct flock parent_a;
> @@ -412,6 +415,10 @@ void setup(void)
>
>   	tst_tmpdir();
>
> +	/* On NFS or not */
> +	if (tst_fs_type(cleanup, ".") == TST_NFS_MAGIC)
> +		NO_NFS = 0;
> +
>   	/* set up temp filename */
>   	sprintf(tmpname, "fcntl4.%d", parent);
>
> @@ -689,13 +696,17 @@ int main(int ac, char **av)
>   		 * locking
>   		 */
>   		tst_resm(TINFO, "Entering block 2");
> -		if (run_test(O_CREAT | O_RDWR | O_TRUNC, S_ISGID |
> +		if (NO_NFS && run_test(O_CREAT | O_RDWR | O_TRUNC, S_ISGID |
>   			     S_IRUSR | S_IWUSR, 0, 11)) {
>   			tst_resm(TINFO, "Test case 2: with mandatory record "
>   				 "locking FAILED");
>   		} else {
> -			tst_resm(TINFO, "Test case 2: with mandatory record "
> -				 "locking PASSED");
> +			if (NO_NFS)
> +				tst_resm(TINFO, "Test case 2: with mandatory"
> +					 "record locking PASSED");
We need a space here

> +			else
> +				tst_resm(TCONF, "Test case 2: NFS does not"
> +					 " support mandatory locking");
>   		}
>   		tst_resm(TINFO, "Exiting block 2");
>
> @@ -705,13 +716,17 @@ int main(int ac, char **av)
>   		 * and no delay
>   		 */
>   		tst_resm(TINFO, "Entering block 3");
> -		if (run_test(O_CREAT | O_RDWR | O_TRUNC | O_NDELAY,
> +		if (NO_NFS && run_test(O_CREAT | O_RDWR | O_TRUNC | O_NDELAY,
>   			     S_ISGID | S_IRUSR | S_IWUSR, 0, 11)) {
>   			tst_resm(TINFO, "Test case 3: mandatory locking with "
>   				 "NODELAY FAILED");
>   		} else {
> -			tst_resm(TINFO, "Test case 3: mandatory locking with "
> -				 "NODELAY PASSED");
> +			if (NO_NFS)
> +				tst_resm(TINFO, "Test case 3: mandatory"
> +					 "locking with NODELAY PASSED");
and here
> +			else
> +				tst_resm(TCONF, "Test case 3: NFS does not"
> +					 " support mandatory locking");
>   		}
>   		tst_resm(TINFO, "Exiting block 3");
>   	}
>

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2014-08-25  8:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <641981907.23056484.1408690948708.JavaMail.zimbra@redhat.com>
2014-08-22  7:05 ` [LTP] [PATCH v4 3/3] fcntl16: Skip fcntl16 test block2 and block3 on NFS Xiong Zhou
2014-08-25  8:26   ` Stanislav Kholmanskikh [this message]
2014-08-26  7:01     ` Xiong Zhou
2014-09-08  9:12     ` Stanislav Kholmanskikh
2014-09-09  9:38       ` Stanislav Kholmanskikh

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=53FAF335.7090506@oracle.com \
    --to=stanislav.kholmanskikh@oracle.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=xzhou@redhat.com \
    /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