open-quantum-safe / liboqs

C library for prototyping and experimenting with quantum-resistant cryptography
https://openquantumsafe.org/
Other
1.91k stars 465 forks source link

Cannot open tmp file for reading when running test_kem_mem and test_sig_mem #1885

Closed yifanluo2006 closed 2 months ago

yifanluo2006 commented 3 months ago

Describe the bug When attempting to run test_kem_mem or test_sig_mem encapsulation/sign or decapsulation/verify, an error is returned stating cannot read tmp file for reading. To Reproduce Steps to reproduce the behavior:

  1. cd build
  2. cd tests
  3. ./test_kem_mem BIKE-L1 2

Note that this apply to any kem or sig algorithm

Expected behavior "Couldn't open tmp/oqs-temp-file-BIKE-L1pk for reading."

Screenshots

Screenshot 2024-08-09 at 1 19 55 PM

Environment (please complete the following information):

Additional context This can be resolved by writing another script to manually generate and save the tmp files; however, this is rather tedious

baentsch commented 3 months ago

Thanks for the report, @yifanluo2006 This program has not been designed to be run stand-alone but only within the test harness, more specifically test_mem.py.

If you see a need for it to run independently, please, by all means provide a PR (and accompanying documentation) to improve this -- while maintaining the semantics allowing CI (incl. the above test script) to keep working OK.

dstebila commented 2 months ago

Closing as this is intended behaviour as noted in https://github.com/open-quantum-safe/liboqs/issues/1885#issuecomment-2277227182. If change in behaviour is desired, please follow up with a PR to improve.