From: Nathan S. <ns...@sg...> - 2003-04-17 14:34:52
|
On Thu, Apr 17, 2003 at 07:19:24AM -0700, ro...@us... wrote: > Update of /cvsroot/ltp/ltp/testcases/kernel/mem/shmt > In directory sc8-pr-cvs1:/tmp/cvs-serv29161 > > Modified Files: > shmt09.c > Log Message: > Applied IA64 specific patch from Jacky. > > > Index: shmt09.c > =================================================================== > RCS file: /cvsroot/ltp/ltp/testcases/kernel/mem/shmt/shmt09.c,v > retrieving revision 1.3 > retrieving revision 1.4 > diff -u -d -r1.3 -r1.4 > --- shmt09.c 4 Mar 2003 18:33:51 -0000 1.3 > +++ shmt09.c 17 Apr 2003 14:19:21 -0000 1.4 [ Hunks snipped ] > @@ -155,13 +164,23 @@ > > /*--------------------------------------------------------*/ > > - > + if ((strncmp(kmachine, "ia64", 4)) == 0) { > + increment=8388608; /* 8Mb */ > + while ((vp = sbrk(increment)) != (void *)-1); > + if (errno != ENOMEM) { > + tst_resm(TFAIL, > + "Error: sbrk failed, errno = %d\n", errno) ; > + rm_shm(shmid); > + tst_exit(); > + } > + } else { > if ((vp = sbrk(16000)) != (void *)-1) { > - tst_resm(TFAIL, > + tst_resm(TFAIL, > "Error: sbrk succeeded! ret = 0x%08x, curbrk = 0x%08x, ", > vp, sbrk(0)); > - rm_shm(shmid); > - tst_exit(); > + rm_shm(shmid); > + tst_exit(); > + } > } > > tst_resm(TPASS,"sbrk"); Can someone please explain what this fix is trying to do? It just seems that there should be a better way to do this test besides looking at the uname output. -- Nate Straz ns...@sg... sgi, inc http://www.sgi.com/ Linux Test Project http://ltp.sf.net/ |