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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>