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
Add meta state testing tools #944
Conversation
# Conflicts: # core-processor/src/executor.rs # core-processor/src/processor.rs # core/src/env.rs # gtest/src/manager.rs # runtime/src/lib.rs
# Conflicts: # runtime/src/lib.rs
cbb7789Pallet tests (values are in nanosegconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
4595e04Pallet tests (values are in nanoseconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
bfc96adPallet tests (values are in nanoseconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
b317eaePallet tests (values are in nanoseconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
de07b84Pallet tests (values are in nanoseconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
46f3586Pallet tests (values are in nanoseconds)Total execution time
name = pallet-gas
name = pallet-gear
name = pallet-gear-debug
name = pallet-gear-messenger
name = pallet-gear-payment
name = pallet-gear-program
name = pallet-usage
Runtime tests (values are in nanoseconds)Total execution time
name = Async RwLock
name = Async init
name = Async-await
name = Async-duplicates-sync
name = Async-multisig (well known cases)
name = Async-sign (well known cases)
name = Basic capacitor check
name = Decoder
name = Futures-unordered
name = Incomplete-async-payloads
name = Memory test
name = Messages to failed program are handled properly
name = Meta ping (simple check)
name = Multiping
name = Ping-pong
name = Program_id test
name = State-rollback
name = Test create_program sys-call
name = Trap test
name = Wait test
name = basic
name = collector-1
name = guestbook test
name = gui test
|
Codecov Report
@@ Coverage Diff @@
## master #944 +/- ##
==========================================
- Coverage 74.93% 74.86% -0.07%
==========================================
Files 94 96 +2
Lines 8793 9008 +215
==========================================
+ Hits 6589 6744 +155
- Misses 2204 2264 +60
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is extremely copy-paste, I am not sure it is acceptable to support three "backends" instead of two 😞
# Conflicts: # core-backend/wasmtime/src/env.rs # runtime/src/lib.rs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's probably strange, but I want you to a bit cut the functionality you added, apply restrictions for return type for meta state functions and reply copy-paste with using real ext and newly created forbidden sys calls functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool
The last things to do is to resolve given comments: especially provide public api!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, last comments 👍
Resolves #862.
Release Notes: New API in
gtest::Program
has been provided to have the ability to execute the program's meta functions. This allows covering meta functions by tests. The new API allows executing meta functions with incoming payload or without it. The payload can be provided as a byte array or as a struct that implementsEncode
andDecode
traits. Refer to Program::meta_state* functions for more details. You can find usage examples in our Supply Chain dApp.