public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: chrubis@suse.cz
To: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] Fix retval parameter to pthread_join()
Date: Mon, 6 May 2013 14:24:21 +0200	[thread overview]
Message-ID: <20130506122421.GD4388@rei> (raw)
In-Reply-To: <5183B105.8030106@oracle.com>

Hi!
> diff --git a/testcases/kernel/mem/mtest05/mmstress.c b/testcases/kernel/mem/mtest05/mmstress.c
> index f845290..52dae70 100644
> --- a/testcases/kernel/mem/mtest05/mmstress.c
> +++ b/testcases/kernel/mem/mtest05/mmstress.c
> @@ -361,7 +361,7 @@ RETINFO_t *map_and_thread(char *tmpfile,	/* name of temporary file to be created
>  	int fd = 0;		/* file descriptor of the file created       */
>  	int thrd_ndx = 0;	/* index to the number of threads created    */
>  	int map_type = 0;	/* specifies the type of the mapped object   */
> -	int *th_status = 0;	/* status of the thread when it is finished  */
> +	int **th_status;	/* status of the thread when it is finished  */
>  	long th_args[5];	/* argument list passed to  thread_fault()   */
>  	char *empty_buf = NULL;	/* empty buffer used to fill temp file       */
>  	long pagesize		/* contains page size at runtime             */
> @@ -489,7 +489,7 @@ RETINFO_t *map_and_thread(char *tmpfile,	/* name of temporary file to be created
>  			retinfo->status = FAILED;
>  			return retinfo;
>  		} else {
> -			if ((int)*th_status == 1) {
> +			if ((long)*th_status == 1) {
>  				tst_resm(TINFO,
>  					 "thread [%ld] - process exited with errors",
>  					 (long)pthread_ids[thrd_ndx]);

This is far to complicated as it is. What about removing the malloc and
using void * variable and cast to long as it is in the rest of the
testcases?

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2013-05-06 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-03 12:43 [LTP] [PATCH] Fix retval parameter to pthread_join() Dave Kleikamp
2013-05-06 12:24 ` chrubis [this message]
     [not found]   ` <5187DCBC.6090103@oracle.com>
     [not found]     ` <5187DEA2.8020004@oracle.com>
2013-05-07 12:36       ` [LTP] [PATCH v2] " 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=20130506122421.GD4388@rei \
    --to=chrubis@suse.cz \
    --cc=dave.kleikamp@oracle.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