Spdk/test/unit/lib/blobfs/blobfs_sync_ut
Ziye Yang 9c48768aa0 ut/blobfs: fix blobfs_sync_ut hang issue when testing file_length
we use this statement:
while (g_file->length_flushed != buf_length) {} in
file_length function.

It means that in this test case, length_flushed are
accessed by two different threads, so better to
use another new variable length_flused with volatile
before the variable definition. Then our ut will not hang.

Change-Id: I6152a4ba3f27f0fad1c8c2baa71324a36a2fb9e8
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456580
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-06-04 04:37:50 +00:00
..
.gitignore test/unit: move unittest.sh and dependencies here. 2018-03-13 18:44:34 -04:00
blobfs_sync_ut.c ut/blobfs: fix blobfs_sync_ut hang issue when testing file_length 2019-06-04 04:37:50 +00:00
Makefile test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00