linux-test-project / kirk

Kirk application aims to merge multiple Linux testing frameworks in one tool.
GNU General Public License v2.0
5 stars 5 forks source link

syscalls tests not found #19

Closed roxell closed 3 months ago

roxell commented 3 months ago

I have a debian rootfs with kirk installed inside into '/usr/local/bin/kirk', it's been installed with pip like 'python3 -m pip install --break-system-packages .' and the ltp binaries are installed into '/opt/ltp/'.

Trying to run kirk from the commandline like: 'kirk --framework ltp --run-suite syscalls --verbose' gives the output

2024-06-11T15:26:09 ===== [1;36mfanotify15[0m ===== 2024-06-11T15:26:09 command: fanotify15 2024-06-11T15:26:09 <12>[ 442.579181] /usr/local/bin/kirk[234]: starting test fanotify15 (fanotify15) 2024-06-11T15:26:09 /bin/sh: 1: fanotify15: not found 2024-06-11T15:26:09
2024-06-11T15:26:09 Summary:
2024-06-11T15:26:09 passed 0
2024-06-11T15:26:09 failed 1
2024-06-11T15:26:09 broken 0 2024-06-11T15:26:09 skipped 0 2024-06-11T15:26:09 warnings 0 2024-06-11T15:26:09
2024-06-11T15:26:09 Duration: 0.026s 2024-06-11T15:26:09
2024-06-11T15:26:09

I tried to export the LTPROOT and PATH without any success... export LTPROOT=/opt/ltp && export PATH="/opt/ltp/testcases/bin/:$PATH"

If I understand it correctly that shouldn't be needed either since that's the defaults.

Any idea what I'm doing wrong?

acerv commented 3 months ago

Indeed it's not needed. Can you please upload here the debug.log file located in /tmp/kirk.$USER ?

pevik commented 3 months ago

It might be a kirk bug, but yes, we need a debug log.

FYI installing LTP way it is in /opt/ltp/kirk (+ directory in /opt/ltp/libkirk):

$ cd tools/kirk/ && make install
mkdir -p /opt/ltp/libkirk
install -m 00644 ../../tools/kirk/libkirk/*.py /opt/ltp/libkirk
install -m 00775 ../../tools/kirk/kirk /opt/ltp/kirk
cd /opt/ltp && ln -sf kirk runltp-ng

Maybe a symlink ln -s /usr/local/bin/kirk /opt/ltp/kirk could workaround the problem.

roxell commented 3 months ago

Indeed it's not needed. Can you please upload here the debug.log file located in /tmp/kirk.$USER ?

This is the log file from a run where I installed kirk into /usr/local/bin. https://people.linaro.org/~anders.roxell/kirk-debug.log

roxell commented 3 months ago

It might be a kirk bug, but yes, we need a debug log.

FYI installing LTP way it is in /opt/ltp/kirk (+ directory in /opt/ltp/libkirk):

$ cd tools/kirk/ && make install
mkdir -p /opt/ltp/libkirk
install -m 00644 ../../tools/kirk/libkirk/*.py /opt/ltp/libkirk
install -m 00775 ../../tools/kirk/kirk /opt/ltp/kirk
cd /opt/ltp && ln -sf kirk runltp-ng

Aha ok. I haven't had time to try this yet.

It would make sense for kirk to be packaged and published to pypi, so the user just can do "pip install kirk". What's your thoughts on that?

Maybe a symlink ln -s /usr/local/bin/kirk /opt/ltp/kirk could workaround the problem.

I tried to create the symlink and then do "cd /opt/ltp && ./kirk ..." That wasn't a woraround

acerv commented 3 months ago

To install kirk inside /opt/ltp won't change anything. Also LTPROOT must be provided via --framework command. You can check:

$ ./kirk --framework help

--framework option supports the following syntax:

        <name>:<param1>=<value1>:<param2>=<value2>:..

Supported plugins: | kselftests | liburing | ltp | 

kselftests configuration:
        root: kselftests folder

liburing configuration:
        root: liburing test folder

ltp configuration:
        root: LTP install folder
        max_runtime: filter out all tests above this time value

So to provide the right ltp folder, you should run kirk --framework ltp:root=<my ltp install folder>.

By the way, looking at the log, it looks like there are no test binaries in your /opt/ltp/testcases/bin folder.

pevik commented 3 months ago

By the way, looking at the log, it looks like there are no test binaries in your /opt/ltp/testcases/bin folder.

Indeed, I also suspect that the problem is not with kirk, but with the fact that LTP is not in expected folder (code 127 means "command not found": return data={'command': 'abort01', 'stdout': '/bin/sh: 1: abort01: not found\n', 'returncode': 127, ...).

roxell commented 3 months ago

I checked and rechecked and it was on my end, pulled in the wrong binaries. Thank you for your help.