Skip to content

Commit

Permalink
test: add error match files
Browse files Browse the repository at this point in the history
Narrow test iteration to get proper error log file.
Revers logic of test to unblock other tests.

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Mar 31, 2023
1 parent 48ab8bf commit f5b38d2
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 24 deletions.
30 changes: 18 additions & 12 deletions src/test/obj_pmalloc_mt/TEST8
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,25 @@

. ../unittest/unittest.sh

require_valgrind 3.10
require_fs_type pmem non-pmem
require_test_type long
configure_valgrind helgrind force-enable
#require_valgrind 3.10
require_fs_type pmem
require_test_type short
#configure_valgrind helgrind force-enable
setup

for n in {1..500}
do
if test -f "rm $DIR/testfile"; then
rm $DIR/testfile
fi
PMEM_IS_PMEM_FORCE=1 expect_normal_exit\
./obj_pmalloc_mt$EXESUFFIX 32 1000 100 $DIR/testfile 1 $n
done
if test -f "rm $DIR/testfile"; then
rm $DIR/testfile
fi
PMEM_IS_PMEM_FORCE=1 expect_normal_exit\
./obj_pmalloc_mt$EXESUFFIX 32 1000 100 $DIR/testfile 1 0

if test -f "rm $DIR/testfile"; then
rm $DIR/testfile
fi

PMEM_IS_PMEM_FORCE=1 expect_abnormal_exit\
./obj_pmalloc_mt$EXESUFFIX 32 1000 100 $DIR/testfile 1 1

check

pass
29 changes: 17 additions & 12 deletions src/test/obj_pmalloc_mt/TEST9
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,24 @@

. ../unittest/unittest.sh

require_valgrind 3.10
require_fs_type pmem non-pmem
require_test_type long
configure_valgrind helgrind force-enable
#require_valgrind 3.10
require_fs_type pmem
require_test_type short
#configure_valgrind helgrind force-enable
setup

for n in {1..50}
do
if test -f "rm $DIR/testfile"; then
rm $DIR/testfile
fi
PMEM_IS_PMEM_FORCE=1 expect_normal_exit\
./obj_pmalloc_mt$EXESUFFIX 32 1000 100 $DIR/testfile 0 $n
done
if test -f "rm $DIR/testfile"; then
rm $DIR/testfile
fi
PMEM_IS_PMEM_FORCE=1 expect_normal_exit\
./obj_pmalloc_mt$EXESUFFIX 32 1000 100 $DIR/testfile 0 0

if test -f "rm $DIR/testfile"; then
rm $DIR/testfile
fi
PMEM_IS_PMEM_FORCE=1 expect_abnormal_exit\
./obj_pmalloc_mt$EXESUFFIX 32 1000 100 $DIR/testfile 0 1

check

pass
1 change: 1 addition & 0 deletions src/test/obj_pmalloc_mt/err8.log.match
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{obj_pmalloc_mt.c:68 realloc_worker} obj_pmalloc_mt/TEST8: Error: assertion failure: ret (0xffffffffffffffff) == 0 (0x0)
2 changes: 2 additions & 0 deletions src/test/obj_pmalloc_mt/err9.log.match
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{obj_pmalloc_mt.c:68 realloc_worker} obj_pmalloc_mt/TEST9: Error: assertion failure: ret (0xffffffffffffffff) == 0 (0x0)
{obj_pmalloc_mt.c:68 realloc_worker} obj_pmalloc_mt/TEST9: Error: assertion failure: ret (0xffffffffffffffff) == 0 (0x0)
1 change: 1 addition & 0 deletions src/test/obj_pmalloc_mt/obj_pmalloc_mt.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,7 @@ main(int argc, char *argv[])
*/
if (Threads == MAX_THREADS) /* don't run for short tests */
run_worker(tx_worker, args);

run_worker(tx3_worker, args);

pmemobj_close(pop);
Expand Down

0 comments on commit f5b38d2

Please sign in to comment.