From dc10c5794a2357ab4a097db8d9d470b9ef724434 Mon Sep 17 00:00:00 2001 From: jeff washington Date: Tue, 1 Nov 2022 16:26:28 -0500 Subject: [PATCH] logs --- programs/sbf/tests/programs.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/programs/sbf/tests/programs.rs b/programs/sbf/tests/programs.rs index 55d4c647992589..fd6aee337b7d58 100644 --- a/programs/sbf/tests/programs.rs +++ b/programs/sbf/tests/programs.rs @@ -1036,6 +1036,7 @@ fn test_program_sbf_invoke_sanity() { } for program in programs.iter() { println!("Test program: {:?}", program); + error!("Test program: {:?}", program); let GenesisConfigInfo { genesis_config, @@ -1047,6 +1048,7 @@ fn test_program_sbf_invoke_sanity() { bank.add_builtin(&name, &id, entrypoint); let bank = Arc::new(bank); let bank_client = BankClient::new_shared(&bank); + error!("{}", line!()); let invoke_program_id = load_sbf_program(&bank_client, &bpf_loader::id(), &mint_keypair, program.1); @@ -1090,6 +1092,7 @@ fn test_program_sbf_invoke_sanity() { AccountMeta::new_readonly(solana_sdk::ed25519_program::id(), false), AccountMeta::new_readonly(invoke_program_id, false), ]; + error!("{}", line!()); // success cases @@ -1112,14 +1115,17 @@ fn test_program_sbf_invoke_sanity() { ); let (result, inner_instructions, _log_messages) = process_transaction_and_record_inner(&bank, tx); - assert_eq!(result, Ok(())); + error!("{}", line!()); + assert_eq!(result, Ok(())); + error!("{}", line!()); let invoked_programs: Vec = inner_instructions[0] .iter() .map(|ix| &message.account_keys[ix.instruction.program_id_index as usize]) .cloned() .collect(); - let expected_invoked_programs = match program.0 { + error!("{}", line!()); + let expected_invoked_programs = match program.0 { Languages::C => vec![ system_program::id(), system_program::id(), @@ -1168,6 +1174,7 @@ fn test_program_sbf_invoke_sanity() { invoked_program_id.clone(), ], }; + error!("{}", line!()); assert_eq!(invoked_programs.len(), expected_invoked_programs.len()); assert_eq!(invoked_programs, expected_invoked_programs); let no_invoked_programs: Vec = inner_instructions[1] @@ -1178,6 +1185,7 @@ fn test_program_sbf_invoke_sanity() { assert_eq!(no_invoked_programs.len(), 0); // failure cases + error!("{}", line!()); let do_invoke_failure_test_local = |test: u8, @@ -1231,6 +1239,7 @@ fn test_program_sbf_invoke_sanity() { &[invoked_program_id.clone()], None, ); + error!("{}", line!()); do_invoke_failure_test_local( TEST_PRIVILEGE_ESCALATION_WRITABLE, @@ -1238,6 +1247,7 @@ fn test_program_sbf_invoke_sanity() { &[invoked_program_id.clone()], None, ); + error!("{}", line!()); do_invoke_failure_test_local( TEST_PPROGRAM_NOT_EXECUTABLE, @@ -1245,13 +1255,15 @@ fn test_program_sbf_invoke_sanity() { &[], None, ); + error!("{}", line!()); do_invoke_failure_test_local( TEST_EMPTY_ACCOUNTS_SLICE, TransactionError::InstructionError(0, InstructionError::MissingAccount), &[], None, - ); + ); error!("{}", line!()); + do_invoke_failure_test_local( TEST_CAP_SEEDS, @@ -1259,6 +1271,7 @@ fn test_program_sbf_invoke_sanity() { &[], None, ); + error!("{}", line!()); do_invoke_failure_test_local( TEST_CAP_SIGNERS,