util/cpuset: fix and enable ut
One of bugs wasn't catched because unit tests for util/cpuset wasn't enabled. This patch fixes bug and enables unit test. Change-Id: I5a2d7ad76256439e3a13efc8ca51dd4b21a20e0a Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com> Reviewed-on: https://review.gerrithub.io/c/440020 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
parent
4cbdeb9479
commit
3d7bf0a6ff
@ -216,10 +216,10 @@ test_cpuset_fmt(void)
|
|||||||
for (lcore = 0; lcore < SPDK_CPUSET_SIZE; lcore++) {
|
for (lcore = 0; lcore < SPDK_CPUSET_SIZE; lcore++) {
|
||||||
spdk_cpuset_set_cpu(core_mask, lcore, true);
|
spdk_cpuset_set_cpu(core_mask, lcore, true);
|
||||||
}
|
}
|
||||||
for (i = 0; i < SPDK_CPUSET_SIZE / 4 - 1; i++) {
|
for (i = 0; i < SPDK_CPUSET_SIZE / 4; i++) {
|
||||||
hex_mask_ref[i] = 'f';
|
hex_mask_ref[i] = 'f';
|
||||||
}
|
}
|
||||||
hex_mask_ref[SPDK_CPUSET_SIZE / 4 - 1] = '\0';
|
hex_mask_ref[SPDK_CPUSET_SIZE / 4] = '\0';
|
||||||
|
|
||||||
hex_mask = spdk_cpuset_fmt(core_mask);
|
hex_mask = spdk_cpuset_fmt(core_mask);
|
||||||
CU_ASSERT(hex_mask != NULL);
|
CU_ASSERT(hex_mask != NULL);
|
||||||
|
@ -133,6 +133,7 @@ $valgrind $testdir/lib/thread/thread.c/thread_ut
|
|||||||
|
|
||||||
$valgrind $testdir/lib/util/base64.c/base64_ut
|
$valgrind $testdir/lib/util/base64.c/base64_ut
|
||||||
$valgrind $testdir/lib/util/bit_array.c/bit_array_ut
|
$valgrind $testdir/lib/util/bit_array.c/bit_array_ut
|
||||||
|
$valgrind $testdir/lib/util/cpuset.c/cpuset_ut
|
||||||
$valgrind $testdir/lib/util/crc16.c/crc16_ut
|
$valgrind $testdir/lib/util/crc16.c/crc16_ut
|
||||||
$valgrind $testdir/lib/util/crc32_ieee.c/crc32_ieee_ut
|
$valgrind $testdir/lib/util/crc32_ieee.c/crc32_ieee_ut
|
||||||
$valgrind $testdir/lib/util/crc32c.c/crc32c_ut
|
$valgrind $testdir/lib/util/crc32c.c/crc32c_ut
|
||||||
|
Loading…
Reference in New Issue
Block a user