-
Notifications
You must be signed in to change notification settings - Fork 20
chore(python): create custom Makefile commands for fuzzing test vectors #1634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: fuzzTestingInTestVectors
Are you sure you want to change the base?
Changes from 1 commit
d202f77
678e6cd
15ee691
c5108dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -254,3 +254,31 @@ test_decrypt_encrypt_vectors_rust: | |
|
|
||
| test_decrypt_encrypt_vectors_go: | ||
| go -C runtimes/go/ImplementationFromDafny-go run ImplementationFromDafny.go decrypt --manifest-path=.. | ||
|
|
||
| # Fuzz Testing Commands | ||
|
|
||
| # Generate fuzzed test vectors in the Python runtime directory (50 vectors) | ||
| test_generate_fuzz_vectors: | ||
| cp dafny/TestVectorsAwsCryptographicMaterialProviders/test/keys.json runtimes/python/ | ||
| cd runtimes/python && python3 fuzz_generator.py --num-vectors 50 | ||
|
||
| @echo "fuzzed test vectors generated in runtimes/python/" | ||
|
||
|
|
||
| # Run fuzz interoperability test from one language to another | ||
| # Usage: make test_fuzz_interop ENCRYPT_LANG=go DECRYPT_LANG=python | ||
| test_fuzz_interop: | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interop test does not need this why do we need this for interoperability for fuzzed test? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is blocking because we will be have to maintain two different process where we can have just one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name might be misleading, but essentially I need the setup and runtime implementations that are done in interop to run cross-runtime testing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this command, its hard to re-use the existing CI workflow. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interop does But, Interop does not have make command like this but fuzz test does. So, either we need to have this makefile command and change how interop test works or change this to what interop test does unless introducing a new process has a reason. |
||
| @echo "Testing interoperability from $(ENCRYPT_LANG) to $(DECRYPT_LANG)" | ||
| $(MAKE) test_generate_fuzz_vectors | ||
| @if [ "$(ENCRYPT_LANG)" != "python" ]; then \ | ||
| echo "Copying test vectors to $(ENCRYPT_LANG) runtime"; \ | ||
| cp runtimes/python/manifest.json runtimes/$(ENCRYPT_LANG)/; \ | ||
| cp runtimes/python/keys.json runtimes/$(ENCRYPT_LANG)/; \ | ||
| fi | ||
| @echo "Encrypting with $(ENCRYPT_LANG) runtime" | ||
| $(MAKE) test_encrypt_vectors_$(ENCRYPT_LANG) | ||
| @if [ "$(ENCRYPT_LANG)" != "$(DECRYPT_LANG)" ]; then \ | ||
| echo "Copying encrypted manifest and keys to $(DECRYPT_LANG) runtime"; \ | ||
| cp runtimes/$(ENCRYPT_LANG)/manifest.json runtimes/$(DECRYPT_LANG)/; \ | ||
| cp runtimes/$(ENCRYPT_LANG)/keys.json runtimes/$(DECRYPT_LANG)/; \ | ||
| fi | ||
| @echo "Decrypting with $(DECRYPT_LANG) runtime" | ||
| $(MAKE) test_decrypt_encrypt_vectors_$(DECRYPT_LANG) | ||
Uh oh!
There was an error while loading. Please reload this page.