5
Shuah Khan Kselftest Short summary of work done so far for 3.17: fix compile errors and warnings in various tests fix run-time errors when tests aren't run as root enhance and improve cpu and memory hot-plug tests to run in limited scope mode by default. A new make target to select full-scope testing. Prior to this change, cpu and memory hot-plug tests hung trying to hot-plug all but cpu0 and a large portion of the memory. add a new kselftest target to run existing selftests to start with.

Kernel Selftest Project (Kernel Summit NA 2014)

Embed Size (px)

DESCRIPTION

Shuah Khan, Senior Kernel Engineer, Samsung Open Source Group, presents a new project she's helped to create to provide a 'self-test' framework for the Linux Kernel.

Citation preview

Page 1: Kernel Selftest Project (Kernel Summit NA 2014)

Shuah Khan

Kselftest

Short summary of work done so far for 3.17:● fix compile errors and warnings in various tests● fix run-time errors when tests aren't run as root● enhance and improve cpu and memory hot-plug tests to

run in limited scope mode by default. A new make target to select full-scope testing. Prior to this change, cpu and memory hot-plug tests hung trying to hot-plug all but cpu0 and a large portion of the memory.

● add a new kselftest target to run existing selftests to start with.

Page 2: Kernel Selftest Project (Kernel Summit NA 2014)

Shuah Khan

Kselftest

What's planned for 3.18 and beyond:● get feedback on the new kselftest target from the community● add more tests to be run under kselftest umbrella● identify existing tests under /lib and other areas that make a good

candidate to be included under kselftest● Some of these could be run as a tool and/or a independent test with a few

changes and some probably aren't like the /lib/locking tests.● As a goal, try to leverage existing tests and modify them as needed to run

them as a black-box test (e.g: look into ways to make it run as a tool)● Greg KH sparked the kernel selftest idea, has been in the loop for the

work done so far, and reviewed the plan for 3.18.

Page 3: Kernel Selftest Project (Kernel Summit NA 2014)

Shuah Khan

Kselftest discussion thread summary

Desired features and potential test contributions:

● Incorporate kselftest into tool that cross-build, and boot on QEMU - make it easier to sanity test as many architectures as possible Grant Likely

● Improve tests to log statistics etc. - working towards automating tests – Masami Hiramatsu

● Scripts to do build/boot/test cycle for cross-platform hardware – Tim Bird (might have overlaps with ktest)

● Basic size test - build/boot/size comparisons for each config option – Tim Bird

● Trigger cross-build from git pushes – Linus Walleij

Page 4: Kernel Selftest Project (Kernel Summit NA 2014)

Shuah Khan

Kselftest goals

● Grow kselftest to be a quick way for developers regression test.

● Keep tests updated as new features get added to the kernel

● Encourage test submissions

Page 5: Kernel Selftest Project (Kernel Summit NA 2014)

Shuah Khan

Test resources shared on the discussion thread

● File system test tool: Tes s'o https://git.kernel.org/cgit/fs/ext2/xfstests-bld.git/tree/kvm-xfstests/test-appliance/gen-image

● Boot test tool: Andy Lutomirski https://git.kernel.org/cgit/utils/kernel/virtme/virtme.git

● Rob Landley: http://landley.net/aboriginal/about.html● Kevin Hillman:

– git://git.linaro.org/people/khilman/build-scripts.git

– https://git.linaro.org/people/kevin.hilman/pyboot.git

● Aneesh Kumar– https://github.com/autotest/autotest-client-tests

– Sandbox setup for the above - https://github.com/autotest/virt-test