Skip to content

Build LTP with rk ltp and run it in rk test - #37

Merged
tamnd merged 1 commit into
mainfrom
ltp
Oct 1, 2026
Merged

tamnd merged 1 commit into
mainfrom
ltp

Conversation

@tamnd

@tamnd tamnd commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Adds the LTP half of the kselftest and LTP item.

  • ltp.toml pins LTP 20260529 by URL and sha256. rk ltp downloads it into the cache once, checks the hash, copies the tree into the output directory, configures it with the compiler asked for (without LTP's kernel modules, which would be built for the host's kernel), builds with make -k and installs with make -i under /ltp. It then strips the debug information from the programs, which takes each one from about 850 KB to 285 KB, since every one carries its own static copy of libltp.
  • rows.toml pins the runtest files per row: syscalls, syscalls-ipc, mm, fs, pty, sched, math, cve and containers. ltp.json lists the tests of each one and the tags whose program was not built.
  • rk test --kinds ltp --ltp DIR boots once per runtest file. The initramfs only gets the programs that file's commands name, the shell libraries and tst_ helpers, the tests' data and the shared libraries they need. Each tag is a unit, ltp:<runtest>:<tag>. --rucc-ltp is the rucc-built LTP for attribution, the same way --rucc-selftests works. rk mixed takes --ltp too.
  • rk-init runs each test with sh -c and a 10 minute limit in an empty directory, prints its output behind # only when it fails, and prints RK-LTP <runtest> <tag> pass|fail|skip <code>. Exit code 32 (TCONF) counts as a skip.
  • An LTP boot gets three more seconds per test on top of --timeout, because syscalls has 1506 tests and kunit has a handful. The guest gets more than 1G of memory once the initramfs is big (512M plus twice the archive), because the syscalls archive is around 400M.
  • The nightly builds LTP with gcc-14 and with rucc and adds ltp to the kinds.

On server3, with gcc 13 against the Debian 13 build, rk ltp built all nine files with nothing missing: 1506, 57, 74, 68, 16, 14, 10, 97 and 84 tests. I couldn't do the boot there because server3 has no qemu, so the first nightly is the first real run.

Part of #6

@tamnd tamnd added kind/feature New capability in the harness area/rk The rk command line area/boot QEMU rig, initramfs and rk-init row/x64 x86-64 labels Oct 1, 2026
@tamnd
tamnd merged commit 07d6eeb into main Oct 1, 2026
9 of 11 checks passed
@tamnd
tamnd deleted the ltp branch October 1, 2026 16:33
@tamnd tamnd mentioned this pull request Oct 1, 2026
8 of 17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/boot QEMU rig, initramfs and rk-init area/rk The rk command line kind/feature New capability in the harness row/x64 x86-64

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant