From 748848e8a264530a0ed31fc62d11b19a42d11eec Mon Sep 17 00:00:00 2001 From: Eric Caruso Date: Tue, 23 Sep 2014 15:14:55 -0700 Subject: lightbar: test programs for seq type PROGRAM These programs test various bytecode interpreter functions. rainbow-shift, red-green-blink and green-pulse produce visual effects, whereas the other three programs test error cases. bad-jump makes sure the interpreter stops if the PC goes out of bounds. bad-opcode makes sure the interpreter stops if it does not understand the instructions it is decoding. infinite-jump makes sure that sticking a tight loop in the EC (i.e., one not perforated with any DELAYs, RAMP_ONCEs, or CYCLE*s) does not cause it to hang or crash. bad-decode-8 and -32 test that malformed instructions are detected while decoding the instruction's immediate data. BUG=None BRANCH=ToT TEST=In simulator/scp files to device and test Change-Id: I6c189997a13e7c6196daa28eb74d5506b5288f2b Signed-off-by: Eric Caruso Reviewed-on: https://chromium-review.googlesource.com/219565 Reviewed-by: Bill Richardson --- extra/lightbar/programs/bad-decode-32.bin | 1 + extra/lightbar/programs/bad-decode-8.bin | 1 + extra/lightbar/programs/bad-jump.bin | Bin 0 -> 2 bytes extra/lightbar/programs/bad-opcode.bin | 1 + extra/lightbar/programs/green-pulse.bin | Bin 0 -> 23 bytes extra/lightbar/programs/infinite-jump.bin | Bin 0 -> 2 bytes extra/lightbar/programs/rainbow-shift.bin | Bin 0 -> 52 bytes extra/lightbar/programs/red-green-blink.bin | Bin 0 -> 36 bytes 8 files changed, 3 insertions(+) create mode 100644 extra/lightbar/programs/bad-decode-32.bin create mode 100644 extra/lightbar/programs/bad-decode-8.bin create mode 100644 extra/lightbar/programs/bad-jump.bin create mode 100644 extra/lightbar/programs/bad-opcode.bin create mode 100644 extra/lightbar/programs/green-pulse.bin create mode 100644 extra/lightbar/programs/infinite-jump.bin create mode 100644 extra/lightbar/programs/rainbow-shift.bin create mode 100644 extra/lightbar/programs/red-green-blink.bin (limited to 'extra/lightbar/programs') diff --git a/extra/lightbar/programs/bad-decode-32.bin b/extra/lightbar/programs/bad-decode-32.bin new file mode 100644 index 0000000000..de2e71b327 --- /dev/null +++ b/extra/lightbar/programs/bad-decode-32.bin @@ -0,0 +1 @@ +UUU \ No newline at end of file diff --git a/extra/lightbar/programs/bad-decode-8.bin b/extra/lightbar/programs/bad-decode-8.bin new file mode 100644 index 0000000000..d8188da697 --- /dev/null +++ b/extra/lightbar/programs/bad-decode-8.bin @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/extra/lightbar/programs/bad-jump.bin b/extra/lightbar/programs/bad-jump.bin new file mode 100644 index 0000000000..d284cb97ce Binary files /dev/null and b/extra/lightbar/programs/bad-jump.bin differ diff --git a/extra/lightbar/programs/bad-opcode.bin b/extra/lightbar/programs/bad-opcode.bin new file mode 100644 index 0000000000..6b10f95843 --- /dev/null +++ b/extra/lightbar/programs/bad-opcode.bin @@ -0,0 +1 @@ +Ã \ No newline at end of file diff --git a/extra/lightbar/programs/green-pulse.bin b/extra/lightbar/programs/green-pulse.bin new file mode 100644 index 0000000000..9ea21f789a Binary files /dev/null and b/extra/lightbar/programs/green-pulse.bin differ diff --git a/extra/lightbar/programs/infinite-jump.bin b/extra/lightbar/programs/infinite-jump.bin new file mode 100644 index 0000000000..09f370e38f Binary files /dev/null and b/extra/lightbar/programs/infinite-jump.bin differ diff --git a/extra/lightbar/programs/rainbow-shift.bin b/extra/lightbar/programs/rainbow-shift.bin new file mode 100644 index 0000000000..44e1af4b7d Binary files /dev/null and b/extra/lightbar/programs/rainbow-shift.bin differ diff --git a/extra/lightbar/programs/red-green-blink.bin b/extra/lightbar/programs/red-green-blink.bin new file mode 100644 index 0000000000..305f3c53f9 Binary files /dev/null and b/extra/lightbar/programs/red-green-blink.bin differ -- cgit v1.2.1