[PATCH v2] convert /bin/sh tests over to ATF

Garrett Cooper yaneurabeya at gmail.com
Mon Mar 3 18:40:25 UTC 2014

On Sun, Mar 2, 2014 at 1:14 PM, Julio Merino <jmmv at freebsd.org> wrote:
> On Mon, Jan 27, 2014 at 5:02 AM, Garrett Cooper <yaneurabeya at gmail.com> wrote:
>> Hi all,
>>         Here's the next patch for converting bin/sh/tests over to ATF. I've tried to incorporate all input from folks about simplifying the integration scripts and removing valid_osreldate functionality.
> Apologies for the really long delay... I suppose nothing has changed
> given that there were no replies to this. Soooo, some more comments:
> * Could functional_test be created with ATF_TESTS_SH ?


> * Rename the script in subversion to functional_test.sh (including the
> extension).

It's just in my git fork; I'll rename it (good catch).

> * Do NOT cd out of the current work directory in functional_test,
> anywhere.  This breaks all the assumptions in tests regarding the
> ability to write to the current work directory without caring about
> cleaning up.
> * Use atf_get_srcdir to locate where the data files are, not dirname $0.


> * Continue to use SUBDIR, not ATF_TESTS_SUBDIRS. The latter does not exist.


> * Reintroduce $FreeBSD$ to functional_test.sh.


> * The empty Makefiles in all the subdirectories are quite confusing.
> At the very least, explicitly define TESTSDIR as is customary
> everywhere else.

I guess I could. It just seems redundant, but there aren't a ton of Makefiles.

> * I'm still afraid of all this "auto-discovery" of test cases based on
> files, because it is quite confusing...  but at least it's now a bit
> more self-contained and easier to strip out later.  So we could keep
> it.

Well, it would be better if this auto-discovery of testcases was a
generic driver that mimicked prove, but I understand your concern.
That being said, it seems like it would fit better in a different

> * The FILES must continue to be installed. Does this actually work
> when running your test programs after a "make install"?

Could you please clarify your concern here? I'm not sure I understood
what you meant.

> Cheers

Thank you :)!

More information about the freebsd-testing mailing list