On Mon, 2008-10-06 at 15:28 +0100, Mel Gorman wrote: > On (03/10/08 18:37), Andy Whitcroft didst pronounce: > > Add a TEST_ROOT prefix to allow direct testing of sysfs/proc reading > > functionality. Default this to empty. > > > > Signed-off-by: Andy Whitcroft <[EMAIL PROTECTED]> > > While this seems sensible at first glance, is it really necessary to > make a core part of the library? It seems like something you would apply > only while developing a feature and then throw away.
I agree with Mel. While I think this is useful and I'd be likely to use it reasonably often, I am not comfortable with the precedent of maintaining debugging code in the tree. > > --- > > hugeutils.c | 10 +++++++--- > > 1 files changed, 7 insertions(+), 3 deletions(-) > > > > diff --git a/hugeutils.c b/hugeutils.c > > index a70f261..1ce6494 100644 > > --- a/hugeutils.c > > +++ b/hugeutils.c > > @@ -58,11 +58,15 @@ static int hpage_sizes_default_idx = -1; > > /* Internal functions */ > > /********************************************************************/ > > > > +#ifndef TEST_ROOT > > +#define TEST_ROOT > > +#endif > > + > > #define BUF_SZ 256 > > #define MEMINFO_SIZE 2048 > > -#define MEMINFO "/proc/meminfo" > > -#define PROC_HUGEPAGES_DIR "/proc/sys/vm/" > > -#define SYSFS_HUGEPAGES_DIR "/sys/kernel/mm/hugepages/" > > +#define MEMINFO TEST_ROOT "/proc/meminfo" > > +#define PROC_HUGEPAGES_DIR TEST_ROOT "/proc/sys/vm/" > > +#define SYSFS_HUGEPAGES_DIR TEST_ROOT "/sys/kernel/mm/hugepages/" > > > > /* > > * Convert a quantity in a given unit to the next smallest unit by > > -- > > 1.6.0.1.451.gc8d31 > > > -- Adam Litke - (agl at us.ibm.com) IBM Linux Technology Center ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel