public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Wanlong Gao <gaowanlong@cn.fujitsu.com>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: LTP list <ltp-list@lists.sourceforge.net>
Subject: Re: [LTP] [PATCH] Fix the fork/11-1 conformance testcase
Date: Sun, 27 May 2012 15:33:25 +0800	[thread overview]
Message-ID: <4FC1D8C5.4050804@cn.fujitsu.com> (raw)
In-Reply-To: <CAGH67wQmnoUVOftT8=hL_T7Tv28WdGaQpmL09YQ5LWWqf=9U2w@mail.gmail.com>

On 05/26/2012 10:15 PM, Garrett Cooper wrote:

> The testcase tests to see whether or not locks are successfully
> inherited across forking processes, as the requirements for fork state
> that they should not be. The problem is that the test tests the negative
> case for ftrylockfile (!= 0) instead of the positive case, which creates


The ftrylockfile() function returns zero for success (the lock was obtained),
and nonzero for failure. 
So I think the origin is right.

Thanks,
Wanlong Gao

> an erroneous test failure as OUTPUT goes to /dev/stdout and the test
> hangs.
> 
> Signed-off-by: Garrett Cooper <yanegomi@gmail.com>
> 
> diff --git a/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
> b/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
> index ffff125..632b0db 100644
> --- a/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
> +++ b/testcases/open_posix_testsuite/conformance/interfaces/fork/11-1.c
> @@ -85,7 +85,7 @@ void * threaded(void * arg)
>         int ret;
>         ret = ftrylockfile(stdout);
> 
> -       if (ret != 0)
> +       if (ret == 0)
>         {
>                 FAILED("The child process is owning the file lock.");
>         }
> @@ -168,4 +168,4 @@ int main(int argc, char * argv[])
>  #endif
> 
>         PASSED;
> -}
> \ No newline at end of file
> +}
> 
> 
> 
> ------------------------------------------------------------------------------
> 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



------------------------------------------------------------------------------
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-27  7:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-26 14:15 [LTP] [PATCH] Fix the fork/11-1 conformance testcase Garrett Cooper
2012-05-27  7:33 ` Wanlong Gao [this message]
2012-05-27  8:00   ` Garrett Cooper
2012-05-27  8:14     ` Wanlong Gao
2012-05-27  8:23       ` Garrett Cooper
2012-05-27  9:06         ` Wanlong Gao
2012-05-27 18:19           ` Garrett Cooper
2012-05-28  2:26             ` Wanlong Gao

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=4FC1D8C5.4050804@cn.fujitsu.com \
    --to=gaowanlong@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=yanegomi@gmail.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