Commit Graph

48 Commits (4b3cddff2a66d5b13ad861e8782d1d630c2479c1)

Author SHA1 Message Date
Martin Kojtal 5539d65017
Merge pull request #12638 from tymoteuszblochmobica/testall
Enable storage tests to all targets
2020-04-03 09:00:18 +02:00
Tymoteusz Bloch 2ca832c673 Enable storage tests to all targets 2020-04-01 12:04:36 +02:00
Kyle Kearney 7f18a6ce49 Move flash bounds helpers from TDBStore to kv_config 2020-03-24 12:27:21 -07:00
Kyle Kearney 926423c109 Reuse TDBStore default size computation in devicekey test
Replace custom caluation that always assumed two sectors with the standard
calculation exposed on TDBStore.
2020-03-24 12:27:21 -07:00
Marcin Tomczyk 6a21dfa080 [Storage] Use internal flash for KVStore always if default configuration. TDB_INTERNAL is always for first choose. 2020-03-18 06:05:52 -07:00
Tymoteusz Bloch 7b9170541a KV storage. Root of trust fix to pass Greentea tests for CY8CPROTO_062_4343W. 2020-03-09 13:53:28 +01:00
Tymoteusz Bloch 0e7a53cdb1 DeviceKey Root of Trust generation refactored.
It's no longer automatically and silently created.
2020-02-18 16:32:20 +01:00
Kyle Kearney d8f47bdaa3 Improve reliability of KVStore general tests
In kvstore_init, prior to initializing the kvstore, erase the
underlying block storage device. This ensures that each test run
starts from a consistent state and avoids failures that can result
if a previous test run left the storage in an inconsistent state.
2020-01-13 11:32:12 -08:00
Evelyne Donnaes 8a4bba33bd Fixed baremetal build failures 2020-01-10 13:20:59 +00:00
Seppo Takalo 1f99703806 Fix TDBStore sizes for tests
Tests must require at least 2 erase sectors per TDBStore,
so that the garbage collection may work.
2019-12-09 11:18:29 +02:00
Seppo Takalo 0fe159f6c4 Greentea: Fix slice-calculation from kvstore test phase 2 2019-12-03 14:51:37 +02:00
Seppo Takalo 12dea71f40 Greenteatests: Validate KVStore content when WRITE_ONCE flag is set. 2019-12-03 14:38:40 +02:00
Seppo Takalo 2ddd4069b6 Remove flaky error_inject_test 2019-12-03 14:38:40 +02:00
Seppo Takalo b9eaac4da0 Fix Greentea handler typecasting. 2019-12-03 14:38:40 +02:00
Seppo Takalo abbb2485d2 Greentea: Fix storage sizes for SecureStore tests.
Previously Greentea tests was not initialising its storage
before asking for bd->get_program_size(), causing FlashBlockDevice to
return zero. This caused both TDBStorage's to use zero for both
parameter to SlicingBlockDevice(bd, 0, 0), effetivaly both then
used same addresses for slice. This caused SecureStore tests
to fail, because writes to internal RBP storage overwrote keys
from external storage.

Fine-tune TDBStore sizes, so that all tests can fit into storage.
2019-11-28 10:47:47 +02:00
Veijo Pesonen 065ff2645e Fixes features-storage-tests-kvstore-static_tests test case bugs
At least with LPC55S69's default TDBStore configuration it's
impossible to run storage Greentea tests without exhausting the
memory reserved for storing keys.

Fixes an issue where number of keys were removed based on number of
threads which didn't have anything to do with the test case.

Fixes an issue where number of keys were assumed to be constant
but variable number was used for configuration.
2019-11-28 10:37:11 +02:00
Seppo Takalo af0708ca48 IOTSTOR-978: Skip a unstable testcase until fixed 2019-11-15 10:38:32 +02:00
Matthew Macovsky 78569aa808 Enable TDBStore whitebox test on PSoC 6 2019-11-12 12:26:25 -08:00
Matthew Macovsky 92829bd9a4 Generalize KVStore phase 1/2 test BlockDevice sizes 2019-11-12 12:26:25 -08:00
Matthew Macovsky a1c74036ea Enable some of the kvstore tests for PSoC 6 MCUs 2019-11-12 12:26:25 -08:00
RAJKUMAR KANAGARAJ d8e2dd5b47 Incorporated the review comments 2019-11-08 09:50:09 -08:00
RAJKUMAR KANAGARAJ 8ecce14dad Skip Bare metal green tea test for storage related components or the components test cases which is based on RTOS 2019-11-06 04:49:19 -08:00
Martin Kojtal fcd40ab1a5
Merge pull request #11628 from kyle-cypress/pr/directaccess-devicekey-test
Make devicekey remainder test more meaningful
2019-10-15 21:41:05 +08:00
Kyle Kearney 1cb6f7b31c Make devicekey remainder test more meaningful
As of 722628be02, the "remainder" configuration
also uses the default location near the end of flash. Which makes the two tests
nearly identical with the exception that the "last two sectors" test correctly
handles parts with a low (possibly 1:1) erase size to program size ratio.
Therefore, change the "remainder" test to instead be a "default" test that uses
the tdb_internal_address/size values, so that it
a.) tests something meaningfully different and
b.) tests using the custom TDB address/size values if they are provided.
c.) functions correctly on devices where the default sector-based size computation
    does not work (e.g. because of the low erase size to program size ratio)
    and therefore a custom location and size has been specified.
