rnpgp / rnp

RNP: high performance C++ OpenPGP library used by Mozilla Thunderbird
https://www.rnpgp.org
Other
192 stars 54 forks source link

Ensure correct work with large packet sizes. #940

Closed ni4 closed 4 years ago

ni4 commented 4 years ago

Description

We need to check whether rnp correctly handles as large as possible packets. This could be checked with zipped and signed 4Gb literal packet, built from single symbol, so it can be compressed to reasonable size to be added to tests suite.

Construct literal packet with largest possible size (4gb), using the 4-byte packet length, and compressed and then signed stream on top of it, and make sure it is processed well with rnp_op_verify() call. Separate test file should be added to rnp_tests() suite.

rrrooommmaaa commented 4 years ago

Looks interesting to me

dewyatt commented 4 years ago

Let's go for it then!

rrrooommmaaa commented 4 years ago

Daniel. Is there a simple way to run only one test with make test command (or any other) from project root?

dewyatt commented 4 years ago

@rrrooommmaaa Yes, you can use ctest. For example, ctest -R rnp_tests.test_stream_dearmor_edge_cases. You can also list the tests with ctest -N (for the full list to show you would have to run make first).

ni4 commented 4 years ago

@rrrooommmaaa once build you may run a single test with 'ctest -V -R rnp_tests.test_name'.

rrrooommmaaa commented 4 years ago

can I push to branch here (for subsequent PR) or do I need to fork?

rrrooommmaaa commented 4 years ago

also, did I understand correctly, that I you want 4G file to be placed in test\data? I used ZIP compression and it's rather big -- 5.2M Should I change compression algo or generate the file during the test?

ni4 commented 4 years ago

@rrrooommmaaa Sorry for a late response. I'll reply with more details in the PR you created.