Can't run some test cases. #168

Closed
opened 2018-07-05 19:50:13 +02:00 by roylee17 · 2 comments
roylee17 commented 2018-07-05 19:50:13 +02:00 (Migrated from github.com)

Do I need to perform some pre-test setup?
(I'm running on MacOS)

$ make -j src/test/test_lbrycrd
$ src/test/test_lbrycrd --run_test=claimtriebranching_tests
Running 14 test cases...
unknown location:0: fatal error: in "claimtriebranching_tests/claimtriebranching_claim": memory access violation at address: 0x6d7d935f: no mapping at fault address
test/claimtriebranching_tests.cpp:205: last checkpoint

*** 1 failure is detected in the test module "Bitcoin Test Suite"
Database handles still open at environment close
Open database handle: unnamed/wallet.dat

Some test cases run without problem.

$ src/test/test_lbrycrd --run_test=claimtrie_tests/claimtrie_merkle_hash

Running 1 test case...

*** No errors detected
Do I need to perform some pre-test setup? (I'm running on MacOS) ``` $ make -j src/test/test_lbrycrd $ src/test/test_lbrycrd --run_test=claimtriebranching_tests ``` ``` Running 14 test cases... unknown location:0: fatal error: in "claimtriebranching_tests/claimtriebranching_claim": memory access violation at address: 0x6d7d935f: no mapping at fault address test/claimtriebranching_tests.cpp:205: last checkpoint *** 1 failure is detected in the test module "Bitcoin Test Suite" Database handles still open at environment close Open database handle: unnamed/wallet.dat ``` Some test cases run without problem. ``` $ src/test/test_lbrycrd --run_test=claimtrie_tests/claimtrie_merkle_hash Running 1 test case... *** No errors detected ```
bvbfan commented 2018-07-12 21:28:09 +02:00 (Migrated from github.com)

You are right Roy. Pointer should be initialized to NULL, since this not failing on Linux, due to null-initialized memory or some debug option in make check.
Also in https://github.com/lbryio/lbrycrd/blob/master/src/test/claimtrie_tests.cpp#L87
@kaykurokawa should be noted.

You are right Roy. Pointer should be initialized to NULL, since this not failing on Linux, due to null-initialized memory or some debug option in make check. Also in https://github.com/lbryio/lbrycrd/blob/master/src/test/claimtrie_tests.cpp#L87 @kaykurokawa should be noted.
lbrynaut commented 2018-07-15 01:02:44 +02:00 (Migrated from github.com)

You are right Roy. Pointer should be initialized to NULL, since this not failing on Linux, due to null-initialized memory or some debug option in make check.
Also in https://github.com/lbryio/lbrycrd/blob/master/src/test/claimtrie_tests.cpp#L87
@kaykurokawa should be noted.

@bvbfan The line you pointed out does have a bug, but initializing the value to null is not the optimal solution. Properly ensuring the variable is allocated is the actual fix. If instead the caller really wanted to pass null, then NULL should be passed, not a variable pointing to NULL. A subtle difference, but noted for clarification.

This issue is resolved by #173

> You are right Roy. Pointer should be initialized to NULL, since this not failing on Linux, due to null-initialized memory or some debug option in make check. Also in https://github.com/lbryio/lbrycrd/blob/master/src/test/claimtrie_tests.cpp#L87 @kaykurokawa should be noted. @bvbfan The line you pointed out does have a bug, but initializing the value to null is not the optimal solution. Properly ensuring the variable is *allocated* is the actual fix. If instead the caller really wanted to pass null, then NULL should be passed, not a variable pointing to NULL. A subtle difference, but noted for clarification. This issue is resolved by #173
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbrycrd#168
No description provided.