From afb684635cf19323a932204f3b52c63abb87411b Mon Sep 17 00:00:00 2001 From: plebhash Date: Mon, 20 Jan 2025 11:27:37 -0300 Subject: [PATCH] rm MG standard-coverage-test --- .github/workflows/mg.yaml | 12 - .../standard-coverage-test.json | 226 ------------------ .../standard-coverage-test.sh | 9 - 3 files changed, 247 deletions(-) delete mode 100644 test/message-generator/test/standard-coverage-test/standard-coverage-test.json delete mode 100755 test/message-generator/test/standard-coverage-test/standard-coverage-test.sh diff --git a/.github/workflows/mg.yaml b/.github/workflows/mg.yaml index fa54d38ac..7074f00e9 100644 --- a/.github/workflows/mg.yaml +++ b/.github/workflows/mg.yaml @@ -117,16 +117,6 @@ jobs: - name: Run pool-sri-test-reject-auth run: sh ./test/message-generator/test/pool-sri-test-reject-auth/pool-sri-test-reject-auth.sh - standard-coverage: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Install cargo-llvm-cov - run: cargo install cargo-llvm-cov - - name: Run standard-coverage - run: sh ./test/message-generator/test/standard-coverage-test/standard-coverage-test.sh - sv1-test: runs-on: ubuntu-latest timeout-minutes: 10 @@ -169,7 +159,6 @@ jobs: pool-sri-test-extended_0, pool-sri-test-extended_1, pool-sri-test-reject-auth, - standard-coverage, sv1-test, translation-proxy-broke-pool, translation-proxy-old-share @@ -189,7 +178,6 @@ jobs: [ "${{ needs.pool-sri-test-extended_0.result }}" != "success" ] || [ "${{ needs.pool-sri-test-extended_1.result }}" != "success" ] || [ "${{ needs.pool-sri-test-reject-auth.result }}" != "success" ] || - [ "${{ needs.standard-coverage.result }}" != "success" ] || [ "${{ needs.sv1-test.result }}" != "success" ] || [ "${{ needs.translation-proxy-broke-pool.result }}" != "success" ] || [ "${{ needs.translation-proxy-old-share.result }}" != "success" ]; then diff --git a/test/message-generator/test/standard-coverage-test/standard-coverage-test.json b/test/message-generator/test/standard-coverage-test/standard-coverage-test.json deleted file mode 100644 index a9a8daa93..000000000 --- a/test/message-generator/test/standard-coverage-test/standard-coverage-test.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "version": "2", - "doc": [ - "What this test does:", - "1) launch SRI pool with llvm-cov arguments(no report - see cargo-llvm-cov for options)", - "2) send SetupConnection to the pool", - "3) check that SetupConnectionSuccess is received", - "4) send OpenStandardMiningChannel with request id 89", - "5) check that NewExtendedJob is received", - "6) check that NewPrevHash is received", - "7) check that OpenStandardMiningChannelSuccess with request 89 is received", - "8) kill pool role to allow report to be generated", - "9) generate report with what to ignore and where to output the report(see cargo-llvm-cov for options)" - ], - "common_messages": [ - { - "message": { - "type": "SetupConnection", - "protocol": 0, - "min_version": 2, - "max_version": 2, - "flags": 1, - "endpoint_host": "", - "endpoint_port": 0, - "vendor": "", - "hardware_version": "", - "firmware": "", - "device_id": "" - }, - "id": "setup_connection" - }, - { - "message": { - "type": "SetupConnectionSuccess", - "flags": 0, - "used_version": 2 - }, - "id": "setup_connection_success" - } - ], - "mining_messages": [ - { - "message": { - "type": "OpenStandardMiningChannel", - "request_id": 89, - "user_identity": "", - "nominal_hash_rate": 10, - "max_target": [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1] - }, - "id": "open_standard_mining_channel" - }, - { - "message": { - "type": "SubmitSharesStandard", - "channel_id": 1, - "sequence_number": 0, - "job_id": 0, - "nonce": 927894720, - "ntime": 1671039088, - "version": 536870912 - }, - "id": "submit_shares" - }, - { - "message": { - "type": "SubmitSharesStandard", - "channel_id": 1, - "sequence_number": 0, - "job_id": 0, - "nonce": 1751, - "ntime": 1671116742, - "version": 536870912 - }, - "id": "submit_shares_error" - } - ], - "frame_builders": [ - { - "type": "automatic", - "message_id": "setup_connection_success" - }, - { - "type": "automatic", - "message_id": "setup_connection" - }, - { - "type": "automatic", - "message_id": "open_standard_mining_channel" - }, - { - "type": "automatic", - "message_id": "submit_shares" - }, - { - "type": "automatic", - "message_id": "submit_shares_error" - } - ], - "actions": [ - { - "message_ids": ["setup_connection"], - "role": "client", - "results": [ - { - "type": "match_message_type", - "value": "0x01" - } - ], - "actiondoc": "" - }, - { - "message_ids": ["open_standard_mining_channel"], - "role": "client", - "results": [ - { - "type": "match_message_field", - "value": [ - "MiningProtocol", - "OpenStandardMiningChannelSuccess", - [ - [ - "request_id", - {"U32": 89} - ] - ] - ] - }, - { - "type": "match_message_type", - "value": "0x15" - }, - { - "type": "match_message_type", - "value": "0x20" - } - ], - "actiondoc": "Opens standard mining channel and expects to receive NMJ and SNPH" - }, - { - "message_ids": ["submit_shares"], - "role": "client", - "results": [ - { - "type": "match_message_type", - "value": "0x1c" - } - ], - "actiondoc": "This action sends the message SubmitSharesStandard to the pool and checks that the pool replies with SubmitSharesStandard.Success" - }, - { - "message_ids": ["submit_shares_error"], - "role": "client", - "results": [ - { - "type": "match_message_type", - "value": "0x1d" - } - ], - "actiondoc": "This action sends the bad message SubmitSharesStandard to the pool and checks that the pool replies with SubmitSharesError" - } - ], - "setup_commands": [ - { - "command": "cargo", - "args": [ - "run", - "../../test/message-generator/mock/template-provider-mock1.json" - ], - "conditions": { - "WithConditions": { - "conditions": [ - { - "output_string": "Running `target/debug/message_generator_sv2 ../../test/message-generator/mock/template-provider-mock1.json`", - "output_location": "StdErr", - "late_condition": false, - "condition": true - } - ], - "timer_secs": 260, - "warn_no_panic": false - } - } - }, - { - "command": "cargo", - "args": [ "llvm-cov", - "--no-report", - "run", - "-p", - "pool_sv2", - "--", - "-c", - "../test/config/pool-mock-tp-standard-coverage.toml" - ], - "conditions": { - "WithConditions": { - "conditions": [ - { - "output_string": "Listening for encrypted connection on: 127.0.0.1:34254", - "output_location": "StdOut", - "late_condition": false, - "condition": true - } - ], - "timer_secs": 240, - "warn_no_panic": false - } - } - } - ], - "execution_commands": [ - ], - "cleanup_commands": [ - { - "command": "pkill", - "args": ["-f", "pool_sv2", "-SIGINT"], - "conditions": "None" - } - ], - "role": "client", - "downstream": { - "ip": "0.0.0.0", - "port": 34254, - "pub_key": "9auqWEzQDVyd2oe1JVGFLMLHZtCo2FFqZwtKA5gd9xbuEu7PH72" - } -} diff --git a/test/message-generator/test/standard-coverage-test/standard-coverage-test.sh b/test/message-generator/test/standard-coverage-test/standard-coverage-test.sh deleted file mode 100755 index 22befe8eb..000000000 --- a/test/message-generator/test/standard-coverage-test/standard-coverage-test.sh +++ /dev/null @@ -1,9 +0,0 @@ -cd roles -cargo llvm-cov --no-report -p pool_sv2 - -cd ../utils/message-generator/ -cargo build - -RUST_LOG=debug cargo run ../../test/message-generator/test/standard-coverage-test/standard-coverage-test.json || { echo 'mg test failed' ; exit 1; } - -sleep 10