From: Markos Chandras <Markos.Chandras@imgtec.com>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH v3] dup3(2): add EINVAL error number test
Date: Thu, 28 Nov 2013 16:55:04 +0000 [thread overview]
Message-ID: <52977568.9070306@imgtec.com> (raw)
In-Reply-To: <20131128143504.GF19263@rei.Home>
On 11/28/2013 02:35 PM, chrubis@suse.cz wrote:
> Hi!
>> +static void cleanup(void)
>> +{
>> + TEST_CLEANUP;
>> +
>> + SAFE_CLOSE(cleanup, old_fd);
>
> Take care not to call cleanup() from within a cleanup()
>
> If the close() here will fail, the cleanup will be called, then the
> close() will fail and the cleanup will be called... untill the end of
> the stack and the test will eventually SegFault.
>
> Also if the SAFE_CREAT() in setup() will fail, the close() will fail
> too, because the old_fd will be set to -1.
>
> I've fixed that this time and pushed (see diff bellow), thanks.
>
>
> @@ -117,7 +117,8 @@ static void cleanup(void)
> {
> TEST_CLEANUP;
>
> - SAFE_CLOSE(cleanup, old_fd);
> + if (old_fd > 0)
> + SAFE_CLOSE(NULL, old_fd);
>
> tst_rmdir();
> }
>
Hello,
This test does not seem to compile on uClibc based systems
I am getting this:
dup3_02.c:53: error: 'O_CLOEXEC' undeclared here (not in a function)
--
markos
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2013-11-28 16:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-21 10:36 [LTP] [PATCH v3] dup3(2): add EINVAL error number test Xiaoguang Wang
2013-11-28 14:35 ` chrubis
2013-11-28 16:55 ` Markos Chandras [this message]
2013-11-28 17:09 ` chrubis
[not found] ` <52977A31.8060400@imgtec.com>
2013-11-28 17:21 ` 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=52977568.9070306@imgtec.com \
--to=markos.chandras@imgtec.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