commit | 391168ec03980e1cc8fb6d3e3c4b424819cd90cf | [log] [tgz] |
---|---|---|
author | Jerome Forissier <jerome@forissier.org> | Mon Jun 15 09:52:25 2020 +0200 |
committer | Jérôme Forissier <jerome@forissier.org> | Mon Jun 15 17:34:16 2020 +0200 |
tree | 0be95317a8b908c63364c5a49110154ebf803b94 | |
parent | 5eac193c3b068b87c6148cb2bfe2b1b56e6fd29a [diff] |
regression 1023: workaround Clang optimization issue When using Clang on HiKey (tested with 9.0.1 and 10.0.0), xtest 1023 fails with: * regression_1023 Test ELF initialization (.init_array) regression_1000.c:1860: Expression "op.params[0].value.a == 21" (12 == 21) is false regression_1000.c:1871: Expression "op.params[0].value.a == 213" (123 == 213) is false regression_1023 FAILED The values indicate that the os_test_lib shared library is initialized after the main application, which is not what we expect. In fact, the reason for the failure is code elimination performed by Clang [1]. The validity of this optimization is still unclear, but in any case it does not concern the main things being tested, which is the invocation of initialization functions when they exist. Therefore this commit applies a workaround which effectively disables the problematic optimization. Note: the issue can be reproduced on QEMU with CFLAGS_ta_arm32=-Os and QEMUv8 with CFLAGS_ta_arm64="-Os -fno-common". [1] http://lists.llvm.org/pipermail/llvm-dev/2020-June/thread.html#142192 Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
This git contains source code for the test suite (xtest) used to test the OP-TEE project.
All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_test.
// OP-TEE core maintainers