Commit graph

134 commits

Author SHA1 Message Date
Anas Nashif 83508a5677 cleanup: include/: move flash_map.h to storage/flash_map.h
move flash_map.h to storage/flash_map.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-27 22:55:49 -04:00
Marc Herbert 3f9151dae6 tests: minor FCB re-ordering not to leave a random flash.bin behind
The last FCB test to run (fcb_test_last_of_n) uses uninitialized
test_data[] and leaves behind a flash.bin with random content. Pick
another one (fcb_test_reset) that leaves a deterministic flash.bin
behind and run that last instead.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2019-06-21 13:44:40 +02:00
Anas Nashif f2cb20c772 docs: fix misspelling across the tree
Found a few annoying typos and figured I better run script and
fix anything it can find, here are the results...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-19 15:34:13 -05:00
Anas Nashif 2fb19fcbdd style: samples/tests: add braces around if/while statements
Per guidelines, all statements should have braces around them. We do not
have a CI check for this, so a few went in unnoticed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-06-06 15:20:21 +02:00
Jan Van Winkel afdbc20364 tests: Added native POSIX to flash based tests
Added native POSIX boards as target for flash related tests.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-05-28 21:14:19 -04:00
Kamil Piszczek cbc2ff6631 tests: fs: nvs: unittest with corrupted sector close op
Added a test case with corner case scenario, in which sector closing
operation is interrupted (e. g. due to power-down).

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-05-27 12:26:20 +02:00
Kamil Piszczek 302dc9878e tests: fs: nvs: moving nvs_clear to setup method
Flash clearing operation is now moved to the setup method inside the
NVS unit test.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-05-27 12:26:20 +02:00
Andrzej Puzdrowski 2d48f4337d tests/fs/nvs: GC full round test
Added a test for testing full round GC on 3-sectors
configuration. In this case all kind off sector can
appeared so this test covers well more numerous
sectors configurations.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-05-24 11:13:59 +02:00
Kamil Piszczek b76edc1a1d tests: fs: nvs: garbage collector test
Added a simple test for the NVS Garbage Collector.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-05-22 10:22:53 +02:00
Kamil Piszczek 35a9299a76 tests: fs: nvs: test cases clean up flash on completion
Modified tests for the NVS to clean up the flash memory at the end of
their execution.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-05-22 10:22:53 +02:00
Kamil Piszczek e81090cff6 tests: fs: nvs: added basic unittests for nvs
Added basic tests for the NVS file system. One of the tests covers power
down during the flash write operation.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-05-13 17:07:28 +02:00
Kamil Piszczek dae15fa736 tests: storage: flash_map: adding qemu platform
Added QEMU platform to the Flash Map test and defined partitions for
QEMU dts.

Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
2019-04-24 13:05:11 -07:00
Anas Nashif 3ae52624ff license: cleanup: add SPDX Apache-2.0 license identifier
Update the files which contain no license information with the
'Apache-2.0' SPDX license identifier.  Many source files in the tree are
missing licensing information, which makes it harder for compliance
tools to determine the correct license.

By default all files without license information are under the default
license of Zephyr, which is Apache version 2.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-04-07 08:45:22 -04:00
Andrew Boie 7b1ee5cf13 tests: CONFIG_TEST_USERSPACE now off by default
Unlike CONFIG_HW_STACK_PROTECTION, which greatly helps
expose stack overflows in test code, activating
userspace without putting threads in user mode is of
very limited value.

Now CONFIG_TEST_USERSPACE is off by default. Any test
which puts threads in user mode will need to set
CONFIG_TEST_USERSPACE.

This should greatly increase sanitycheck build times
as there is non-trivial build time overhead to
enabling this feature. This also allows some tests
which failed the build on RAM-constrained platforms
to compile properly.

tests/drivers/build_all is a special case; it doesn't
put threads in user mode, but we want to ensure all
the syscall handlers compile properly.

