From 748848e8a264530a0ed31fc62d11b19a42d11eec Mon Sep 17 00:00:00 2001 From: Eric Caruso Date: Tue, 23 Sep 2014 15:14:55 -0700 Subject: [PATCH] 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 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 0000000000000000000000000000000000000000..d284cb97ced00e24f109da469bb4a91cc32e1427 GIT binary patch literal 2 JcmZQL1ONcU0K)(P literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..9ea21f789ae091de7ad462cef9b2eb677b7617bd GIT binary patch literal 23 ecmZQ}W?*1oc4zp{z{0>F*UHAo!0+V1zz+Z-VglX( literal 0 HcmV?d00001 diff --git a/extra/lightbar/programs/infinite-jump.bin b/extra/lightbar/programs/infinite-jump.bin new file mode 100644 index 0000000000000000000000000000000000000000..09f370e38f498a462e1ca0faa724559b6630c04f GIT binary patch literal 2 JcmZQz0000200961 literal 0 HcmV?d00001 diff --git a/extra/lightbar/programs/rainbow-shift.bin b/extra/lightbar/programs/rainbow-shift.bin new file mode 100644 index 0000000000000000000000000000000000000000..44e1af4b7d7edc71d27d87bc85dee26a1e2d88a1 GIT binary patch literal 52 zcmZQ}W?*1ocK`qXKQjjdGiN9>*D7WS2WH8s%u>IYH5!;TuQF>{F