All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tarun Sahu <tsahu@linux.ibm.com>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: sbhat@linux.ibm.com, aneesh.kumar@linux.ibm.com,
	geetika@linux.ibm.com, vaibhav@linux.ibm.com, ltp@lists.linux.it,
	mike.kravetz@oracle.com
Subject: Re: [LTP] [PATCH v2 1/5] Hugetlb: Migrating libhugetlbfs counters
Date: Mon, 14 Nov 2022 00:33:32 +0530	[thread overview]
Message-ID: <20221113190332.gyv5t3jvpqps4ug5@tarunpc> (raw)
In-Reply-To: <20221113184438.tmcepansvefom5bk@tarunpc>

On Nov 14 2022, Tarun Sahu wrote:
> > I guess that we can also put the map() (touch()) test_counters() unamp()
> > sequence to a do_test() fuction then call it from the for() loop in
> > run_test(). That would make the code a bit cleaner.
> > 
> Instead, I am thinking of a defining a macro like this, 
> 
> #define CHECK_(fun) ({			\
> 		if (fun) {					\
> 				break;				\
> 			}						\
> 		})
> 
> inside test_counters:
> 
> do {
> 	CHECK_(map(...));
> 	CHECK_(touch(...));
> 	CHECK_(unmap(...));
> } while(0)
> 
> inside for loop of run_test:
> 
> CHECK_(map(...));
> CHECK_(test_counters(...));
> CHECK_(unmap(...));
> 
Code will be as clean as the previous, if we can just add
CHECK_ in map, unmap, touch macro definition. like..

#define map(a,b,c,d) CHECK_(map_(a, b, c, d))
> > -- 
> > Cyril Hrubis
> > chrubis@suse.cz
> > 
> > -- 
> > Mailing list info: https://lists.linux.it/listinfo/ltp
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-11-13 19:04 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 19:52 [LTP] [PATCH v2 0/5][PART 2] Hugetlb:Migrating the libhugetlbfs tests Tarun Sahu
2022-11-08 19:52 ` [LTP] [PATCH v2 1/5] Hugetlb: Migrating libhugetlbfs counters Tarun Sahu
2022-11-09 13:12   ` Cyril Hrubis
2022-11-09 21:26     ` Tarun Sahu
2022-11-10  8:20       ` Cyril Hrubis
2022-11-13 18:44         ` Tarun Sahu
2022-11-13 19:03           ` Tarun Sahu [this message]
2022-11-14  9:49           ` Cyril Hrubis
2022-11-14 18:51             ` Tarun Sahu
2022-11-08 19:52 ` [LTP] [PATCH v2 2/5] Hugetlb: Migrating libhugetlbfs directio Tarun Sahu
2022-11-09 13:25   ` Cyril Hrubis
2022-11-09 18:09     ` Tarun Sahu
2022-11-08 19:52 ` [LTP] [PATCH v2 3/5] Hugetlb: Migrating libhugetlbfs fadvise_reserve Tarun Sahu
2022-11-09 16:18   ` Cyril Hrubis
2022-11-09 18:40     ` Tarun Sahu
2022-11-10  7:34       ` Cyril Hrubis
2022-11-08 19:52 ` [LTP] [PATCH v2 4/5] Hugetlb: Migrating libhugetlbfs fallocate_align Tarun Sahu
2022-11-08 19:52 ` [LTP] [PATCH v2 5/5] Hugetlb: Migrating libhugetlbfs fallocate_basic Tarun Sahu

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=20221113190332.gyv5t3jvpqps4ug5@tarunpc \
    --to=tsahu@linux.ibm.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=chrubis@suse.cz \
    --cc=geetika@linux.ibm.com \
    --cc=ltp@lists.linux.it \
    --cc=mike.kravetz@oracle.com \
    --cc=sbhat@linux.ibm.com \
    --cc=vaibhav@linux.ibm.com \
    /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.