test/blobfs: Modify the value of g_fserrno

Change-Id: I120f2f6ffe49d0f4bf6b92892e26228010c9c132
Signed-off-by: Jing Xia <jingx.y.xia@intel.com>
Reviewed-on: https://review.gerrithub.io/362100
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: <sys_sgsw@intel.com>
This commit is contained in:
Jing Xia 2017-05-23 22:14:08 +08:00 committed by Daniel Verkamp
parent b23bc69cfa
commit dc8acbf8d5

View File

@ -74,6 +74,7 @@ fs_init(void)
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
fs = g_fs; fs = g_fs;
g_fserrno = 1;
spdk_fs_unload(fs, fs_op_complete, NULL); spdk_fs_unload(fs, fs_op_complete, NULL);
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
@ -156,6 +157,7 @@ fs_open(void)
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
CU_ASSERT(TAILQ_EMPTY(&fs->files)); CU_ASSERT(TAILQ_EMPTY(&fs->files));
g_fserrno = 1;
spdk_fs_unload(fs, fs_op_complete, NULL); spdk_fs_unload(fs, fs_op_complete, NULL);
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
@ -207,6 +209,7 @@ fs_truncate(void)
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
CU_ASSERT(TAILQ_EMPTY(&fs->files)); CU_ASSERT(TAILQ_EMPTY(&fs->files));
g_fserrno = 1;
spdk_fs_unload(fs, fs_op_complete, NULL); spdk_fs_unload(fs, fs_op_complete, NULL);
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
@ -282,6 +285,7 @@ fs_rename(void)
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
CU_ASSERT(TAILQ_EMPTY(&fs->files)); CU_ASSERT(TAILQ_EMPTY(&fs->files));
g_fserrno = 1;
spdk_fs_unload(fs, fs_op_complete, NULL); spdk_fs_unload(fs, fs_op_complete, NULL);
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
@ -385,6 +389,7 @@ channel_ops(void)
spdk_fs_free_io_channel(channel); spdk_fs_free_io_channel(channel);
g_fserrno = 1;
spdk_fs_unload(fs, fs_op_complete, NULL); spdk_fs_unload(fs, fs_op_complete, NULL);
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
g_fs = NULL; g_fs = NULL;
@ -412,6 +417,7 @@ channel_ops_sync(void)
spdk_fs_free_io_channel(channel); spdk_fs_free_io_channel(channel);
g_fserrno = 1;
spdk_fs_unload(fs, fs_op_complete, NULL); spdk_fs_unload(fs, fs_op_complete, NULL);
CU_ASSERT(g_fserrno == 0); CU_ASSERT(g_fserrno == 0);
g_fs = NULL; g_fs = NULL;