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.
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
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). I'd rather fix the build script/framework instead, as there might be some other, yet to be discovered dependencies. 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. 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 :).
--- BR B.
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
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
On Thu, Feb 02, 2023 at 04:35:05PM +0000, Teo Couprie Diaz wrote:
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.
Minor: I'd avoid referencing to 'ours' here. It seems like it will be enough to say that the test is not following LTP guidelines for shell-based tests and proves to be problematic on *certain* setups.
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.
It seems that it's passing not only on Alpine: https://lava.ciplatform.org/scheduler/job/838599
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)
Right, so according to the documentation, indeed, shell-based tests (not all) should be sourcing test.sh. Still, somehow this one is not reporting failures on the kernel CI and I haven't seen it being sourced explicitly which bugs me a bit.
Could you elaborate a bit on "it doesn't respect the conventions of the framework" ?
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.
Well, they way to do that would be updating the README file, as mentioned earlier. I can take care of CI once we have things in place.
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 ?
According to docs, yes, although not all shell-based tests do require it (some seem to be implementing the 'new_lib' approach and thus are using different core script).
So overall I will be happy with this patch + changes to the README file adding 'testcases/lib' as make target. It would be great to chase down why it's not a problem for upstream testing, but that is not required to proceed with this patch.
--- BR B
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
linux-morello-ltp@op-lists.linaro.org