Fixes: #15103 (and probably others)

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-04-06 14:30:42 -04:00
Cinly Ooi 9bfc1eb8a6 sample: nffs_fs_api: basic: Increase time for testing
Increase test timeout to 500s because it was noticed
that the default of 60s has truncated the test
suite run for nrf52840_pca10056

Signed-off-by: Cinly Ooi <cinly.ooi@intel.com>
2019-03-29 18:24:48 -04:00
Patrik Flykt 24d71431e9 all: Add 'U' suffix when using unsigned variables
Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2019-03-28 17:15:58 -05:00
Andrzej Puzdrowski 7a00658b8e tests/subsys/fs/nffs_fs_api: build ram back-end only for qemu_x86
Ram back-end was unnecessary included in non qemu test which
increased RAM footprint much.

Patch includes ram backend into build only for qemu_x86 build.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-03-09 10:34:17 -05:00
Varun Sharma 145d8f06e0 tests: subsys: fs : Fix coverity issue
Fix Unchecked return value in func: nffs_test_util_create_file_blocks

Coverity-CID: 190955
Fixes: #13860

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
2019-03-07 09:39:39 -05:00
Daniel Leung 602a79cfeb tests: fs/nffs_fs_api: fix uninitialized reference time variable
The reftime variable used for performance numbers is not initialized
prior to being used. Initialize it to the current uptime so delta
can be calculated correctly.

Fixes #13877
Fixes CID-190936

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-03-02 12:27:30 +01:00
Daniel Leung 8b523e944b tests: fs/fat_fs_dual_drive: check fs_seek return values
Inside test_file_truncate(), the results of fs_seek() are not
checked. So adds some checks there.

Fixes #13874
Fixes CID-190939

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-03-02 12:26:37 +01:00
Flavio Ceolin b92f104b66 tests: fs: Add missing return check
Checking the return of fs_stat to ensure that there is not hidden error.
Problem spotted by coverity.

CID 190949

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2019-03-01 09:50:15 +01:00
Kumar Gala 2508818bc3 tests: fs: nffs_fs_api: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Kumar Gala 1b2496866c tests: fs: multi-fs: Convert FLASH_AREA to DT_FLASH_AREA
Use DT_FLASH_AREA prefixed defined instead of FLASH_AREA as the non-DT
version is deprecated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-08 22:39:07 -06:00
Andrew Boie 41f6011c36 userspace: remove APPLICATION_MEMORY feature
This was never a long-term solution, more of a gross hack
to get test cases working until we could figure out a good
end-to-end solution for memory domains that generated
appropriate linker sections. Now that we have this with
the app shared memory feature, and have converted all tests
to remove it, delete this feature.

To date all userspace APIs have been tagged as 'experimental'
which sidesteps deprecation policies.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-02-08 07:04:30 -05:00
Kumar Gala 25eae07217 tests: subsys: fs: fcb: Use DT_FLASH_AREA_<FOO>_ID define
Rather than using hard coded 2, use DT_FLASH_AREA_IMAGE_1_ID
that is now generated.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2019-02-07 10:31:27 -06:00
Carles Cufi 962f900c0b test: nffs: Remove unsupported ICs from CMake files
The smaller Nordic ICs are not supported for those tests due to not
enough RAM.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-17 12:01:16 -06:00
Carles Cufi 9897904254 tests: nffs: Run NFFS tests on nRF52840
After the builds have been fixed, enable the tests on the 256KB-RAM
Nordic IC.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-17 12:01:16 -06:00
Carles Cufi 4f10f8ba2e tests: nffs: Tweak Kconfig to fit in RAM
NFFS tests do not fit in RAM on nRF5x, tweak the configurations so that
they do.

Fixes: #12065

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-17 12:01:16 -06:00
Anas Nashif 5060ca6a30 cmake: increase minimal required version to 3.13.1
Move to latest cmake version with many bug fixes and enhancements.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2019-01-03 11:51:29 -05:00
Varun Sharma 3d9213ac57 tests: subsys: fs: multifs: Enable fs shell using new shell
Fixes #11356, resolved compilation issue wrt to NFFS_FLASH_DEV_NAME

