On 05/06/2013 07:24 AM, [email protected] wrote:
> 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?

No problem. I aimed for a minimal patch that simply fixed the immediate
problem without chasing additional cleanups , but this particular
function is sloppy enough to warrant simplifying a bit. I'll be sending
an updated patch.

Thanks,
Dave

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to