History log of /spdk/test/unit/lib/blob/blob.c/blob_ut.c (Results 76 – 100 of 222)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 3c31f6dc 02-Sep-2020 Jim Harris <james.r.harris@intel.com>

blob_ut: add create_loop

This test repeatedly creates and deletes blobs to
confirm that the used_md_pages and used_clusters
bit arrays are managed properly. This test exposed
the bug reported in #1

blob_ut: add create_loop

This test repeatedly creates and deletes blobs to
confirm that the used_md_pages and used_clusters
bit arrays are managed properly. This test exposed
the bug reported in #1590 which has now been fixed.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-ID: If5d7b7f03cc2fb9daac928573c73430b74ea9a51
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4038
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# ed7848f2 19-Aug-2020 Jim Harris <james.r.harris@intel.com>

blob: handle overlapping open case

We only create one spdk_blob object for a given blob, and just
increase the ref_count if it is opened multiple times. bs_open_blob
would do the lookup for existin

blob: handle overlapping open case

We only create one spdk_blob object for a given blob, and just
increase the ref_count if it is opened multiple times. bs_open_blob
would do the lookup for existing opened blobs.

But if the blob is opened again, before the previous open operation
has completed, we would end up with two spdk_blob objects for the same
blob.

Solution is to do another lookup when the open operation completes.
If we find the blob, free the one we just finished opening and return
the existing one instead.

Also added unit test that failed on the existing code but passes now
with this patch.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reported-by: Mike Cui
Change-Id: I00c3a913b413deddf06f0b63f7a669efb2b5658f

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3855
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


Revision tags: v20.07, v20.07-rc1, v20.04.1, v20.01.2
# b5d68d59 14-May-2020 Seth Howell <seth.howell@intel.com>

lib/blob: remove _spdk prefix from all functions.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idb33816e5b66266987845172c27c87667ac0a596
Reviewed-on: https://review.spdk.io/gerrit/c

lib/blob: remove _spdk prefix from all functions.

Signed-off-by: Seth Howell <seth.howell@intel.com>
Change-Id: Idb33816e5b66266987845172c27c87667ac0a596
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2437
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>

show more ...


Revision tags: v20.04
# 7f007b44 27-Apr-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

lib/blob: clear blobid and md_page on blob_create failure

Blobid and md_page is claimed as first step of blob creation.
If blob creation failed, both should returned to be used by
other blobs.

This

lib/blob: clear blobid and md_page on blob_create failure

Blobid and md_page is claimed as first step of blob creation.
If blob creation failed, both should returned to be used by
other blobs.

This caused multiple reports of:
"Metadata page 1 crc mismatch"
when loading blobstore due to md_pages not actually containing
the written out md pages.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I495452c578d879f749281cebf8975eb2c1c7f79a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2057
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>

show more ...


Revision tags: v20.04-rc1, v20.01.1
# 28a44891 04-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

lib/blob: add error path on persisting dirty bs

super->clean value signifies if blobstore was unloaded
cleanly.
If it was not, then during bs_load the _spdk_bs_recover()
procedure if called.

Meanwh

lib/blob: add error path on persisting dirty bs

super->clean value signifies if blobstore was unloaded
cleanly.
If it was not, then during bs_load the _spdk_bs_recover()
procedure if called.

Meanwhile bs->clean is always set to 1 after load, causing very first
blob_persist to also re-write super block with the super->clean
set to 0. To signify that md has changed and possibly trigger
the recovery if clean bs unload does not occur.
When the re-write of super block succeeds the bs->clean is set to 0,
because further re-writes of super block are not needed on next
blob persist.

This patch resolves issue when:
1) reading super block fails - execution should backoff, to prevent
writing an empty buffer as super block !
2) writing super->clean = 0 to the super block fails - execution
again should fail, and bs->clean should not be set to 0. It will
cause next persist to attempt re-write again.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia07cc5c6c107310059b50886edb7283c176b9169
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1164
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# a1591e23 05-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: verify success of spdk_bs_create_snapshot() on power failure