Enabled new shell implementation for testing fs shell

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
2018-12-14 13:14:17 +01:00
Adithya Baglody f6e7c8b1b5 tests: subsys: fs: Fixed headers which were creating objects.
These tests were creating objects from header file in the bss.
Fixed it by moving the objects to appropriate object files.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-12-07 10:32:41 -05:00
Patrik Flykt 440b535602 tests: Add 'U' to unsigned variable assignments
Add 'U' to a value when assigning it to an unsigned variable.
MISRA-C rule 7.2

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
2018-12-04 22:51:56 -05:00
Jakub Rzeszutko b7a5874830 tests: shell: migrate tests to the new shell
Testing:
1. Shell built-in commands.
2. Wildcards module.
3. Static commands creation and execution.
4. Dynamic commands creation and execution.

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@nordicsemi.no>
2018-11-22 11:32:29 +01:00
Pushpal Sidhu 1f1faa9195 tests: fat_fs_api: add renaming tests
Test both directory and file renaming.

Signed-off-by: Pushpal Sidhu <psidhu.devel@gmail.com>
2018-11-02 12:21:22 -04:00
Reto Schneider 7eabab2f5d samples, tests: Use semi-accurate project names
When using an IDE (e.g. Eclipse, Qt Creator), the project name gets
displayed. This greatly simplifies the navigation between projects when
having many of them open at the same time. Naming every project "NONE"
defeats this functionality.

This patch tries to use sensible project names while not duplicating
too much of what is already represented in the path. This is done by
using the name of the directory the relevant CMakeLists.txt file is
stored in. To ensure unique project names in the samples (and again, in
the tests folder) folder, small manual adjustments have been done.

Signed-off-by: Reto Schneider <code@reto-schneider.ch>
2018-10-27 21:31:25 -04:00
Anas Nashif deaab90641 tests/samples: cleanup tags
Remove redundant 'sample' tag and add something that matches the
functionality and features being tested, demonstrated.

Avoid short abbriviations and using full names for fs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-10-16 09:17:51 -04:00
Varun Sharma 7622fc37a0 subsys: fs: Migrate to new logging subsys
subsys:fs : Migrate from `SYS_LOG` to `LOG` logging mechanism.

tests: subsys: fs: Enabled CONFIG_LOG in prj.conf

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
2018-10-15 09:18:03 -04:00
Piotr Zięcik 1c16cfcc30 arch: arm: Make ARM_MPU the sole option controlling MPU usage
This commit removes all MPU-related (ARM_CORE_MPU and NXP_MPU)
options exept ARM_MPU, which becomes master switch controlling
MPU support on ARM.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-09-20 14:16:50 +02:00
Piotr Zięcik 9331064ff9 arch: nrf52: Remove ARM_MPU_NRF52X option.
The ARM_MPU_NRF52X option is just selecting ARM_MPU option,
which could be also controlled through menuconfig.

This commit removes the ARM_MPU_NRF52X option and replaces
its usage by ARM_MPU option.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
2018-09-20 14:16:50 +02:00
Krzysztof Chruscinski ba808d789e samples: subsys: shell: Port sample to new shell subsystem
Ported shell sample to use new shell.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2018-09-19 09:30:29 -04:00
Flavio Ceolin da49f2e440 coccicnelle: Ignore return of memset
The return of memset is never checked. This patch explicitly ignore
the return to avoid MISRA-C violations.

