debian/tests/build-hello
raw| 1 | #!/bin/sh |
| 2 | |
| 3 | arch="$(uname -r | egrep -o '[a-z0-9]+$')" |
| 4 | apt-get -y install linux-headers-${arch} linux-image-${arch}-dbg 2>&1 |
| 5 | |
| 6 | target_kernel="$(dpkg -l linux-headers-\* | awk '/^ii/ { print $2 ; exit }' | sed s/linux-headers-//)" |
| 7 | |
| 8 | # FIXME: https://bugs.debian.org/1040545 |
| 9 | stap -p 4 -r "$target_kernel" -e 'probe oneshot { println("hello world") }' -m hello 2>&1 |
| 10 | |
| 11 | # Ensure hello.ko was produced |
| 12 | test -f hello.ko |