Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add a test that checks performance without valgrind #5817

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 28 additions & 7 deletions src/test/obj_sync/TEST0
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
# Copyright 2015-2023, Intel Corporation

#
# src/test/obj_sync/TEST0 -- unit test for PMEM-resident locks
# src/test/obj_sync/TEST0 -- unit test for PMEM-resident locks without valgrind
#

. ../unittest/unittest.sh
# Test cases "m", "r", "c" fail under valgrind.
# This test verifies that the tests run normally
# until these errors are fixed: https://github.com/pmem/pmdk/issues/5646
# and https://github.com/pmem/pmdk/issues/5727

# XXX disable the test until https://github.com/pmem/pmdk/issues/5727
# and https://github.com/pmem/pmdk/issues/5643 are fixed.
DISABLED
. ../unittest/unittest.sh

require_test_type medium

Expand All @@ -19,8 +20,28 @@ require_build_type debug nondebug

setup

expect_normal_exit ./obj_sync$EXESUFFIX m 50 5

LOG=out${UNITTEST_NUM}.log
LOG_TEMP=out${UNITTEST_NUM}_part.log
ERR=err${UNITTEST_NUM}.log
ERR_TEMP=err${UNITTEST_NUM}_part.log

rm -f $LOG $LOG_TEMP $ERR $ERR_TEMP

VALGRIND_DISABLED=y expect_normal_exit ./obj_sync$EXESUFFIX m 50 5
cat $LOG >> $LOG_TEMP
cat $ERR >> $ERR_TEMP
VALGRIND_DISABLED=y expect_normal_exit ./obj_sync$EXESUFFIX r 50 5
cat $LOG >> $LOG_TEMP
cat $ERR >> $ERR_TEMP
VALGRIND_DISABLED=y expect_normal_exit ./obj_sync$EXESUFFIX c 50 5
cat $LOG >> $LOG_TEMP
cat $ERR >> $ERR_TEMP
VALGRIND_DISABLED=y expect_normal_exit ./obj_sync$EXESUFFIX t 50 5
cat $LOG >> $LOG_TEMP
cat $ERR >> $ERR_TEMP

mv $LOG_TEMP $LOG
mv $ERR_TEMP $ERR
check

pass
3 changes: 3 additions & 0 deletions src/test/obj_sync/err0.log.match
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{$(nW)obj_sync.c:$(N) mutex_$(nW)_worker} obj_sync$(nW)TEST0: pmemobj_mutex_lock
{$(nW)obj_sync.c:$(N) rwlock_$(nW)_worker} obj_sync$(nW)TEST0: pmemobj_rwlock_wrlock
{$(nW)obj_sync.c:$(N) cond_$(nW)_worker} obj_sync$(nW)TEST0: pmemobj_cond_signal
{$(nW)obj_sync.c:$(N) timed_$(nW)_worker} obj_sync$(nW)TEST0: pmemobj_mutex_timedlock: Invalid argument
9 changes: 9 additions & 0 deletions src/test/obj_sync/out0.log.match
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
obj_sync$(nW)TEST0: START: obj_sync
$(nW)obj_sync$(nW) $(nW) $(N) $(N)
obj_sync$(nW)TEST0: DONE
obj_sync$(nW)TEST0: START: obj_sync
$(nW)obj_sync$(nW) $(nW) $(N) $(N)
obj_sync$(nW)TEST0: DONE
obj_sync$(nW)TEST0: START: obj_sync
$(nW)obj_sync$(nW) $(nW) $(N) $(N)
obj_sync$(nW)TEST0: DONE
obj_sync$(nW)TEST0: START: obj_sync
$(nW)obj_sync$(nW) $(nW) $(N) $(N)
obj_sync$(nW)TEST0: DONE
Loading