This change verifies that not only it is possible to open
the snapshot, but also the spdk_bs_create_snapshot() reported
success.

ut/blob: verify success of spdk_bs_create_snapshot() on power failure

This change verifies that not only it is possible to open
the snapshot, but also the spdk_bs_create_snapshot() reported
success.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifb7fcc91802c838710f1f9be41090057268a5900
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1262
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# 2eada474 05-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: recreate bs on each create_snapshot power fail UT

blob_create_snapshot_power_failure() test always attempted
snapshot creation until the snapshot did open.
Which meant that on bs reload aft

ut/blob: recreate bs on each create_snapshot power fail UT

blob_create_snapshot_power_failure() test always attempted
snapshot creation until the snapshot did open.
Which meant that on bs reload after dirty shutdown,
the original blob might be in unrecoverable state.

UT did not verify create call beyond that point.
Next patch will stop after snapshot is possible to be opened,
AND the spdk_bs_create_snapshot() returned success.

This patch makes it easier to recreate same starting
conditions after snapshot did not open.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1901b29a8319b2203a855e7879821ed3850f4917
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1261
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# 0f515737 05-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

lib/blob: merge EP of a clone when deleting a snapshot

In general it is not possible to delete snapshot when
there are clones on top of it.
There is special case when there is just a single clone
on

lib/blob: merge EP of a clone when deleting a snapshot

In general it is not possible to delete snapshot when
there are clones on top of it.
There is special case when there is just a single clone
on top that snapshot.

In such case the clone is 'merged' with snapshot.
Unallocated clusters in clone, are filled with the ones
in snapshot (if allocated there).

Similar behavior should have occurred for extent pages.

This patch adds the implementation for moving EP from
snapshot to clone along with UT.

The UT exposes the issue by allowing delete_blob
to proceed beyond just unrecoverable snapshot blob.

Fixes #1291

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib2824c5737021f8e8d9b533a4cd245c12e6fe9fa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1163
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# b5ef8c45 05-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: recreate bs and blobs for each iteration of power fail UT

blob_delete_snapshot_power_failure() test always attempted
snapshot deletion until the snapshot did not open.
Which meant that on b

ut/blob: recreate bs and blobs for each iteration of power fail UT

blob_delete_snapshot_power_failure() test always attempted
snapshot deletion until the snapshot did not open.
Which meant that on bs reload after dirty shutdown,
the snapshot was in unrecoverable state.

UT did not verify delete call beyond that point.
Next patch will stop after snapshot is unrecoverable,
AND the spdk_bs_delete_blob() returned success.

This patch makes it easier to recreate same starting
conditions after snapshot did not load.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7e14e8dadaaef4aa3287ebd376465253466b2362
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1162
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>

show more ...


# aba98412 18-Feb-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: add setup/clean for blob creation

Added new setup/cleanup functions for a suite of
unit tests that use a particular blob through out the
tests.

This simplifies the contents of particular U

ut/blob: add setup/clean for blob creation

Added new setup/cleanup functions for a suite of
unit tests that use a particular blob through out the
tests.

This simplifies the contents of particular UTs,
and brings forward focus of each UT.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib7d69b90fcbe8e6a0ba303475fcbaeb90fa110a7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/945
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# 104d4c0a 09-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: add blob deletion at the end of UT

Some of the unit tests were only closing a blob,
without deleting it at the end of unit tests.
This is valid behaviour, but to later simplify
the setup/cl

ut/blob: add blob deletion at the end of UT

Some of the unit tests were only closing a blob,
without deleting it at the end of unit tests.
This is valid behaviour, but to later simplify
the setup/cleanup - a delete blob was added.

This change was made to unit tests where,
it was not focus of particular UT.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I7e338ba6fcb63af26658e8968971a6d56f70807b
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1203
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>

show more ...


# cc991aad 09-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: simplify blob closing and deletion

Operation of closing and deleting a blob is common
throughout the tests.

