All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] mem/hugeshmget: fix failure of hugeshmget01
@ 2009-11-17  2:54 liubo
  2009-11-19 17:06 ` Subrata Modak
  0 siblings, 1 reply; 2+ messages in thread
From: liubo @ 2009-11-17  2:54 UTC (permalink / raw)
  To: ltp-list

During hugeshmget01 testcase, we got the following:
hugeshmget01    1  TFAIL  :  seqment size is not correct
hugeshmget01    1  TFAIL  :  hugeshmget01 call failed - errno = 17 :
File exists
                ......

In shmget call,
"buf.shm_segsz" had been set to "huge_pages_shm_to_be_allocated", 
but the code still used old macro "HUGE_SHM_SIZE", and this 
leaded to error "seqment size is not correct".

So do the following change:
1) s/HUGE_SHM_SIZE/huge_pages_shm_to_be_allocated
2) Delete unused macro "HUGE_SHM_SIZE" defination

This patch fixed the failure.


Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
---
 .../kernel/mem/hugetlb/hugeshmget/hugeshmget01.c   |    2 +-
 testcases/kernel/mem/hugetlb/lib/ipcshm.h          |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
index 0486dc3..10f29d3 100644
--- a/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
+++ b/testcases/kernel/mem/hugetlb/hugeshmget/hugeshmget01.c
@@ -109,7 +109,7 @@ int main(int ac, char **av)
 					continue;
 				}
 				/* check the seqment size */
-				if (buf.shm_segsz != HUGE_SHM_SIZE) {
+				if (buf.shm_segsz != huge_pages_shm_to_be_allocated) {
 					tst_resm(TFAIL, "seqment size is not "
 						 "correct");
 					continue;
diff --git a/testcases/kernel/mem/hugetlb/lib/ipcshm.h b/testcases/kernel/mem/hugetlb/lib/ipcshm.h
index 5b92530..caac9af 100644
--- a/testcases/kernel/mem/hugetlb/lib/ipcshm.h
+++ b/testcases/kernel/mem/hugetlb/lib/ipcshm.h
@@ -42,7 +42,6 @@ void setup(void);
 #define SHM_HUGETLB   04000    /* segment is mapped via hugetlb */
 #endif
 
-#define HUGE_SHM_SIZE	(256UL*1024UL*1024UL)	/* a resonable size for a large page segment */
 
 #define MODE_MASK	0x01FF			/* to get the lower nine permission bits */
 						/* from shmid_ds.ipc_perm.mode		 */
-- 
1.6.2.2

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-19 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-17  2:54 [LTP] [PATCH] mem/hugeshmget: fix failure of hugeshmget01 liubo
2009-11-19 17:06 ` Subrata Modak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.