Hi,

On 03/19/2014 02:00 AM, [email protected] wrote:
> Hi!
>> Cleanup of dma_thread_diotest7.c and remove test_dma_thread_diotest7.sh.
>>
>> If user wants to run these tests, a big block device should be specified
>> by running runltp with -z option, or export an environment variable named
>> LTP_BIG_DEV, which contains the big block device.
> The test was using a directory in /tmp/ instead. What was the problem
> with that?
This test is to create 100 files sized of 12MB, the total needed free space in
/tmp will be 1200MB at least, so I think it's not appropriate, some systems
may not have that much free space in tmp, so users may specify a big block 
device.
I have should write this information to commit log.

>> Split tests in runtest/test_dma_thread_diotest7 into separate testcases,
>> keep one entry per test in runtest/test_dma_thread_diotest7
> I wonder why is it called dma_thread_diotest7 if there is only
> dma_thread_diotest7 there. Maybe we can rename it to just
> dma_thread_diotest...

Yes, this file name is not proper and  I will change this in patch v2.
>> Signed-off-by: Xiaoguang Wang <[email protected]>
>> ---
>>  
>> +
>> +#define FILESIZE    (12*1024*1024)
>> +#define READSIZE    (1024*1024)
>> +
>> +#define MNT_POINT   "mntpoint"
>> +#define DIR_MODE    (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP| \
>> +                     S_IXGRP|S_IROTH|S_IXOTH)
>> +#define FILENAME    "mntpoint/_dma_thread_test_%.04d.tmp"
>> +#define FILECOUNT   50
> The previous filecount was 100, why it's 50 now?

I think 100 is too big. I have run this test many times, usually
one file is enough to check the data corruption. OK, I will keep the
value 100.
>
>> +    worker_t *worker = (worker_t *)arg;
>>      int offset = worker->offset;
>>      int fd = worker->fd;
>>      unsigned char *buffer = worker->buffer;
>> @@ -156,14 +170,13 @@ void *worker_thread(void *arg)
>>      if (lseek(fd, offset, SEEK_SET) < 0) {
>>              fprintf(stderr, "Failed to lseek to %d on fd %d: %s.\n",
>>                      offset, fd, strerror(errno));
>> -            exit(1);
>> +            return NULL;
> Hmm, that would silence the failure in case that the lseek() has failed.
> If you want fix this error propagation correctly you should return error
> code here and check it in the main loop.
>
> You can use intptr_t as retval with pthread_join and return (void*)1
> here.

OK, thanks.

Regards,
Xiaoguang Wang
>
>


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to