The is_conf_tdb_internal variable is unused and therefore removed.
2019-10-03 16:04:30 -07:00
Matthew Macovsky baf375f8cb Allow for arbitrary QSPI alt sizes
The QSPI spec allows alt to be any size that is a multiple of the
number of data lines. For example, Micron's N25Q128A uses only a
single alt cycle for all read modes (1, 2, or 4 bits depending on
how many data lines are in use).
2019-09-30 14:45:08 -07:00
Martin Kojtal 5904614696
Merge pull request #11183 from OpenNuvoton/nuvoton_m252kg_test
M252KG: Fix kvstore-static_tests failing with OOM
2019-08-20 09:49:58 +02:00
Chun-Chieh Li 500221c6a0 Fix kvstore-static_tests failing with OOM
Forked 3 threads plus misc, so minimum (4 * OS_STACK_SIZE) heap are required.
2019-08-15 17:53:31 +08:00
Veijo Pesonen 722628be02 [TDBStore] changes the default TDBStore location
Thus far the default position has been after the application plus two
spare sectors. For simplicity and to have a predictable location for the
TDBStore with the default configuration the location is now switched to
the end of the flash. Two last sectors to be exact.
2019-08-15 09:26:57 +03:00
int_szyk ae6f8be146 Newline at the end of files 2019-08-01 08:44:58 +02:00
int_szyk 8b68a1ea58 Updated testcases 2019-07-31 10:46:38 +02:00
Martin Kojtal 149d53cc89
Merge pull request #10619 from jamesbeyond/fm-iap
Fastmodel: enable flashIAP and kvstore
2019-07-02 14:23:00 +01:00
jeromecoutant bfd8bfdbc9 Wrong timeout value in greentea tests 2019-06-17 13:07:20 +02:00
Qinghao Shi 81c96a785d Tests: enable kvstore test for Fastmodel for test code coverage 2019-06-06 18:54:59 +01:00
David Saada eb29af5f8a Fix direct access to device key test for small erase/program ratio
This commit fixes the failure in the "Direct access to device key" test,
when working with internal flash components, whose erase size to program
size ratio is small. In such cases, the last two sectors are not large
enough to store the device key.
2019-03-05 11:32:29 +02:00
Yossi Levy 5de92ca4c6 Fixing a bug in FileSystemStore to get the folder path from kv_config in FILESYSTEM and default configuration 2019-01-21 11:19:14 +02:00
offirko e996b7f9ce DirectAccess DeviceKey added support for default storage type 2019-01-17 10:58:55 -06:00
Martin Kojtal d20b59153a
Merge pull request #9244 from theamirocohen/kvstore_tests_api
Kvstore tests api change to run on K64F only
2019-01-10 13:48:31 +00:00
David Saada 5d1985019f Remove kvstore's mbed_lib.json file (not relevant any more)
In addition, use the NOT_SUPPORTED directive to skip the tests.
2019-01-09 16:25:13 +02:00
Amir Cohen 9a5841ad00 Kvstore tests api change to run on K64F only
Change KVStore API tests to run only on K64F, these tests check the KVStore functionality without actually testing the board's storage,
Thus they should produce the same results for each device they run on.
K64F was selected for no special technical reason but only because of it being available and convenient to use.
2019-01-09 14:52:11 +02:00
Yossi Levy 423c4fbc18 The direct_access_devicekey test should not run if there is no component flashiap block device in the target 2019-01-09 13:48:25 +02:00
offirko 6592e85c13 Added utility function to help locate expected internal flash tdbstore position.
(Supporting FILESYSTEM and TDB_EXTERNAL configuration only)
2019-01-09 13:48:25 +02:00
offirko bb0d1afa9a Updated test to consider tdb_internal non default configuration as well 2019-01-09 13:48:25 +02:00
offirko 945579378e Adding low code size tool for direct access to Devicekey.
This enables application with code size restrictions to access
devicekey directly based on address in internal flash without kvconfig overhead
2019-01-09 13:48:24 +02:00
David Saada 72f6f6c92f TDBStore: Perform garbage collection on failed writes
Partial writes may turn storage unusable. GC clears this scenario.
2019-01-06 15:03:40 +02:00
Amir Cohen 4fe7834928 Remove dead code 2018-12-13 13:34:08 +02:00
Amir Cohen 901a493299 Improve tests by reducing kvstore reset occurrences 2018-12-13 11:47:25 +02:00
David Saada cb7f68e992 Fix a few SecureStore issues (following preliminary security review)
- Remove require integrity flag (authentication) - always authenticate
- Use RBP KV to store CMAC also in write once case
- Allow removing a key if reading it failed on RBP authentication error
- Disable SecureStore if user disables MBED TLS AES CTR or CMAC
2018-12-10 23:34:57 +02:00
David Saada e9c25e23a5 KVStore & derived classes: design docs, implementation & configuration
Implement the following:
KVStore base class
TDBStore class
FileSystemStore class
SecureStore class
Global APIs
Configuration framework
Design documentation
2018-11-24 17:43:35 +02:00