From: Mike Frysinger <vapier@gentoo.org>
To: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [Bug Fix] write04 will crash on uClinux platform
Date: Wed, 29 Dec 2010 11:32:12 -0500 [thread overview]
Message-ID: <201012291132.12996.vapier@gentoo.org> (raw)
In-Reply-To: <AANLkTi=GnrruHu=2SnXsuc+xHRhLDy1=54YntB9w+325@mail.gmail.com>
[-- Attachment #1.1: Type: Text/Plain, Size: 1166 bytes --]
On Wednesday, December 29, 2010 04:35:25 Vivi wrote:
> --- testcases/kernel/syscalls/write/write04.c
> +++ testcases/kernel/syscalls/write/write04.c
> @@ -71,6 +71,10 @@
> static sigjmp_buf jmp;
> int rfd, wfd;
>
> +#ifdef UCLINUX
> +char *wbuf;
> +#endif
should be static
> @@ -79,7 +83,9 @@
> struct stat buf;
> int fail;
> int cnt;
> +#ifndef UCLINUX
> char wbuf[17 * PIPE_SIZE_TEST];
> +#endif
> struct sigaction sigptr; /* set up signal handler */
>
> /* parse standard options */
> @@ -221,6 +227,17 @@
> */
> void setup(void)
> {
> +#ifdef UCLINUX
> + /* Allocate wbuf in heap not in the local function stack */
> + int pagesize = getpagesize();
> +
> + wbuf = (char *) malloc(17 * pagesize);
> + if (!wbuf) {
> + tst_resm(TBROK, "malloc failed");
> + cleanup();
> + }
> +#endif
there is no need to make this depend on UCLINUX. have it execute this code
for everyone. also, the original code is 17*PIPE_SIZE_TEST but yours is
17*getpagiesize(). please stick to the original define.
-mike
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 371 bytes --]
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2010-12-29 16:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-29 9:35 [LTP] [Bug Fix] write04 will crash on uClinux platform Vivi
2010-12-29 16:32 ` Mike Frysinger [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=201012291132.12996.vapier@gentoo.org \
--to=vapier@gentoo.org \
--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