From owner-freebsd-current@freebsd.org Tue Jul 11 20:05:44 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81E6FDAB416; Tue, 11 Jul 2017 20:05:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3DAA46511E; Tue, 11 Jul 2017 20:05:44 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-qk0-x232.google.com with SMTP id p21so2444506qke.3; Tue, 11 Jul 2017 13:05:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ODgtcEI4h7Nqg3RhE7UzTxkmTdT5+lW+gS08gndSpWE=; b=TYt19qpyE5mT6EwpLaD2bBX07834uKrCEJbO1uVPOm6y3dc8hkbRUyA0d/wIhknkls uCg09+3XAa42PHcMhv2R1vDZ6zqDq0mM80ug6Fw5GA5ndLwYaoxYGXDGr/WvWF6ZiUVp wVnBWPOnPj/g1X8g+ovknsybR0569OS91EpGKzKBOL6L498rlldc4sB4bR22NZKX6kXp C3/YBEsS4sfOXVyC2bosj9DpNjqgNoClJYdbnU4grrEV2roQzpmQT1AEYS4aqPlWZoTO DK3UacCr7E11E+JQXI2iKZqJ4chdpTusuyb+xk3DhXMKVhqcigHvXy37SrJHashd3APY YY1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ODgtcEI4h7Nqg3RhE7UzTxkmTdT5+lW+gS08gndSpWE=; b=ss6AureIFn+SalXKQEIUc75C++N3X8s8sBKXIpMW+tvpv9n5JmsH4p6rgIsn3gSsd4 7ff5GSUy0NCM/gorkaxBsJxcbOttM750Vz9oTt3dGYiXm3pG/4zqDnvyxNDsnWCdIR9j /hELTexKjzSLYCzKLoIHDUnr1RsGUZLhwRIEvwXtMWdDnop1RBs6Kk658IiWgoDbe+n2 ncnnIDdLU7glyCipnUCoyWpmfmbRj8Bj4CPoUmI4NsKoyhDRkd7fya4db4qWGmzkoCuS ewM/PdniDsdVrFbt3V4XPf4zvZHXdJk+SDdN/NmAAptE/Xz9QCGvdH8BvHn6mqt3WPRm crrg== X-Gm-Message-State: AIVw1139c46ezN317aEKoizDv40bY9eOcL27y6o++NUAKUCNSSIJ/c/+ wdXe9d1M/wtvzBKEyE/JWiiKWw6TAQ== X-Received: by 10.55.21.223 with SMTP id 92mr2091978qkv.199.1499803543368; Tue, 11 Jul 2017 13:05:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.92.142 with HTTP; Tue, 11 Jul 2017 13:05:42 -0700 (PDT) In-Reply-To: <5a7ed4ea-de4c-4f6a-e528-9e3c70722d0c@yandex.com> References: <5a7ed4ea-de4c-4f6a-e528-9e3c70722d0c@yandex.com> From: Ngie Cooper Date: Tue, 11 Jul 2017 13:05:42 -0700 Message-ID: Subject: Re: Run binary from test suite To: Panagiotes Mousikides Cc: "freebsd-hackers@freebsd.org" , FreeBSD Current , Kristof Provost Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Jul 2017 20:05:44 -0000 On Tue, Jul 11, 2017 at 10:38 AM, Panagiotes Mousikides 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