diff options
-rw-r--r-- | common/scripts/make-kernel-install.exp | 6 | ||||
-rw-r--r-- | ubuntu/install-uprobe-kernel-on-arndale.yaml | 55 | ||||
-rw-r--r-- | ubuntu/native-uprobes-systemtap-test.yaml | 75 |
3 files changed, 136 insertions, 0 deletions
diff --git a/common/scripts/make-kernel-install.exp b/common/scripts/make-kernel-install.exp new file mode 100644 index 0000000..5ccae08 --- /dev/null +++ b/common/scripts/make-kernel-install.exp @@ -0,0 +1,6 @@ +#!/usr/bin/expect +# make install is to install linux kernel on target device + +spawn make ARCH=arm install +expect "Press Ctrl-C to abort build, or Enter to continue" +send "\n" diff --git a/ubuntu/install-uprobe-kernel-on-arndale.yaml b/ubuntu/install-uprobe-kernel-on-arndale.yaml new file mode 100644 index 0000000..c126971 --- /dev/null +++ b/ubuntu/install-uprobe-kernel-on-arndale.yaml @@ -0,0 +1,55 @@ +metadata: + name: install-uprobe-kernel-on-arndale + format: "Lava-Test-Shell Test Definition 1.0" + description: "Build and install uprobes kernel on arndale. Pre-requirement of native-uprobes-systemtap-test.yaml" + maintainer: + - naresh.kamboju@linaro.org + os: + - ubuntu + scope: + - functional + devices: + - arndale + timeout: 14400 + +install: + deps: + - build-essential + - m4 + - dejagnu + - bzip2 + - wget + - gettext + - git + - bc + - expect + + steps: + - 'HOME_PWD=`pwd`' + - 'git clone --depth 1 git://git.linaro.org/kernel/linux-linaro-tracking.git /usr/src/linux-linaro-tracking' + - 'cd /usr/src/linux-linaro-tracking' + - 'git checkout -b linux-linaro-uprobes origin/linux-linaro' + - 'ARCH=arm scripts/kconfig/merge_config.sh linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/kvm-host.conf linaro/configs/xen.conf linaro/configs/uprobes.conf linaro/configs/arndale.conf' + - 'make -j4 ARCH=arm LOADADDR=0x40008000 uImage' + - 'make ARCH=arm modules' + - 'make ARCH=arm modules_install' + - 'cp $HOME_PWD/common/scripts/make-kernel-install.exp /usr/src/linux-linaro-tracking/' + - '/usr/bin/expect make-kernel-install.exp' + - 'make ARCH=arm headers_install' + - 'mount /dev/mmcblk1p5 /mnt/' + - 'cp arch/arm/boot/uImage /mnt/' + - 'umount /mnt/' +run: + steps: + - 'cat /proc/version' + - 'df -h' + - 'lava-test-case install-uprobe-kernel-on-arndale --result pass' + +# Linux kernel clone, build, install would take 3 hours on target. +# 10 GB test partition needed for install-uprobe-kernel and native-uprobes-systemtap-test.yaml +# uImage will be copied on to boot partition. +# Newly installed kernel image would be booted in next reboot by lava_test_shell +# uprobes_systemtap_test.yaml would be run after this test. +# Currently test intended to run on arndale target device. +# Example json file: +# http://people.linaro.org/~naresh.kamboju/uprobe-systemtap-test-on-lava.json diff --git a/ubuntu/native-uprobes-systemtap-test.yaml b/ubuntu/native-uprobes-systemtap-test.yaml new file mode 100644 index 0000000..bcaaa57 --- /dev/null +++ b/ubuntu/native-uprobes-systemtap-test.yaml @@ -0,0 +1,75 @@ +metadata: + name: native-uprobes-systemtap-test + format: "Lava-Test-Shell Test Definition 1.0" + description: "Run uprobes systemtap tests. Pre-requirement is install-uprobe-kernel-on-arndale.yaml" + maintainer: + - naresh.kamboju@linaro.org + os: + - ubuntu + scope: + - functional + devices: + - arndale + timeout: 90000 + +install: + deps: + - build-essential + - m4 + - dejagnu + - bzip2 + - wget + - gettext + - openssh-server + - expect + - xz-utils + + steps: + - 'cat /proc/version' + - 'ls -l /lib/modules/`uname -r`/build/' + - 'cd /usr/src/' + - 'wget --no-check-certificate https://fedorahosted.org/releases/e/l/elfutils/0.159/elfutils-0.159.tar.bz2' + - 'tar -xvf elfutils-0.159.tar.bz2' + - 'wget --no-check-certificate https://sourceware.org/systemtap/ftp/releases/systemtap-2.5.tar.gz' + - 'tar -xvf systemtap-2.5.tar.gz' + - 'cd systemtap-2.5' + - 'cp /usr/share/dejagnu/* . -a' + - 'echo "skip tests which are known to hang"' + - 'mv testsuite/systemtap.base/poll_map.exp testsuite/systemtap.base/poll_map.exp.back' + - 'mv testsuite/systemtap.base/pr14546.exp testsuite/systemtap.base/pr14546.exp.back' + - 'mv testsuite/systemtap.base/pr10854.exp testsuite/systemtap.base/pr10854.exp.back' + - 'mv testsuite/systemtap.base/implicitptr.exp testsuite/systemtap.base/implicitptr.exp.back' + - 'mv testsuite/systemtap.base/probefunc.exp testsuite/systemtap.base/probefunc.exp.back' + - 'mv testsuite/systemtap.base/sdt_global_var.exp testsuite/systemtap.base/sdt_global_var.exp.back' + - 'mv testsuite/systemtap.base/target_set_thread.exp testsuite/systemtap.base/target_set_thread.exp.back' + - 'mv testsuite/systemtap.unprivileged/unprivileged_myproc.exp testsuite/systemtap.unprivileged/unprivileged_myproc.exp.back' + - './configure --prefix=/usr/local/ --with-elfutils=../elfutils-0.159' + - 'make all' + - 'make install' +run: + steps: + - 'lava-test-case systemtap-make-install --result pass' + - 'cd /usr/src/systemtap-2.5' + - 'make installcheck' + - 'lava-test-case systemtap-make-installcheck --result pass' + - 'cat testsuite/systemtap.sum' + - 'lava-test-case-attach systemtap.sum testsuite/systemtap.sum text/plain' + - 'lava-test-case-attach systemtap.log testsuite/systemtap.log text/plain' + - 'lava-test-case attach-systemtap-results --result pass' +parse: + pattern: "(?P<result>PASS|FAIL|KFAIL|XFAIL|UNTESTED|UNSUPPORTED): (?P<test_case_id>[ ().0-9A-Za-z-_/]*)" + fixupdict: + PASS: pass + FAIL: fail + KFAIL: fail + XFAIL: pass + UNTESTED: skip + UNSUPPORTED: skip + +# install-uprobe-kernel-on-arndale.yaml to be run before test +# 10 GB test partition needed for install-uprobe-kernel and native-uprobes-systemtap-test +# This is a long running test, expected to run for 25 hours. +# Systemtap build, install and installcheck is the purpose of this test. +# make installcheck runs systemtap testsuite. +# Example json file: +# http://people.linaro.org/~naresh.kamboju/uprobe-systemtap-test-on-lava.json |