Open mcm187 opened 2 years ago
Thanks for your report, but I guess this has very little priority for us, because we're working on a python rewrite (https://github.com/acerv/runltp-ng) which will replace previous attempt in perl (https://github.com/metan-ucw/runltp-ng). It eventually replaces runltp
. But you're welcome to try to fix it yourself and send a patch to our mailing list.
Thank you for your honest input on this issue. Since the problem has an impact on multiple tests and is reproducible with other commands than "ffmpeg" and can you please try this scenario on the new ng framework that you are working for?
Below you can find other similar issues related to the framework handle failure:
1. the "~" sign isn't recognize inside of the script as an existent folder. The workaround Solution is to replace it with absolute path: /home/root/ (since root is the user that will run the test)
2. The last "&" sign it is not recognized inside of the script.
modetest -M imx-drm -s 90@38:1920x1080-60.00@AR24 >& tmplog.txt &
3. Others taken directly from the ltp log:
TGE-0-vtest_check_existence type vtest
pan(1355): execvp of 'type' (tag TGE-0-vtest_check_existence) failed. errno:2 No such file or directory
TGE-0-ecdsa-lib-imx_checkbin type ecdsa_tester
pan(1355): execvp of 'type' (tag TGE-0-ecdsa-lib-imx_checkbin) failed. errno:2 No such file or directory
TGE-0-hsm_check_seco-lib ls /dev/seco_mu*
ls: cannot access '/dev/seco_mu': No such file or directory*
TGE-0-hsm_check_existence type hsm_test
pan(1355): execvp of 'type' (tag TGE-0-hsm_check_existence) failed. errno:2 No such file or directory
When the commands are executed directly on the device without runltp, commands are executed with success.
@acerv FYI
Hi @mcm187 , thank you for your feedback!
Referring to your last comment:
&
control operator, but rather create a test script using them. Please check https://github.com/linux-test-project/ltp/wiki/Shell-Test-API$HOME
or ~
inside testing scripts is not a good idea, because we want to have a reproducible environment where testing suites are executed in any machine. We usually use $LTPROOT
and $TMPDIR
variables to handle temporary files and binaries/modules/etctype
is a bash built-in command and it won't work with execvp
, unless it's used inside a bash testing scriptTo sum up things, I would suggest to create a test using LTP Shell test API and link that test to a runtest file.
Hi @acerv
Thank you for the detailed explanation of the test template design, we'll try to take into account all these rules in our test environment from now on. Regarding the proposed actions will try to run the tests according to your input and let you know if this solution elucidates our problem. I'll get back to you with an update on this topic soon.
@mcm187 I'm glad that you find it useful. Just to point out one thing: I was in error when I said that ltp-pan
doesn't execute shell built-in commands. It does, since it's converting any command having spaces into a command for the shell that has to be executed with sh -c
. Beside this, all of the other statements are correct and we suggest using shell scripting in any case. Thanks!
While testing SOF firmware I noticed that when trying to calculate audio file duration using "ffmpeg" command LTP flow gets stuck until the test reaches test timeout [ABT]. Running the "ffmpeg" command directly on the system, without LTP flow, works as expected.
Steps:
ffmpeg -i audio24k32M.wav -f null - 2>&1 | grep -Poa "time=(\d{2}.){3}\d{2}" | tail -1 | cut -d "=" -f 2
Output:00:00:04.94
./runltp -p -l ffmpeg.log -f ltp_command_file -t 5m
Output: Unable to be handled by LTP flow/Stuck at "ffmpeg" execution:contacts="" analysis=exit <<>>
[ 2391.204936] audit: type=1006 audit(1647174601.956:6): pid=1889 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=3 r1 [ 2391.217395] audit: type=1300 audit(1647174601.956:6): arch=c00000b7 syscall=64 success=yes exit=1 a0=3 a1=ffffd0dade00 a2=1 a3=ffffbc) [ 2391.243215] audit: type=1327 audit(1647174601.956:6): proctitle=2F7573722F7362696E2F63726F6E64002D6E PAN stop Alarm was received