All of lore.kernel.org
 help / color / mirror / Atom feed
  • [parent not found: <1322044169-30851-3-git-send-email-gaowanlong@cn.fujitsu.com>]
  • * [LTP] [PATCH 7/5] hugemmap: change hard-coded page alloc size to a macro
           [not found] <1322044169-30851-1-git-send-email-gaowanlong@cn.fujitsu.com>
           [not found] ` <1322044169-30851-2-git-send-email-gaowanlong@cn.fujitsu.com>
           [not found] ` <1322044169-30851-3-git-send-email-gaowanlong@cn.fujitsu.com>
    @ 2011-12-28  6:40 ` Wanlong Gao
           [not found] ` <4EF308EF.9010604@cn.fujitsu.com>
      3 siblings, 0 replies; 8+ messages in thread
    From: Wanlong Gao @ 2011-12-28  6:40 UTC (permalink / raw)
      To: caspar; +Cc: ltp-list
    
    change the hard-coded alloc size to a macro, because hard-coded is
    not a good idea.
    
    Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
    ---
     testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c |    3 ++-
     testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c |    3 ++-
     testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c |    3 ++-
     testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c |    3 ++-
     4 files changed, 8 insertions(+), 4 deletions(-)
    
    diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c
    index 906f7e4..ca68fb5 100644
    --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c
    +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap01.c
    @@ -76,6 +76,7 @@
     #include "libmnt.h"
     
     #define BUFFER_SIZE  256
    +#define PAGE_ALLOC_SIZE	1024
     
     char TEMPFILE[MAXPATHLEN];
     
    @@ -183,7 +184,7 @@ setup(void)
     	tst_tmpdir();
     	mount_point = get_tst_tmpdir();
     	mount_hugetlbfs(mount_point);
    -	hugepage_alloc(1024);
    +	hugepage_alloc(PAGE_ALLOC_SIZE);
     	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d",
     		mount_point, getpid());
     }
    diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c
    index 3bbbc46..349e564 100644
    --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c
    +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap02.c
    @@ -67,6 +67,7 @@
     
     #define LOW_ADDR       (void *)(0x80000000)
     #define LOW_ADDR2      (void *)(0x90000000)
    +#define PAGE_ALLOC_SIZE	1024
     
     char TEMPFILE[MAXPATHLEN];
     
    @@ -197,7 +198,7 @@ setup(void)
     	mount_point = get_tst_tmpdir();
     
     	mount_hugetlbfs(mount_point);
    -	hugepage_alloc(1024);
    +	hugepage_alloc(PAGE_ALLOC_SIZE);
     
     	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d", mount_point, getpid());
     }
    diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
    index b17b19d..866ca57 100644
    --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
    +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap03.c
    @@ -57,6 +57,7 @@
     #include "libmnt.h"
     
     #define HIGH_ADDR      (void *)(0x1000000000000)
    +#define PAGE_ALLOC_SIZE	1024
     
     char TEMPFILE[MAXPATHLEN];
     
    @@ -143,7 +144,7 @@ setup(void)
     	mount_point = get_tst_tmpdir();
     
     	mount_hugetlbfs(mount_point);
    -	hugepage_alloc(1024);
    +	hugepage_alloc(PAGE_ALLOC_SIZE);
     
     	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d", mount_point, getpid());
     }
    diff --git a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
    index 9774e87..2eea936 100644
    --- a/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
    +++ b/testcases/kernel/mem/hugetlb/hugemmap/hugemmap04.c
    @@ -76,6 +76,7 @@
     #include "libmnt.h"
     
     #define BUFFER_SIZE  256
    +#define PAGE_ALLOC_SIZE	1024
     
     char TEMPFILE[MAXPATHLEN];
     
    @@ -192,7 +193,7 @@ setup()
     	mount_point = get_tst_tmpdir();
     
     	mount_hugetlbfs(mount_point);
    -	hugepage_alloc(1024);
    +	hugepage_alloc(PAGE_ALLOC_SIZE);
     
     	snprintf(TEMPFILE, sizeof(TEMPFILE), "%s/mmapfile%d", mount_point, getpid());
     }
    -- 
    1.7.8
    
    
    ------------------------------------------------------------------------------
    Write once. Port to many.
    Get the SDK and tools to simplify cross-platform app development. Create 
    new or port existing apps to sell to consumers worldwide. Explore the 
    Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
    http://p.sf.net/sfu/intel-appdev
    _______________________________________________
    Ltp-list mailing list
    Ltp-list@lists.sourceforge.net
    https://lists.sourceforge.net/lists/listinfo/ltp-list
    
    ^ permalink raw reply related	[flat|nested] 8+ messages in thread
  • [parent not found: <4EF308EF.9010604@cn.fujitsu.com>]

  • end of thread, other threads:[~2012-01-20 14:28 UTC | newest]
    
    Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <1322044169-30851-1-git-send-email-gaowanlong@cn.fujitsu.com>
         [not found] ` <1322044169-30851-2-git-send-email-gaowanlong@cn.fujitsu.com>
    2011-12-28  5:21   ` [LTP] [PATCH 1/5] A library used to mount hugetlbfs automatically Caspar Zhang
    2011-12-28  6:02     ` [LTP] [PATCH v2 " Wanlong Gao
    2011-12-28  6:55       ` Caspar Zhang
         [not found] ` <1322044169-30851-3-git-send-email-gaowanlong@cn.fujitsu.com>
    2011-12-28  5:22   ` [LTP] [PATCH 2/5] hugemmap01.c : automatically mount hugetlbfs Caspar Zhang
    2011-12-28  6:23     ` Wanlong Gao
    2011-12-28  6:43       ` Caspar Zhang
    2011-12-28  6:40 ` [LTP] [PATCH 7/5] hugemmap: change hard-coded page alloc size to a macro Wanlong Gao
         [not found] ` <4EF308EF.9010604@cn.fujitsu.com>
         [not found]   ` <4EF9169B.2000106@cn.fujitsu.com>
    2012-01-20 14:40     ` [LTP] [PATCH 0/5] Automatically mount hugetlbfs for hugemmap tests Cyril Hrubis
    

    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.