qemu-check.exp: match core assert/panic strings on a single line

The regular expression used to detect TEE core panics or assertion
failures must not allow multi-line text to match, otherwise the following
input may trigger it (test case: xtest 1007 with "make COMPILER=clang").

E/TC:? 0 TA panicked with code 0xbeef
E/LD:  Status of TA 5b9e0e40-2636-11e1-ad9e-0002a5d5c51b
E/LD:   arch: arm
E/LD:  region  0: va 0x00102000 pa 0x0e300000 size 0x002000 flags rw-s (ldelf)
E/LD:  region  1: va 0x00104000 pa 0x0e302000 size 0x00e000 flags r-xs (ldelf)
E/LD:  region  2: va 0x00112000 pa 0x0e310000 size 0x001000 flags rw-s (ldelf)
E/LD:  region  3: va 0x00113000 pa 0x0e311000 size 0x004000 flags rw-s (ldelf)
E/LD:  region  4: va 0x00117000 pa 0x0e315000 size 0x001000 flags r--s
E/LD:  region  5: va 0x00118000 pa 0x0e410000 size 0x003000 flags rw-s (stack)
E/LD:  region  6: va 0x00184000 pa 0x00001000 size 0x015000 flags r-xs [0]
E/LD:  region  7: va 0x00199000 pa 0x00016000 size 0x0e5000 flags rw-s [0]
E/LD:  assertion 'maps[map_idx].sz == sz' failed at ldelf/ta_elf.c:1451 in ta_elf_print_mappings()

In addition to using '[^n]*' instead of '.*', a couple of things need
fixing too:

- In Expect, `^` and `$` are the beginning and end of the current matching
buffer, not the beginning and end of a line. Therefore `^` is not
appropriate here.
- `\n` should not be matched because if it is consumed for example at the
end of an expression to mean "end of line", then it cannot be available to
another expression to mean "beginning of line".

Fixes: 09900ef99b70 ("qemu-check.exp: trap only OP-TEE Core assert or panic")
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
1 file changed
tree: c20b8d03c181c021381745cb485ddffa046193da
  1. .github/
  2. br-ext/
  3. fvp/
  4. imx/
  5. kconfigs/
  6. qemu_v8/
  7. rpi3/
  8. ti/
  9. zynqmp/
  10. .gitignore
  11. am43xx.mk
  12. am57xx.mk
  13. common.mk
  14. dra7xx.mk
  15. fvp-psa-sp.mk
  16. fvp.mk
  17. get_clang.sh
  18. hikey.mk
  19. hikey960.mk
  20. imx.mk
  21. juno.mk
  22. poplar.mk
  23. qemu-check.exp
  24. qemu.mk
  25. qemu_v8.mk
  26. README.md
  27. rpi3.mk
  28. soc_term.py
  29. stm32mp1.mk
  30. synquacer.mk
  31. toolchain.mk
  32. trusted-keys.exp
  33. trusted-services.mk
  34. verdin.mk
  35. zynqmp.mk
README.md

OP-TEE build.git

This git contains makefiles etc to be able to build a full OP-TEE developer setup for the OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The pages that used to be here in this git can be found under build and Device specific information at he new location for the OP-TEE documentation.

// OP-TEE core maintainers