From owner-freebsd-hackers@freebsd.org Wed Jul 12 17:01:49 2017 Return-Path: Delivered-To: freebsd-hackers@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 8E96CD9D7F8; Wed, 12 Jul 2017 17:01:49 +0000 (UTC) (envelope-from paggas1@yandex.com) Received: from forward12p.cmail.yandex.net (forward12p.cmail.yandex.net [IPv6:2a02:6b8:0:1465::ba]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48FFB6E7EE; Wed, 12 Jul 2017 17:01:48 +0000 (UTC) (envelope-from paggas1@yandex.com) Received: from smtp1m.mail.yandex.net (smtp1m.mail.yandex.net [77.88.61.132]) by forward12p.cmail.yandex.net (Yandex) with ESMTP id E086122E3E; Wed, 12 Jul 2017 20:01:45 +0300 (MSK) Received: from smtp1m.mail.yandex.net (localhost.localdomain [127.0.0.1]) by smtp1m.mail.yandex.net (Yandex) with ESMTP id 2551663C0E22; Wed, 12 Jul 2017 20:01:43 +0300 (MSK) Received: by smtp1m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id nPLxJsHdzM-1JTiVlKc; Wed, 12 Jul 2017 20:01:19 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1499878879; bh=6yePZuLwbuPkurQCMzubbLBYDcZzXKWlStZxag1sqNs=; h=Subject:To:Cc:References:From:Message-ID:Date:In-Reply-To; b=p82s7jlcUUUd3TwPu0jSdd/kvxhOr2rZKRxsls3GhDib2z7mmwddSFqkWIK19aFwN mWtZ6LS1tHQ0WH1df0jh9W4e/VBh8S5yE3h4DBGJ/baGwN9g0yQrlRAqSixMH0/rRb RM8x9jVDJfVCxHxjLWClUy6we2hMImuRkuq11Bhk= Authentication-Results: smtp1m.mail.yandex.net; dkim=pass header.i=@yandex.com X-Yandex-Suid-Status: 1 1022867361,1 0,1 0,1 0,1 0 Subject: Re: Run binary from test suite To: Ngie Cooper Cc: "freebsd-hackers@freebsd.org" , FreeBSD Current , Kristof Provost References: <5a7ed4ea-de4c-4f6a-e528-9e3c70722d0c@yandex.com> From: Panagiotes Mousikides Message-ID: <536264c1-9caa-48dd-7fb2-dfede17f5e3c@yandex.com> Date: Wed, 12 Jul 2017 17:01:19 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jul 2017 17:01:49 -0000 Den 2017-07-11 kl. 20:05, skrev Ngie Cooper: > 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 > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" Hi Ngie! Thanks a lot for your reply! I will change the tests to call pfctl from PATH. The tests in question are for the pfctl binary, so I'm going to move them from src/tests/sbin/pfctl to src/sbin/pfctl/tests. Also, how should I utilize 'make check'? What I currently do is 'make' and 'make install' from src/sbin/pfctl/tests, and then 'kyua test' from either the same directory or from /usr/tests/sbin/pfctl. Best regards, Panagiotes