diff mbox

[conntrack,4/4] tests: conntrack: use local conntrack binary

Message ID 1453718430-5784-4-git-send-email-ast@fiberby.dk
State Accepted
Delegated to: Pablo Neira
Headers show

Commit Message

Asbjørn Sloth Tønnesen Jan. 25, 2016, 10:40 a.m. UTC
The binary under test should be the one, this ensures
that it is in sync with the tests performed, and that
users who build from source, can test the binary prior
to `make install`.

Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.dk>
---

This is my preference, others might prefer it as it is.
Maybe it should be possible to overwrite with an
enviromental variable or an argument, currently test-conntrack.c
doesn't take any arguments, but run-tests.sh passes the
testdir as an argument.

 tests/conntrack/test-conntrack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pablo Neira Ayuso Feb. 1, 2016, 11 a.m. UTC | #1
On Mon, Jan 25, 2016 at 10:40:30AM +0000, Asbjørn Sloth Tønnesen wrote:
> The binary under test should be the one, this ensures
> that it is in sync with the tests performed, and that
> users who build from source, can test the binary prior
> to `make install`.
> 
> Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.dk>
> ---
> 
> This is my preference, others might prefer it as it is.
> Maybe it should be possible to overwrite with an
> enviromental variable or an argument, currently test-conntrack.c
> doesn't take any arguments, but run-tests.sh passes the
> testdir as an argument.

I agree it makes sense to test what you have in your tree without
having to install it.

Applied, thanks!
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/conntrack/test-conntrack.c b/tests/conntrack/test-conntrack.c
index e8d2eb3..f410c09 100644
--- a/tests/conntrack/test-conntrack.c
+++ b/tests/conntrack/test-conntrack.c
@@ -17,7 +17,7 @@ 
 #include <sys/wait.h>
 #include <dirent.h>
 
-#define CT_PROG "/usr/sbin/conntrack"
+#define CT_PROG "../../src/conntrack"
 
 int main()
 {