From: Nikita Shubin Date: Sun, 28 Jul 2019 11:22:15 +0000 (+0300) Subject: tests: add simple check for gpio-mockup name X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=180967c9bc8658afe09b4844082db650a35f32fc;p=ts7250-boot-build.git tests: add simple check for gpio-mockup name --- diff --git a/tests/bisect.expect b/tests/bisect.expect new file mode 100755 index 0000000..d9d0c12 --- /dev/null +++ b/tests/bisect.expect @@ -0,0 +1,31 @@ +#!/usr/bin/expect -f + +spawn qemu-system-x86_64 -cpu host -kernel build-linux/arch/x86/boot/bzImage -initrd initramfs.cpio.xz -nographic -append "nokaslr console=ttyS0 root=/dev/ram" -enable-kvm + +expect "bisect #" + +send "uname -a\r" +expect "Linux" + +expect "bisect #" + +send "/sbin/modprobe gpio-mockup gpio_mockup_ranges=32,64 gpio_mockup_named_lines=1\r" + +set timeout 1 +set ret 0 + +send "ls /sys/kernel/debug/\r" + +expect { + "gpio-mockup-event" {} + timeout { puts "gpio-mockup-event not found"; exit 1 } +} + +send "ls /sys/kernel/debug/gpio-mockup-event/\r" + +expect { + "gpio-mockup-A" { puts "gpio-mockup-A found" } + timeout { puts "gpio-mockup-A not found"; exit 1 } +} + +exit 0