From 5d227b92a3619aa6330fb3a45dc2ec5e2b4ac9e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Date: Sun, 29 May 2016 21:43:11 +0200 Subject: [PATCH] test-cfs: Fix possible test failure after reboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- examples/cfs-coffee/test-cfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/cfs-coffee/test-cfs.c b/examples/cfs-coffee/test-cfs.c index b5068aaa2..2d44b6696 100644 --- a/examples/cfs-coffee/test-cfs.c +++ b/examples/cfs-coffee/test-cfs.c @@ -54,6 +54,7 @@ PROCESS_THREAD(cfs_process, ev, data) uint16_t filesize = 65000; #define CHUNKSIZE 128 + cfs_remove("hej"); fd = cfs_open("hej", CFS_WRITE); if(fd < 0) { printf("could not open file for writing, aborting\n");