[rtems commit] fsjffs2gc01: Fix sporadic test failures

Sebastian Huber sebh at rtems.org
Mon Nov 6 08:06:40 UTC 2017


Module:    rtems
Branch:    master
Commit:    d71542c8bef50261bc3904ef6a17f0b6087d04d9
Changeset: http://git.rtems.org/rtems/commit/?id=d71542c8bef50261bc3904ef6a17f0b6087d04d9

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Nov  6 09:05:30 2017 +0100

fsjffs2gc01: Fix sporadic test failures

---

 testsuites/fstests/fsjffs2gc01/init.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/testsuites/fstests/fsjffs2gc01/init.c b/testsuites/fstests/fsjffs2gc01/init.c
index 329f734..0691fb7 100644
--- a/testsuites/fstests/fsjffs2gc01/init.c
+++ b/testsuites/fstests/fsjffs2gc01/init.c
@@ -262,6 +262,14 @@ void test(void)
 
   init_keg();
 
+  /*
+   * Ensure that jiffies != 0, to use most likely path in
+   * jffs2_mark_node_obsolete().
+   */
+  while (rtems_clock_get_ticks_since_boot() == 0) {
+    /* Wait */
+  }
+
   fd = open("/", O_RDONLY);
   rtems_test_assert(fd >= 0);
 



More information about the vc mailing list