On Fri, May 16, 2008 at 11:49:29AM -0700, Eric B Munson wrote:
> On Fri, 2008-05-16 at 12:47 +1000, David Gibson wrote:
> > On Thu, May 15, 2008 at 12:49:50PM -0700, Eric B Munson wrote:
> > > If a machine has a /proc/mounts file larger than 4kb and the hugetlb
> > > mount point is after the 4kb mark the library currently fails to
> > > find the hugetlb mount.  This patch ensures that the entire mounts
> > > file is searched for the hugetlb mount before giving up.
> > 
> > Nice.  Just using the 4k buffer was an ugly shortcut I made when I
> > first implemented this.  It would be good to have a testcase for this
> > though - it should be possible to adapt the interposition method we
> > use in empty_mounts.c to fake a large /proc/mounts to test the parsing
> > code.
> > 
> 
> I did some quick testing on my local machine by setting the buffer size
> to 256 bytes and making sure that the hugetlb mounts was beyond that
> mark and the library was able to locate the mount point.

Ad-hoc testing checks it works now, integrating it into the testsuite
prevents regressions in the future.  And it makes the testing now
easier too.  I really want to keep the libhugetlbfs testsuite up to
date, so we've got a hope of keeping the library robust in the face of
further development.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: Digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to