All of lore.kernel.org
 help / color / mirror / Atom feed
From: liubo <liubo2009@cn.fujitsu.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH] mem/hugeshmget: fix failure of hugeshmget01
Date: Tue, 17 Nov 2009 10:54:51 +0800	[thread overview]
Message-ID: <4B02107B.10604@cn.fujitsu.com> (raw)

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

             reply	other threads:[~2009-11-17  2:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17  2:54 liubo [this message]
2009-11-19 17:06 ` [LTP] [PATCH] mem/hugeshmget: fix failure of hugeshmget01 Subrata Modak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B02107B.10604@cn.fujitsu.com \
    --to=liubo2009@cn.fujitsu.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.