From: Carmelo A. <car...@st...> - 2007-05-14 13:44:58
|
Nadia Derbey wrote: > Found some bugs in testcases/kernel/mem/mtest07/shm_test.c: > > 1) in main(): > chld_args is declared as > long chld_args[3]; > instead of [4] > --> chld_args[3] is used to pass the reader / writer status to the > created thread. > > 2) in shmat_rd_wr(): > shmat() is called as follows: > shmat(shmkey, (void *)locargs[2], SHM_RND|SHMLBA) > > while locargs[2] contains the shm segment size (which may be set to > big values since it is a random size). > > This should be changed to > shmat(shmkey, (void *)NULL, 0) > > Attached a patch including other minor chnages, if interested. > > Regards, > Nadia > Hi Nadia, All, I fully agree with your changes. The attached patch includes Nadia'a one plus some other bug fixes: - pthread_exit / pthread_join handling of exit status (a very common error into LTP) - the threads pair (reader/writer) are using the same thread_id - name conventions changes: I prefer use shm_id as shared memory identifier instead of shmkey (just to be clearer) Regards, Carmelo |