|
56 | 56 | test_phash2_with_small_unaligned_sub_binary/1, |
57 | 57 | test_phash2_with_large_bin/1, |
58 | 58 | test_phash2_with_large_unaligned_sub_binary/1, |
59 | | - test_phash2_with_super_large_unaligned_sub_binary/1]). |
| 59 | + test_phash2_with_super_large_unaligned_sub_binary/1, |
| 60 | + test_iovblockhash/1]). |
60 | 61 |
|
61 | 62 | %% |
62 | 63 | %% Define to run outside of test server |
@@ -115,6 +116,7 @@ all() -> |
115 | 116 | test_phash2_10MB_plus_bin, |
116 | 117 | test_native_record, |
117 | 118 | md5_large, |
| 119 | + test_iovblockhash, |
118 | 120 | {group, phash2_benchmark_tests}, |
119 | 121 | {group, phash2_benchmark}]. |
120 | 122 |
|
@@ -640,6 +642,22 @@ duplicate_iolist(IOList, 0) -> |
640 | 642 | duplicate_iolist(IOList, NrOfTimes) -> |
641 | 643 | duplicate_iolist([IOList, IOList], NrOfTimes - 1). |
642 | 644 |
|
| 645 | +%% This testcase needs >3 GB of free memory. |
| 646 | +test_iovblockhash(Config) when is_list(Config) -> |
| 647 | + run_when_enough_resources( |
| 648 | + fun() -> |
| 649 | + {ok, Peer, N} = ?CT_PEER(), |
| 650 | + erpc:call(N, |
| 651 | + fun() -> |
| 652 | + test_iovblockhash_1() |
| 653 | + end), |
| 654 | + peer:stop(Peer) |
| 655 | + end). |
| 656 | + |
| 657 | +test_iovblockhash_1() -> |
| 658 | + BigBin = binary:copy(<<0>>, 3 bsl 30), |
| 659 | + _ = term_to_iovec(BigBin, [local]), |
| 660 | + ok. |
643 | 661 |
|
644 | 662 | %% This functions is written very carefully so that the binaries |
645 | 663 | %% created are released as quickly as possible. If they are not released |
|
0 commit comments