This test could sometimes fail because of a lack of free contiguous
pages in the file system. Fix this by removing the created files at the
end of each test. Besides, the test files do not have to be removed at
the beginning of each test since the file system is initially formatted.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
The r variable was used instead of i to fill the buffer, resulting in
the end of the test loop after only a single iteration. The file was not
even closed at the end of each iteration although it is opened at the
beginning of each iteration, so the available file descriptors would
very quickly be exhausted.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
The filenames were mixed up between some of the tests, thus breaking the
purpose of these tests.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Remove the file at the beginning of the test, before opening it for
writing, in order to start the test with an empty file system, not only
after flashing the test, but also following every reboot.
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Fix this build warning, which is generated if micro logs are enabled:
In file included from ../../core/cfs/cfs-coffee.c:59:0:
../../core/cfs/cfs-coffee.c: In function 'read_log_page':
../../cpu/cc2538/./cfs-coffee-arch.h:145:24: warning: passing argument 1 of 'cfs_coffee_arch_read' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
cfs_coffee_arch_read((buf), (size), (offset))
^
../../core/cfs/cfs-coffee.c:757:3: note: in expansion of macro 'COFFEE_READ'
COFFEE_READ(lp->buf, lp->size, base);
^
../../cpu/cc2538/./cfs-coffee-arch.h:176:6: note: expected 'void *' but argument is of type 'const char *'
void cfs_coffee_arch_read(void *buf, unsigned int size, cfs_offset_t offset);
^
COFFEE_READ() needs to write to lp->buf, so the target type of this
pointer cannot be qualified as "const".
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
Two errors have been spotted, when IPv6 is enabled in the ravenusb
Project-Makefile:
#CONTIKI_NO_NET=1
CONTIKI_WITH_IPV6=1
The compile error results from a variable name mismatch in cdc_task.c
The variable 'r' is undeclared and should be renamed to 'route'
The linker also fails with 'undefined references'
This has been mediated by adding 'core/net' to Modules in the
Project-Makefile.