[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/3] getcwd: enhance tests
From: |
Jim Meyering |
Subject: |
Re: [PATCH 3/3] getcwd: enhance tests |
Date: |
Tue, 26 Apr 2011 08:29:34 +0200 |
Eric Blake wrote:
> * tests/test-getcwd-lgpl.c: New file, taken from...
> * tests/test-getcwd.c: ...old contents. Rewrite this file to
> repeat m4 long path stress tests.
> * modules/getcwd-lgpl-tests: New module.
> * modules/getcwd-tests (Depends-on): Depend on lgpl tests.
Please mark (preferably in both places) the copied code,
so we have a better chance of keeping all of the copies in sync.
Better still (but harder: you'll need to know the name of the .m4
directory in the test directory's Makefile) would be to automatically
extract code from the m4 file to be used in the C test programs.
Why? For starters, in reviewing this, I spotted
a typo in a comment I wrote:
> + this relative expensive and invasive test if that's not true. */
That should be "relatively".
With your proposed changes, that typo would have then appeared
in two separate places: getcwd.m4 and this new test.
> diff --git a/tests/test-getcwd.c b/tests/test-getcwd.c
...
> + /* The bug is triggered when PATH_MAX < getpagesize (), so skip
> + this relative expensive and invasive test if that's not true. */
> + if (getpagesize () <= PATH_MAX)
> + return 0;
- Re: [PATCH 1/3] getcwd: consolidate m4 files, (continued)
- [PATCH 3/3] getcwd: enhance tests, Eric Blake, 2011/04/25
- Re: [PATCH 3/3] getcwd: enhance tests,
Jim Meyering <=