This patch creates helper function ut_blob_close_and_delete(),
to do exactly tha

ut/blob: simplify blob closing and deletion

Operation of closing and deleting a blob is common
throughout the tests.

This patch creates helper function ut_blob_close_and_delete(),
to do exactly that with the right asserts.
Throughout the UT this function replaces all instances where
blob is closed and deleted, when it is not the subject of
particular unit test (focus is on other functionality).

It will allow to later use it in setup/cleanup functions
for UT suite - similar to bs init.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic56594da8cd4c442b62890d62961b44771059679
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1202
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# 5df4f50f 06-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: simplify blob creation and opening

Operation of creating a blob (with or w/o opts),
then opening it through out the tests is quite common.

This patch creates helper function ut_blob_create

ut/blob: simplify blob creation and opening

Operation of creating a blob (with or w/o opts),
then opening it through out the tests is quite common.

This patch creates helper function ut_blob_create_and_open(),
to do exactly that with the right asserts.
Throughout the UT this function replaces all instances where
blob is created and opened, when it is not the subject of
particular unit test (focus is on other functionality).

It will allow to later use it in setup/cleanup functions
for UT suite - similar to bs init.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia541b855d154503f824bfa3909bcfeac649c5853
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1201
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>

show more ...


# 95ebed3c 18-Feb-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: always use local blobid

Always call API on blobid that was received from blob
create, instead of relying on global one.

Where necessary added declaration and assignment.

Signed-off-by: To

ut/blob: always use local blobid

Always call API on blobid that was received from blob
create, instead of relying on global one.

Where necessary added declaration and assignment.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I3529b4d5e86c1301bb64268029a57873f9f600cb
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/944
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# 114da5a2 18-Feb-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: always use local blob pointer

Always call API on pointer that was received from blob
open, instead of relying on global one.

Where necessary added declaration and assignment.

Signed-off-b

ut/blob: always use local blob pointer

Always call API on pointer that was received from blob
open, instead of relying on global one.

Where necessary added declaration and assignment.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I15531111201d071c471f5be79ce18ff508631677
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/943
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# 25a01035 13-Feb-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: put setup/clean of tests into common function

A lot of unit tests require only creation of a blobstore
then unload it at the end.
This code can be made common and invoked automatically by
C

ut/blob: put setup/clean of tests into common function

A lot of unit tests require only creation of a blobstore
then unload it at the end.
This code can be made common and invoked automatically by
CUnit with CU_add_suite_with_setup_and_teardown().
Those functions are called before and after each test in suite.

This should simplify the unit tests by removing the common
code.

Following patches will add further suites with different
setup/cleanup to reduce common code even more.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I984cde2381f4461e188e06050355024a88ebfca9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/932
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# 935fbcdf 06-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: do not clear g_bs in helper functions

Next patch in series adds setup/cleanup functions
that use g_bs for its operation.

Particular unit tests should not leave the g_bs
unassigned, if clea

ut/blob: do not clear g_bs in helper functions

Next patch in series adds setup/cleanup functions
that use g_bs for its operation.

Particular unit tests should not leave the g_bs
unassigned, if cleanup is supposed to unload it.
It applies to helper functions to reload/dirty_load.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I6e022b6c762981c2c70ebf31f4981a17f54f3591
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1182
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# a9f76ed2 06-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: Do not initialize default bs opts

Some of the unit tests initalized bs opts,
event if they were left unmodified.

There is no need to perform this operation,
as spdk_bs_init() can accept NU

ut/blob: Do not initialize default bs opts

Some of the unit tests initalized bs opts,
event if they were left unmodified.

There is no need to perform this operation,
as spdk_bs_init() can accept NULL as bs_opts parameter
to just initialize default values.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iacea1fa9d53796b8c359b611092cc63c6bce4094
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1181
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# f422548e 02-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: reload bs and verify xattr in blob_persist test

This patch adds better check if the xattr was removed.
It will identify potential bugs when first md sync
takes precedence over the second md

