Re: Run binary from test suite
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-unsubscr...@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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Run binary from test suite
Den 2017-07-11 kl. 18:51, skrev Alan Somers: Are you using pfctl at build time or does your ATF test script need it? I'm assuming the latter. In that case, it's fine to call it directly. Your PATH will be correctly configured. Don't use /usr/obj, because that may no longer exist by the time somebody is running the ATF test. -Alan I see, thanks a lot for the input! I will change my tests to call pfctl from PATH. Best regards, Panagiotes On Tue, Jul 11, 2017 at 11:13 AM, Panagiotes Mousikides wrote: 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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Run binary from test suite
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-unsubscr...@freebsd.org"
Run binary from test suite
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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Run binary from test suite
(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 ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: Run binary from test suite
Are you using pfctl at build time or does your ATF test script need it? I'm assuming the latter. In that case, it's fine to call it directly. Your PATH will be correctly configured. Don't use /usr/obj, because that may no longer exist by the time somebody is running the ATF test. -Alan On Tue, Jul 11, 2017 at 11:13 AM, Panagiotes Mousikides wrote: > 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 > > ___ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org" ___ freebsd-current@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"