Line data Source code
1 : #include "../../fd_tests.h"
2 3 : int test_1270(fd_executor_test_suite_t *suite) {
3 3 : fd_executor_test_t test;
4 3 : fd_memset( &test, 0, FD_EXECUTOR_TEST_FOOTPRINT );
5 3 : test.disable_cnt = 0;
6 3 : test.bt = " 2: solana_bpf_loader_program::tests::test_bpf_loader_write at ./src/lib.rs:1873:9 3: solana_bpf_loader_program::tests::test_bpf_loader_write::{{closure}} at ./src/lib.rs:1821:32 4: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5 5: core::ops::function::FnOnce::call_once at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/ops/function.rs:250:5";
7 3 : test.test_name = "tests::test_bpf_loader_write";
8 3 : test.test_number = 1270;
9 3 : test.sysvar_cache.clock = "";
10 3 : test.sysvar_cache.epoch_schedule = "";
11 3 : test.sysvar_cache.epoch_rewards = "";
12 3 : test.sysvar_cache.fees = "";
13 3 : test.sysvar_cache.rent = "";
14 3 : test.sysvar_cache.slot_hashes = "";
15 3 : test.sysvar_cache.stake_history = "";
16 3 : test.sysvar_cache.slot_history = "";
17 3 : if (fd_executor_test_suite_check_filter(suite, &test)) return -9999;
18 3 : ulong test_accs_len = 2;
19 3 : fd_executor_test_acc_t* test_accs = fd_alloca( 1UL, FD_EXECUTOR_TEST_ACC_FOOTPRINT * test_accs_len );
20 3 : fd_memset( test_accs, 0, FD_EXECUTOR_TEST_ACC_FOOTPRINT * test_accs_len );
21 :
22 : // {'clock': '', 'epoch_schedule': '', 'epoch_rewards': '', 'fees': '', 'rent': '', 'slot_hashes': '', 'recent_blockhashes': '', 'stake_history': '', 'last_restart_slot': ''}
23 3 : fd_executor_test_acc_t* test_acc = test_accs;
24 3 : fd_base58_decode_32( "1111113f7T27bALw6UaE1QBNga4j2FK4CgHHhR495", (uchar *) &test_acc->pubkey);
25 3 : fd_base58_decode_32( "BPFLoader2111111111111111111111111111111111", (uchar *) &test_acc->owner);
26 3 : fd_base58_decode_32( "BPFLoader2111111111111111111111111111111111", (uchar *) &test_acc->result_owner);
27 3 : test_acc->lamports = 1UL;
28 3 : test_acc->result_lamports = 1UL;
29 3 : test_acc->executable = 0;
30 3 : test_acc->result_executable= 0;
31 3 : test_acc->rent_epoch = 0;
32 3 : test_acc->result_rent_epoch = 0;
33 3 : static uchar const fd_flamenco_native_prog_test_1270_acc_0_data[] = { 0x00,0x00,0x00,0x00,0x00 };
34 3 : test_acc->data = fd_flamenco_native_prog_test_1270_acc_0_data;
35 3 : test_acc->data_len = 5UL;
36 3 : static uchar const fd_flamenco_native_prog_test_1270_acc_0_post_data[] = { 0x00,0x00,0x00,0x00,0x00 };
37 3 : test_acc->result_data = fd_flamenco_native_prog_test_1270_acc_0_post_data;
38 3 : test_acc->result_data_len = 5UL;
39 3 : test_acc++;
40 3 : fd_base58_decode_32( "BPFLoader2111111111111111111111111111111111", (uchar *) &test_acc->pubkey);
41 3 : fd_base58_decode_32( "NativeLoader1111111111111111111111111111111", (uchar *) &test_acc->owner);
42 3 : fd_base58_decode_32( "NativeLoader1111111111111111111111111111111", (uchar *) &test_acc->result_owner);
43 3 : test_acc->lamports = 0UL;
44 3 : test_acc->result_lamports = 0UL;
45 3 : test_acc->executable = 0;
46 3 : test_acc->result_executable= 0;
47 3 : test_acc->rent_epoch = 0;
48 3 : test_acc->result_rent_epoch = 0;
49 3 : test_acc++;
50 3 : fd_base58_decode_32( "BPFLoader2111111111111111111111111111111111", (unsigned char *) &test.program_id);
51 3 : static uchar const fd_flamenco_native_prog_test_1270_raw[] = { 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0xa8,0xf6,0x91,0x4e,0x88,0xa1,0x6e,0x39,0x5a,0xe1,0x28,0x94,0x8f,0xfa,0x69,0x56,0x93,0x37,0x68,0x18,0xdd,0x47,0x43,0x52,0x21,0xf3,0xc6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x13,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x02,0x03 };
52 3 : test.raw_tx = fd_flamenco_native_prog_test_1270_raw;
53 3 : test.raw_tx_len = 189UL;
54 3 : test.expected_result = -5;
55 3 : test.custom_err = 0;
56 :
57 3 : test.accs_len = test_accs_len;
58 3 : test.accs = test_accs;
59 :
60 3 : return fd_executor_run_test( &test, suite );
61 3 : }
62 : // https://explorer.solana.com/tx/inspector?message=AQABAgAAAAAAAAF%2FAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqj2kU6IoW45WuEolI%2F6aVaTN2gY3UdDUiHzxgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQATAAAAAAMAAAADAAAAAAAAAAECAw%3D%3D
|