From c5a24e11ba065346c1c11273649ba7350d23a4e8 Mon Sep 17 00:00:00 2001 From: K-anon <31515050+IntokuSatori@users.noreply.github.com> Date: Tue, 21 Feb 2023 12:25:29 -0700 Subject: [PATCH] Add test for executor cache runtime feature upgrades. (#30382) Co-authored-by: K-anon --- .../test_elfs/out/callx-r10-sbfv1.so | Bin 0 -> 1456 bytes .../test_elfs/out/callx-r10-sbfv2.so | Bin 0 -> 1456 bytes runtime/src/bank/tests.rs | 92 +++++++++++++++++- 3 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 programs/bpf_loader/test_elfs/out/callx-r10-sbfv1.so create mode 100644 programs/bpf_loader/test_elfs/out/callx-r10-sbfv2.so diff --git a/programs/bpf_loader/test_elfs/out/callx-r10-sbfv1.so b/programs/bpf_loader/test_elfs/out/callx-r10-sbfv1.so new file mode 100644 index 0000000000000000000000000000000000000000..d54f9325de3c1cc184ac0bb20d9ac7420c36f5c2 GIT binary patch literal 1456 zcmbVLyGjF55FOW7d=#P}Y9XmDmIw-Jm0%RaXrYyr#u!YHY$RF1RO$x^Hhzn(y^Y{c zSjIw20}?F@fi> z3hmQ4XKqB9asqoCx z&vuTOSd$K9){yY|-D^UBHGAgi+Mag*AC>RdMKK^TRA9c4jv&n_I? z-OKj@?j3@Ca+T`AMYXk&EtQJd+m0vk6!vDdR|X6q!QrX{;b~*tJk6U zXPuzjs8=GT-Dx-sTjHMwSAMPBu8Dms%|=6e7GJHx@~L929k!h2P|AKKc`e7qqy56( z&StvQzV>Jf!a3o45aV~T=$TZOQS%)n&wDa_FrITlfBS8s*ThWX4Y4?<#GIp}c}7V3 zvo0WV)BoA>5;?~fCjE?()q}5IuStK-H4*1n?2q{!>;65=0{y#|pU67t&wC)EKe(_@ z#?4s384`vTKJH^(dFD=2br2H4LH6vhAtAx3;v*5|z{!cKMjPo?+Lh=DKS1K*x462yNc;)M zI&f6;>^sk9vm_Fe%s%tZJKyi@^=4_y>+2IzzYN8vH&YZ1yPgw#g`zBrr{97M3p@vu zX`jU@y#o|Q>h-FS6i!oskGrQECutyV*2){4F8DGSdKOh_tti| z*R!Sm>x{O*+!MYBF?kn@p3h_%GT(mcIVZz=({oSgZ@*3an%GIaA&7fQoOkMYpAnM& ztP6pXwbI*c)}gSM#4v JD^ { + if *x + == TransactionError::InstructionError(0, InstructionError::ProgramFailedToComplete) + { + println!("ERROR: Program was not recompiled after runtime feature was enabled."); + } + } + Ok(_) => println!("ERROR: Program should fail during execution."), + } + // assert_eq!( + // result_with_feature_enabled, + // Err(TransactionError::InstructionError(0, InstructionError::InvalidAccountData)) + // ); +}