Replace the existing Apache 2.0 boilerplate header with an SPDX tag
throughout the zephyr code tree. This patch was generated via a
script run over the master branch.
Also updated doc/porting/application.rst that had a dependency on
line numbers in a literal include.
Manually updated subsys/logging/sys_log.c that had a malformed
header in the original file. Also cleanup several cases that already
had a SPDX tag and we either got a duplicate or missed updating.
Jira: ZEP-1457
Change-Id: I6131a1d4ee0e58f5b938300c2d2fc77d2e69572c
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This will replace the current goal of 'make qemu' with 'make run' and
moves Qemu handling into its own file and into the boards instead of
being architecture specific.
We should be able to add new boards that support some other type of
emulation (by adding scripts/Makefile.<emu type>) and allow the board to
define their own options for the use type of emulation.
'make qemu' will still work, however it will be deprecated, starting
with this commit it is recommended to use 'make run'.
Jira: ZEP-359
Change-Id: I1cacd56b4ec09421a58cf5d010e22e9035214df6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
To customise test builds and support test related features such as time
stamps and a boot banner, introduce a Makefile variant that is dedicated
to testing.
Initially we introduce a new config overlay that is used for all tests, in
this case we enable BOOT_BANNER and BUILD_TIMESTAMP. This will print the
current version and the date, useful when reporting bugs and also an
indicator that the system has booted before the test has started.
For example:
[QEMU] CPU: qemu32
***** BOOTING ZEPHYR OS v1.6.99 - BUILD: Dec 21 2016 19:57:13 *****
tc_start() - Test Nanokernel CPU and thread routines
Initializing nanokernel objects
...
..
Change-Id: I224318cdeb55a301964ea366dbc577e2e3a09175
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Moved all libc Kconfigs to where the code is and remove the default
Kconfig for selecting the minimal libc. Minimal libc is now the default
if nothing else is configured in.
Removed the options for extended libc, this obviously was restricting
features in the minimal libc without a good reason, most of the
functions are available directly when using newlib, so there is no
reason why we need to restrict those in minimal libc.
Jira: ZEP-1440
Change-Id: If0a3adf4314e2ebdf0e139dee3eb4f47ce07aa89
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Restructure the RANDOM Kconfig to match the structure used in other
drivers with a single top level menu. Move the true random number
generators to appear first in the menu, with pseudo generators at the
bottom. Do not present pseudo generators if a true random generator
is presented.
This change implies that tests, samples and applications that require
the random driver interface must now select CONFIG_RANDOM_GENERATOR.
In order for tests and samples to build (and run) on platforms that
have no random driver it remains necessary to select
the CONFIG_TEST_RANDOM_GENERATOR.
Note that CONFIG_TEST_RANDOM_GENERATOR retains its original purpose of
enabling a random driver that delivers non random numbers for the
purpose of testing only.
Change-Id: I2e28e44b4adf800e64a885aefe36a52da8aa455a
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
Remove CONFIG_TEST_RANDOM_GENERATOR from each test and sample where it
is not required.
Change-Id: I949f8e93c2cb1881622a5e48efeb87c43122a170
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
The random driver, if enabled, is initialized by the kernel
initialization function. There is no need for applications or tests
to re-initialize the driver.
Change-Id: Ib4712dda937a7a83a8079c8aa662cec03c5416f8
Signed-off-by: Marcus Shawcroft <marcus.shawcroft@arm.com>
This commit fixes some style issues detected by checkpatch:
- Lines over 80 characters
- Comment block
Furthermore test legends are homogenized.
Change-Id: If92bbbdcf915164da945a60c8bcdbb7452ad0da0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit fixes an issue in the test_ccm_mode.c file:
sizeof(data) is used to compute the length of the array pointed to
by the 'uint8_t *data' pointer.
At the same function scope, there is a variable (dlen) that already
specifies the required length, so we use that variable instead of
the 'sizeof' function call.
This issue was not reported by Coverity, although is worth to fix it.
Change-Id: I27cbf8c7000a4189a42d193f6445996d4b852aa6
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit fixes the dead code issue reported by Coverity.
Coverity-CID: 151977
Change-Id: Iaa31c032456f48e1af1d1c9d722f051ac5519ccf
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit fixes the dead code issue reported by Coverity.
Coverity-CID: 151975
Change-Id: I449341d1f540abe149e8ad9197a64d52cd5722cd
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit replaces spaces by tabs in the TinyCrypt AES test.
Three 'space required before the open brace' issues are also
fixed by this commit.
Change-Id: I27e961484899873a25847452d569b50322dba74d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit solves some style issues found in comment blocks.
Change-Id: I1f4f7344e33b5898ac7d1fb2cd13d75946b4ee5e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit moves variable declarations at the beginning of the test
routines.
Change-Id: Id1382b64aad4130e9a939c5e51301b75c6958fe5
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit removes the declaration of a data type inside the tests
3 & 4. The new data type 'struct kat_table' is declared at the
beginning of the file.
Change-Id: I7662cd164a865fe0e70f984b9b494d96b4a72af9
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This issue was reported by Coverity (CID 151952)
Change-Id: I59a20a3ccbe606ef634db98ac6cc6889a3973ec3
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Remove those from Makefiles and testcase.ini, we now support unified kernel
only and sanitycheck script now knows how to deal with this.
Change-Id: I853ebcadfa7b56a4de5737d95f2ba096babb2e13
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Some HW needs longet timeouts for this TC to complete succesfully.
Change-Id: If6cd4ad93b6e15293f1f8d8e606e159271f0e4d1
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
When running in real HW, testcases take more time to execute than the
default 60s. 200s seems to work for all HW types as of this commit
(FRDM k64f, Arduino Due, Arduino 101 / x86, EMSK 9d).
Change-Id: I663a67161bd7b4c349a483efb8e9cbf14c09421c
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Unified kernel invokes main() function in the init thread. This
eliminates the need for a separate thread for the test.
Change-Id: I4ff2e160213d152ca7c5d8422162f3464d935119
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
Unified kernel invokes main() function in the init thread. This
eliminates the need for a separate thread for the test.
Change-Id: I4e6c4f212615d2135adf7971df32db1ad392c0e2
Signed-off-by: Dmitriy Korovkin <dmitriy.korovkin@windriver.com>
According to feedback received in ZEP-1130, decreasing the stack
size in the prj.mdef file solves the RAM overflow issue reported
by ISSM.
Jira: ZEP-1130
Change-Id: I761531e535a9e54ccd024b397d5d92d7666be817
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
When the debug option is enabled ECC DSA test doesn't have enough stack
space so qemu fails. Adding double stack size for special case of qemu
and CONFIG_DEBUG.
Jira: ZEP-1066
Change-Id: Ib14d853de2b1c755a6171787845433648d61b75b
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
Some of tests/crypto/test_ecc_dsa test are failing link step only
when debug is enabled, these filters prevent those tests from being
executed under such configuration.
Jira: ZEP-1063
Change-Id: I4b7376c49a401e21c413427918be549934ce03d5
Signed-off-by: Genaro Saucedo Tejada <genaro.saucedo.tejada@intel.com>
This commit adds the test-case for the ECC DH algorithm.
Origin: https://github.com/01org/tinycrypt/tree/v0.2.0
The code was refactored to eliminate function calls and checkpatch
errors. Furthermore, the PRNG was replaced by sys_rand32_init.
Refactoring history is available at:
Repo: https://gitlab.com/santes/tinycrypt/tree/refactoring
Commit: f71fc46403e90be0c54a77150e0539756d8314e7
Jira: ZEP-614
Jira: ZEP-861
Change-Id: I884f26ef8e9ff8e79ed0858678c4f51a37796e02
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit adds the test-case for the ECC DSA algorithm.
Origin: https://github.com/01org/tinycrypt/tree/v0.2.0
The code was refactored to eliminate function calls and checkpatch
errors. Furthermore, the PRNG was replaced by sys_rand32_init.
Refactoring history is available at:
Repo: https://gitlab.com/santes/tinycrypt/tree/refactoring
Commit: f71fc46403e90be0c54a77150e0539756d8314e7
Jira: ZEP-614
Jira: ZEP-862
Change-Id: Ief3c317f3d370a073f07307e53018991b03d9229
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Rename test_ctr to test_ctr_mode to avoid confusions with any CTR-based
algorithm. For example, currently TinyCrypt v0.2.0 supports the
CTR PRNG algorithm.
Rename test_prng to test_hmac_prng to avoid confusions with the test
case for the CTR PRNG algorithm or any test-case related to PRNGs.
Rename test_cbc to test_cbc_mode. TinyCrypt test case for CBC mode is
"test_cbc_mode.c", so it makes sense to keep the same name for the
directory.
Furthermore, README files are also updated to reflect the previous
described changes.
Change-Id: If0af4dcffe8917a7c29608231d3954b73dff5e10
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit solves some indentation issues detected in the following
test-cases/files:
- test_cbc/src/test_cbc_mode.c
- test_ctr/src/test_ctr_mode.c
- test_prng/src/test_hmac_prng.c
Change-Id: I0f184ae4b510e4552a061523ea3e1216ae1f6f2a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit adds the test case for the CTR PRNG algorithm.
Origin: https://github.com/01org/tinycrypt/tree/v0.2.0
The code was refactored to eliminate malloc and free function
calls and checkpatch errors. However, many warnings are still
present. Refactoring history is available at:
Repo: https://gitlab.com/santes/tinycrypt/commits/refactoring
Commit: 5d0482c26c4ad69e7854dde58d15bb57a3e5f18f
Jira: ZEP-614
Jira: ZEP-860
Change-Id: I0620868d092941931762718c81fe13fc01f251b2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Spaces were used instead of tabs. Fix up by using Lindent from
Linux kernel since we use same coding style.
Change-Id: Iece925ae40cad342fde1e33c240cb2ac23a15a9b
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Spaces were used instead of tabs. Fix up by using Lindent from
Linux kernel since we use same coding style.
Change-Id: I7aa5c3f25a800fdaec6852e0d36daa07f1424f9a
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Spaces were used instead of tabs. Fix up by using Lindent from
Linux kernel since we use same coding style.
Change-Id: I7294d1cef98031ba4ca1c202e0f19dbb7e504e16
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Spaces were used instead of tabs. Fix up by using Lindent from
Linux kernel since we use same coding style.
Change-Id: I7ecb6dfd602ea4768d6a53e509f29b208d96c479
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Microkernels now support 'main' as a task entry point.
Change-Id: I39b07c191a98748191536ade6f87ec02da064bf1
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
The QEMU bug in the SDK has been fixed.
This reverts commit eb63710960.
Change-Id: Ic405c9df0f7aebb2a9d20180c7b0c04889669610
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This contain the run of the self test for the ciphers, crypto
algorithms and utilities of mbedTLS.
Jira: ZEP-327
Jira: ZEP-340
Jira: ZEP-495
Origin: https://tls.mbed.org/download/start/mbedtls-2.3.0-apache.tgz
Change-Id: Ic1bb30b7ed691f17421510cd914ec5096e4e70ea
Signed-off-by: Sergio Rodriguez <sergio.sf.rodriguez@intel.com>
Signed-off-by: Kuo-Lang Tseng <kuo-lang.tseng@intel.com>
Daily build failing due to this test case timing out
execution after 3 hours. Locally this test takes about
a minute, the issues with CI are being looked into.
Change-Id: I27e40846dde25fc65281b4aea61d10b403c6512d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>