ut/blob: reload bs and verify xattr in blob_persist test

This patch adds better check if the xattr was removed.
It will identify potential bugs when first md sync
takes precedence over the second md sync.

As per suggestion in
https://review.spdk.io/gerrit/c/spdk/spdk/+/774/6/test/unit/lib/blob/blob.c/blob_ut.c#7655

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I463f2455614ef11cc1512dc2fb1972ba1f024337
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1109
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# 682e7c17 02-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: add common function for dirty shutdown

Operation of dirty shutdown of blobstore and reloading
it occurs often enough in UT to provide a common function
to perform it.

Added ut_bs_dirty_loa

ut/blob: add common function for dirty shutdown

Operation of dirty shutdown of blobstore and reloading
it occurs often enough in UT to provide a common function
to perform it.

Added ut_bs_dirty_load() to facilitate this.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I0079dfabd64eaec6495db02fe200be1d6116f0c7
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1092
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# b8fedfa3 02-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: add common function to reload blobstore

Operation of unloading and loading blobstore
occurs often enough in UT to provide a common function
to perform it.

Added ut_bs_reload() to facilitat

ut/blob: add common function to reload blobstore

Operation of unloading and loading blobstore
occurs often enough in UT to provide a common function
to perform it.

Added ut_bs_reload() to facilitate this.

Couple occurences in this patch actually fix
test cases where mistakenly opts were not passed.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib46ed395cd134feaa540e00a334ae861872b3ef4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1091
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# 9e6b5aa4 02-Mar-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: always refer to local bs pointer, rather than g_bs

Couple unit tests were still refering to g_bs pointer,
rather than the one local to particular UT.

This patch fixes this.

Signed-off-by:

ut/blob: always refer to local bs pointer, rather than g_bs

Couple unit tests were still refering to g_bs pointer,
rather than the one local to particular UT.

This patch fixes this.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: If343eb561a48c4547d499139d76e1db6b2d7f3bf
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1090
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>

show more ...


# 83e8cc3b 18-Feb-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: always use local blobstore pointer

Always call API on pointer that was received from blobstore
initialization or load, instead of relying on global one.

Where necessary added declaration,

ut/blob: always use local blobstore pointer

Always call API on pointer that was received from blobstore
initialization or load, instead of relying on global one.

Where necessary added declaration, assignment and asserts.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic4198ac984c13a8b77428deaa32ce9864e6750c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/942
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# 56cec808 17-Feb-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: make use of simpler CUnit test addition

CUnit provides a helper macro CU_ADD_TEST() that
simplifies using CU_add_test() function.
Test name no longer needs to be provided,
instead test is n

ut/blob: make use of simpler CUnit test addition

CUnit provides a helper macro CU_ADD_TEST() that
simplifies using CU_add_test() function.
Test name no longer needs to be provided,
instead test is named after test function name.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9f5d9e0d8e72ab36b2a5c04e33c336e6c0a1fa6a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/931
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


# b88f0c4f 17-Feb-2020 Tomasz Zawadzki <tomasz.zawadzki@intel.com>

ut/blob: simplify error handling for UT

Failure to prepare CUnit for tests is always a fatal error,
and application exits.
Most test managment functions in CUnit set some CU_ErrorCode,
that can be r

ut/blob: simplify error handling for UT

Failure to prepare CUnit for tests is always a fatal error,
and application exits.
Most test managment functions in CUnit set some CU_ErrorCode,
that can be retrived by return code from a function or CU_get_error().

Thus usual structure of UT in SPDK checked every output from every
test managment function.
There is a helper function CU_set_error_action() that when set to
CUEA_ABORT, will abort the application run with proper error return code.
Along with nice error message.

For example if one were to add same UT twice:
"Aborting due to error #32: Test having this name already in suite."
Application return code set to 32.

Using CU_set_error_action(CUEA_ABORT), removes the need for error checking
on test managment functions in CUnit.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ida7de5e040b714509e79957d47a006ee518a42b8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/930
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>

show more ...


123456789