Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jul 2017 13:05:42 -0700
From:      Ngie Cooper <yaneurabeya@gmail.com>
To:        Panagiotes Mousikides <paggas1@yandex.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>,  FreeBSD Current <freebsd-current@freebsd.org>, Kristof Provost <kp@freebsd.org>
Subject:   Re: Run binary from test suite
Message-ID:  <CAGHfRMDDJG9n3dyhcrj--sVd3wip46=Ozdx_j90Pdx7HmycU6A@mail.gmail.com>
In-Reply-To: <5a7ed4ea-de4c-4f6a-e528-9e3c70722d0c@yandex.com>
References:  <5a7ed4ea-de4c-4f6a-e528-9e3c70722d0c@yandex.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 11, 2017 at 10:38 AM, Panagiotes Mousikides
<paggas1@yandex.com> wrote:
> (Resending due to moderation.)
>
> Hello!
>
> I'm a Google Summer of Code student, writing some tests for the FreeBSD test
> suite, and putting them under src/tests.  I need to run some binaries,
> specifically pfctl.
>
> How should I call pfctl from my test scripts?  Should I call it directly and
> let the shell find the binary in the path?  Or should I find where the build
> version got created (somewhere under /usr/obj) and call that? How do I find
> where the binary ended up getting created in that case?
>
> Best regards,
> Panagiotes

Hello Panagiotes,
    Please call pfctl from $PATH -- don't hardcode the path, ever.
I'll be looking at making "make check" more developer friendly in the
next 3-6 months, so running "make check" from usr.sbin/pf/... will
automatically add a set path/environment which hooks in to *.test.mk.
The goal of this is to simplify developer use for "make check".
    Also, if the tests (for whatever reason) aren't going to be
installed alongside pfctl, e.g., tests/sys/pf/... please add 'atf_set
"require.progs" "pfctl"' to the header to ensure that the test is
skipped if/when pfctl isn't installed on the system.
Cheers,
-Ngie



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGHfRMDDJG9n3dyhcrj--sVd3wip46=Ozdx_j90Pdx7HmycU6A>