On 02/02/2023 15:04, Beata Michalska wrote:
On Wed, Feb 01, 2023 at 05:35:32PM +0000, Teo Couprie Diaz wrote:
test_ioctl calls functions from the shell test framework but does not source it. For unexplained reasons this works on a regular LTP build, but not ours. Source the framework to be able to successfully complete.
It's not entirely unexpected a we deliberately select which targets are being build (and we have made explicit changes to the build.sh script to enable just that, see: 35cda2b9 "build.sh: Allow specifying make targets". Regular LTP builds (regular as upstream CI builds, they do not have that change and they build all that has either been enabled through config step or is otherwise a default make target).
Yes I understand that. What I meant is that the test script is calling functions defined in `lib/test.sh`, but it does not source it at all, yet it works on Alpine which is unexpected.
Changing the build script to add `lib/test.sh` to the install does not fix the issue, which makes sense as the script is not sourced anyway ! I might be missing something, but all the other tests making use of those function source it in some way, so it doesn't really make sense for _this one_ not to source it as well. (Even though it doesn't respect the conventions of the framework either, it still makes use of the functions)
I'd rather fix the build script/framework instead, as there might be some other, yet to be discovered dependencies.
This is needed anyway in conjunction with this to fix it, I just need to figure out how to send the patch for that. Just this patch alone doesn't change anything as the file is not in our install target anyway.
And speaking on dependencies, it would be good if the tests that do really on that framework made it explicit and either pull it as make target or raise a warning that one is not made available.
It would probably be nice indeed, but from my understanding it's expected to be used for any shell-based tests anyway ? Interestingly, it's also used for checking if a command required by those tests is available or not and produce a warning.
On that note, if we are to update the build steps for Morello LTP variant, an update to projects README would eb very much appreciated :).
I will keep it in mind :)
BR B.
Thanks for the review, Téo
Signed-off-by: Teo Couprie Diaz teo.coupriediaz@arm.com
NB: This needs a change to the build script used for LTP fix the failure. Indeed, the build framework is in the testcases/lib target which we do not build by default, thus not making the framework available anyway. testcases/kernel/syscalls/ioctl/test_ioctl | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/testcases/kernel/syscalls/ioctl/test_ioctl b/testcases/kernel/syscalls/ioctl/test_ioctl index 923275433..cf960dd35 100755 --- a/testcases/kernel/syscalls/ioctl/test_ioctl +++ b/testcases/kernel/syscalls/ioctl/test_ioctl @@ -23,6 +23,8 @@ export TCID=ioctl01_02 export TST_TOTAL=2 export TST_COUNT=0 +. test.sh
- has_tty() { if command -v stty >/dev/null 2>&1; then
-- 2.25.1
linux-morello-ltp mailing list -- linux-morello-ltp@op-lists.linaro.org To unsubscribe send an email to linux-morello-ltp-leave@op-lists.linaro.org