The only directory excluded directory was ext/* since it contains
only imported code.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2018-09-14 16:55:37 -04:00
Varun Sharma 28f5da6c38 subsys: shell : fs new shell module for fs mount operation
Fixes # 7348, also includes test cases

Signed-off-by: Varun Sharma <varun.sharma@intel.com>
2018-09-13 09:27:45 -04:00
Sebastian Bøe 55ee53ce91 cmake: Prepend 'cmake_minimum_required()' into 'app' build scripts
Prepend the text 'cmake_minimum_required(VERSION 3.8.2)' into the
application and test build scripts.

Modern versions of CMake will spam users with a deprecation warning
when the toplevel CMakeLists.txt does not specify a CMake
version. This is documented in bug #8355.

To resolve this we include a cmake_minimum_required() line into the
toplevel build scripts. Additionally, cmake_minimum_required is
invoked from within boilerplate.cmake. The highest version will be
enforced.

This patch allows us to afterwards change CMake policy CMP000 from OLD
to NEW which in turn finally rids us of the verbose warning.

The extra boilerplate is considered more acceptable than the verbosity
of the CMP0000 policy.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-08-15 04:06:50 -07:00
Sebastian Bøe c9e12493b2 cmake: Remove duplicate invocations of target_link_libraries on app
It is not necessary to link 'app' with ELMFAT or NFFS because their
usage requirements are covered by the 'APP_LINK_WITH_MBEDTLS'
mechanism that automatically links 'app' with the interface library
FS.

This patch removes the redundant target_link_libraries invocations.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-07-25 08:27:45 -04:00
Anas Nashif 8cdb5d5d24 tests: nffs: fixed types
We have been mixing u32_t and uint32_t. Using u32_t when the API expects
something else.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-07-18 12:32:23 -04:00
Sebastian Bøe c1c25dea1a cmake: Remove stray CMakeLists.txt file
Remove the CMakeLists.txt file that is in the 'common' directory of
nffs_fs_api. It has likely been added by mistake as it does not make
any sense as it is written.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2018-06-22 12:28:01 -04:00
Anas Nashif fb2e142b0e tests: fix test identifiers
Fix test identifiers and use subsystem correctly.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-06-07 18:01:49 -05:00
Inaky Perez-Gonzalez 14fe2727b8 tests: unfold nffs_fs_api
The introduction of `sanitycheck --list-tests` fails to properly parse
the subcases in tests/subsys/fs/nffs_api/ beacause four of them are
all packed with #ifdefs in a single src/main.c.

So this breaks that testcase in four:

- creating a common folder with the code itself
- moving the common code in */src/main.c to common/test_nffs.h and
  adding ../common/*.c to the sources
- thinning each testcase.yaml to have only the needed testcase
  definition
- adding zephyr_include_directories(../common) to the cmakefiles

so we now produce with --list-tests

    - filesystem.nffs.basic.append
    - filesystem.nffs.basic.corrupt_block
    - filesystem.nffs.basic.corrupt_scratch
    - filesystem.nffs.basic.fs_mount
    - filesystem.nffs.basic.gc
    - filesystem.nffs.basic.gc_on_oom
    - filesystem.nffs.basic.incomplete_block
    - filesystem.nffs.basic.large_write
    - filesystem.nffs.basic.long_filename
    - filesystem.nffs.basic.lost_found
    - filesystem.nffs.basic.many_children
    - filesystem.nffs.basic.mkdir
    - filesystem.nffs.basic.open
    - filesystem.nffs.basic.overwrite_many
    - filesystem.nffs.basic.overwrite_one
    - filesystem.nffs.basic.overwrite_three
    - filesystem.nffs.basic.overwrite_two
    - filesystem.nffs.basic.read
    - filesystem.nffs.basic.readdir
    - filesystem.nffs.basic.rename
    - filesystem.nffs.basic.split_file
    - filesystem.nffs.basic.unlink
    - filesystem.nffs.basic.wear_level
    - filesystem.nffs.cache.cache_large_file
    - filesystem.nffs.cache.fs_mount
    - filesystem.nffs.large.fs_mount
    - filesystem.nffs.large.large_system
    - filesystem.nffs.large.large_unlink
    - filesystem.nffs.performance.fs_mount
    - filesystem.nffs.performance.performance
   30 total.

vs before, that we did:

    - filesystem.nffs.basic.append
    - filesystem.nffs.basic.corrupt_block
    - filesystem.nffs.basic.corrupt_scratch
    - filesystem.nffs.basic.fs_mount
    - filesystem.nffs.basic.gc
    - filesystem.nffs.basic.gc_on_oom
    - filesystem.nffs.basic.incomplete_block
    - filesystem.nffs.basic.large_write
    - filesystem.nffs.basic.long_filename
    - filesystem.nffs.basic.lost_found
    - filesystem.nffs.basic.many_children
    - filesystem.nffs.basic.mkdir
    - filesystem.nffs.basic.open
    - filesystem.nffs.basic.overwrite_many
    - filesystem.nffs.basic.overwrite_one
    - filesystem.nffs.basic.overwrite_three
    - filesystem.nffs.basic.overwrite_two
    - filesystem.nffs.basic.read
    - filesystem.nffs.basic.readdir
    - filesystem.nffs.basic.rename
    - filesystem.nffs.basic.split_file
    - filesystem.nffs.basic.unlink
    - filesystem.nffs.basic.wear_level
    - filesystem.nffs.cache.append
    - filesystem.nffs.cache.corrupt_block
    - filesystem.nffs.cache.corrupt_scratch
    - filesystem.nffs.cache.fs_mount
    ...
    - filesystem.nffs.cache.split_file
    - filesystem.nffs.cache.unlink
    - filesystem.nffs.cache.wear_level
    - filesystem.nffs.large.append
    - filesystem.nffs.large.corrupt_block
    - filesystem.nffs.large.corrupt_scratch
    ...
    - filesystem.nffs.large.split_file
    - filesystem.nffs.large.unlink
    - filesystem.nffs.large.wear_level
    - filesystem.nffs.performance.append
    - filesystem.nffs.performance.corrupt_block
    ...
    - filesystem.nffs.performance.unlink
    - filesystem.nffs.performance.wear_level
   92 total.

(so it was repeating ALL the subcases for eatch main testcase)

Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2018-05-23 15:07:24 -04:00
Adithya Baglody c07ec386bf tests: subsys: fs: Enable proper configuration for qemu_x86.
The sample was running with incorrect kconfigs.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2018-05-15 17:48:18 +03:00
Ramakrishna Pallala c239ea701f tests: subsys: fs: Add test for FAT FS dual instance case
Add a test application to demonstrate the dual instances of
FAT file system.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-08 08:53:01 -04:00
Ramakrishna Pallala 01b831751d tests: subsys: fs: Add changes to support multiple FS instance
Set FAT FS mount point name as per ELM FAT Library drive
name format.

Add file system specific headers wherever necessary.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-05-08 08:53:01 -04:00
Johan Hedberg 9968cda453 fs: Convert NFFS partition to a generic one
The NFFS partition at the end of flash is also useful for any other
file system or even the Flash Circular Buffer (FCB). Rename the
partition from 'nffs_partition' to 'storage_partition' and make it
depend on a new hidden Kconfig entry which the relevant users will
select (such as NFFS and FCB).

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2018-04-26 16:06:55 +05:30
Anas Nashif 55ce5510f5 tests: cleanup subsystem tests meta-data
Cleanup testnames, tagging and filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-09 22:55:20 -04:00
Anas Nashif fe476cc036 tests: ztest: test_main takes no arguments
Some tests were using test_main with arguments causing conflicts during
build.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-04-01 14:14:16 -04:00
Carles Cufi 8aa9a37902 drivers: flash: nrf: Rename nrf5 to nrf
With upcoming ICs that are not in the nRF5x family, rename the flash
driver and all its dependencies from nrf5 to nrf.

Should also fix the issue introduced by f49150cab6 which broke the
assignment of the flash device due to a partial rename.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2018-03-20 20:07:09 +01:00
Ramakrishna Pallala d3a6d933f6 tests: subsys: fs: Add test for multiple file systems
Add a new test for testing multiple file systems mounted
simultaneously on Zephyr. The test enables FATFS and NFFS
togeather and uses RAM as backend storage device.

The intention of this test is to demonstrate multiple file systems
support and perform basic file and directory operations. This test
heavily reused the existing fat_fs_api and nffs_fs_api test sources.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-03-10 21:38:04 -05:00
Ramakrishna Pallala 3228e70bbf tests: subsys: fs: Adapt nffs_fs_api test as per VFS changes
Adapt nffs_fs_api test as per the VFS layer changes.

Add new test for NFFS file system mount.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-03-10 21:38:04 -05:00
Ramakrishna Pallala eb30e80bed tests: subsys: fs: Adapt fat_fs_api test as per VFS changes
Adapt fat_fs_api test as per the VFS layer changes.

Add new test for FatFs file system mount.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
2018-03-10 21:38:04 -05:00
Anas Nashif 0be346eed4 tests: do not use comma separated strings
platform_whitelist does not deal with comma separated strings. Also
remove build_only option, this should also run on those devices.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-15 08:53:25 -05:00
Andrzej Puzdrowski b3614c0b17 subsys: fs: fcb: remove f_area_id from fcb structure
It is faster to operate directly on flash_area pointer instead
of fetch it all the time using the fcb flash area id.
Also as f_area_id was needed only for get appropriate flash_area
pointer, so it is better to pass it only while initialization
the fcb and not store it in fcb instance data at all.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-02-07 09:51:26 -05:00
Andrzej Puzdrowski 9d56247cc7 test: subsys: fs: fcb: align to using sectors
fcb sectors description switch from using array of flash_area
structures to array of flash_sector structures.
This patch aligns tests to this change.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-02-07 09:51:26 -05:00
Andrzej Puzdrowski 6f7699fb14 tests: subsys: fs: nffs_fs_api: cleanup configuration for nRF5x
Removed CONFIG_FLASH_PAGE_LAYOUT because it is already selected
by NFFS kconfig itself. Some other keywords were duplicated.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-01-29 12:50:35 +01:00
Andrzej Puzdrowski 351a2c7872 tests: subsys: fs: nffs_fs_api: fix nRF5x failures
CONF_FILE was overwritten by boilerplate.cmake so not proper
settings were took for tests. NRF5 flash driver had changed
its name to one defined by DT (see #5773) - which causes
incompatibility witch previous settings.

This patch solves this problems.


Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-01-29 12:50:35 +01:00
Kumar Gala 26e4da52cf arm: nordic: flash: Use FLASH_DEV_NAME define
We want to move to use a common FLASH_DEV_NAME across the various flash
drivers. So samples, tests, or other code can be a bit more generic.  So
replace CONFIG_SOC_FLASH_NRF5_DEV_NAME with FLASH_DEV_NAME.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2018-01-25 15:23:00 -06:00
Andrzej Puzdrowski ae9560636f tests: subsys: fs: Add tests Flash Circular Buffer module
Tests added were adopted from MyNewt.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2018-01-15 15:46:37 -05:00
Anas Nashif e029e94100 tests: fs: fix README and adapt for cmake
Change build instructions to use CMake and remove confusing
'Troubleshooting' section.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 12:50:14 -05:00
Anas Nashif d4784555d0 tests: remove build_only option
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-28 20:24:29 -05:00
Anas Nashif 23f81eeb42 tests/samples: fixed yaml syntax
Use a map directory, avoid the list which makes parsing a bit
cumbersome.

Fixes #5109

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-11 14:47:08 -05:00
Sebastian Bøe 0829ddfe9a kbuild: Removed KBuild
Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe 12f8f76165 Introduce cmake-based rewrite of KBuild
Introducing CMake is an important step in a larger effort to make
Zephyr easy to use for application developers working on different
platforms with different development environment needs.

Simplified, this change retains Kconfig as-is, and replaces all
Makefiles with CMakeLists.txt. The DSL-like Make language that KBuild
offers is replaced by a set of CMake extentions. These extentions have
either provided simple one-to-one translations of KBuild features or
introduced new concepts that replace KBuild concepts.

This is a breaking change for existing test infrastructure and build
scripts that are maintained out-of-tree. But for FW itself, no porting
should be necessary.

For users that just want to continue their work with minimal
disruption the following should suffice:

Install CMake 3.8.2+

Port any out-of-tree Makefiles to CMake.

Learn the absolute minimum about the new command line interface:

$ cd samples/hello_world
$ mkdir build && cd build
$ cmake -DBOARD=nrf52_pca10040 ..

$ cd build
$ make

PR: zephyrproject-rtos#4692
docs: http://docs.zephyrproject.org/getting_started/getting_started.html

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
2017-11-08 20:00:22 -05:00
Sebastian Bøe b7eaeb9f0a cleanup: Use quote include instead of system include
When the header file is located in the same directory as the source
file it is better to use a relative quote-include, e.g.

than a system include like

Avoiding the use of system includes in these cases is beneficial
because;

* The source code will be easier to build because there will be fewer
system include paths.

* It is easier for a user to determine where a quote-include header
  file is located than where a system include is located.

* You are less likely to encounter aliasing issues if the list of
  system include paths is minimized.

Authors:
Anas Nashif
Sebastian Bøe

Signed-off-by: Sebastian Boe <sebastian.boe@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-28 07:11:53 -04:00
Anas Nashif 5c24704e1c tests: nffs: cleanup configs
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-17 08:55:38 -04:00
Anas Nashif 0356590df5 tests: samples: fix yaml syntax
Fix indentation and syntax and make it pass yamllint tool.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-15 08:15:00 -04:00
Anas Nashif 6c8d01e6bb tests: nffs: fix include
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-03 14:50:14 -04:00
Anas Nashif a2a9622225 tests: add fs tag to filesystem tests
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-03 08:43:50 -04:00
Anas Nashif c6a8014e1c subsys: fs: consolidate elm FAT kconfig options
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-03 08:43:50 -04:00
Anas Nashif 3580ba539e subsys: fs: consolidate nffs kconfig options
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-10-03 08:43:50 -04:00
Grzegorz Kolodziejczyk 4e916f40f7 tests: nffs_fs_api: Add performance test for nffs
This adds performance test for nffs with open, close, read, write and
unlink sub test cases.

Origin: Original

Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2017-09-22 06:54:48 -04:00
Grzegorz Kolodziejczyk cb69933208 tests: nffs_fs_api: Add ported NFFS test suite
This patch adds NFFS test suite ported from Mynewt. The test cases are
pretty much the same as in original implementation, however some of
them had to be adjusted to cover differences in Mynewt and Zephyr
filesystem APIs. Also the code was reformatted in some places to make
checkpatch happy.

All test cases from "basic" group can be also run on nRF52840 (nRF52 and
nRF51 do not have enough RAM to run all tests as-is).

Origin: Apache Mynewt NFFS
URL: https://github.com/apache/mynewt-nffs/tree/master
Commit: 6639f7a432e70db00ef25d5e558aedbe503a3c9a
Purpose: NFFS test suite
Maintained-by: Zephyr

Signed-off-by: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@codecoup.pl>
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2017-09-22 06:54:48 -04:00
Anas Nashif 3c50f7aa12 tests: samples: remove duplicate filtering
We have many testcases doing filtering both on the architecture level
and the platform level, which is redundant. Also many testcases are
running the same test twice on the same SoC for no good reason, cleanup
the tests and cleanup the filtering.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-27 17:44:23 -04:00
Anas Nashif 470c5f3189 tests: remove testcase.ini files
We now use yaml files.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Anas Nashif cc24f4b03c tests: samples: convert testcase files to yaml
This will prepare test cases and samples with metadata and information
that will be consumed by the sanitycheck script which will be changed to
parse YAML files instead of ini.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-21 20:56:53 -04:00
Kumar Gala c7bc909914 tests/ztest: rename assert macros to be zephyr specific
ztest has a number of assert style macros and used a baseline assert()
that varies from the system definition of assert() so lets rename
everything as zassert to be clear.

Change-Id: I7f176b3bae94d1045054d665be8b5bda947e5bb0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-13 21:17:33 +00:00
Anas Nashif 2fceb7260d tests: move fs test to tests/subsys/
Change-Id: Ic9a02cb9dc2376b2818740d31eb8e8a71526cbb8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-09 15:45:18 +00:00