Mark a whole lot of tests to skip on m1 as they core dump
This commit is contained in:
@@ -672,6 +672,7 @@ func TestExecuteWithNonExistingAddress(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestExecuteWithPanic(t *testing.T) {
|
func TestExecuteWithPanic(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
||||||
keeper := keepers.ContractKeeper
|
keeper := keepers.ContractKeeper
|
||||||
|
|
||||||
@@ -703,6 +704,7 @@ func TestExecuteWithPanic(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestExecuteWithCpuLoop(t *testing.T) {
|
func TestExecuteWithCpuLoop(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
||||||
keeper := keepers.ContractKeeper
|
keeper := keepers.ContractKeeper
|
||||||
|
|
||||||
@@ -745,6 +747,7 @@ func TestExecuteWithCpuLoop(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestExecuteWithStorageLoop(t *testing.T) {
|
func TestExecuteWithStorageLoop(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
||||||
keeper := keepers.ContractKeeper
|
keeper := keepers.ContractKeeper
|
||||||
|
|
||||||
@@ -786,6 +789,7 @@ func TestExecuteWithStorageLoop(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestMigrate(t *testing.T) {
|
func TestMigrate(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
||||||
keeper := keepers.ContractKeeper
|
keeper := keepers.ContractKeeper
|
||||||
|
|
||||||
@@ -967,6 +971,7 @@ func TestMigrate(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestMigrateReplacesTheSecondIndex(t *testing.T) {
|
func TestMigrateReplacesTheSecondIndex(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
ctx, keepers := CreateTestInput(t, false, SupportedFeatures)
|
||||||
example := InstantiateHackatomExampleContract(t, ctx, keepers)
|
example := InstantiateHackatomExampleContract(t, ctx, keepers)
|
||||||
|
|
||||||
|
|||||||
12
x/wasm/keeper/m1compat.go
Normal file
12
x/wasm/keeper/m1compat.go
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
package keeper
|
||||||
|
|
||||||
|
import (
|
||||||
|
"runtime"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func SkipIfM1(t *testing.T) {
|
||||||
|
if runtime.GOARCH == "arm64" {
|
||||||
|
t.Skip("Skipping for M1: Signal Error, Stack Dump")
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -207,6 +207,8 @@ func TestGasOnExternalQuery(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestLimitRecursiveQueryGas(t *testing.T) {
|
func TestLimitRecursiveQueryGas(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
|
|
||||||
// The point of this test from https://github.com/CosmWasm/cosmwasm/issues/456
|
// The point of this test from https://github.com/CosmWasm/cosmwasm/issues/456
|
||||||
// Basically, if I burn 90% of gas in CPU loop, then query out (to my self)
|
// Basically, if I burn 90% of gas in CPU loop, then query out (to my self)
|
||||||
// the sub-query will have all the original gas (minus the 40k instance charge)
|
// the sub-query will have all the original gas (minus the 40k instance charge)
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ func mustParse(t *testing.T, data []byte, res interface{}) {
|
|||||||
const ReflectFeatures = "staking,mask,stargate"
|
const ReflectFeatures = "staking,mask,stargate"
|
||||||
|
|
||||||
func TestReflectContractSend(t *testing.T) {
|
func TestReflectContractSend(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
cdc := MakeEncodingConfig(t).Marshaler
|
cdc := MakeEncodingConfig(t).Marshaler
|
||||||
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)))
|
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)))
|
||||||
accKeeper, keeper, bankKeeper := keepers.AccountKeeper, keepers.ContractKeeper, keepers.BankKeeper
|
accKeeper, keeper, bankKeeper := keepers.AccountKeeper, keepers.ContractKeeper, keepers.BankKeeper
|
||||||
@@ -167,6 +168,7 @@ func TestReflectContractSend(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestReflectCustomMsg(t *testing.T) {
|
func TestReflectCustomMsg(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
cdc := MakeEncodingConfig(t).Marshaler
|
cdc := MakeEncodingConfig(t).Marshaler
|
||||||
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
||||||
accKeeper, keeper, bankKeeper := keepers.AccountKeeper, keepers.ContractKeeper, keepers.BankKeeper
|
accKeeper, keeper, bankKeeper := keepers.AccountKeeper, keepers.ContractKeeper, keepers.BankKeeper
|
||||||
@@ -260,6 +262,7 @@ func TestReflectCustomMsg(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestMaskReflectCustomQuery(t *testing.T) {
|
func TestMaskReflectCustomQuery(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
cdc := MakeEncodingConfig(t).Marshaler
|
cdc := MakeEncodingConfig(t).Marshaler
|
||||||
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
||||||
keeper := keepers.WasmKeeper
|
keeper := keepers.WasmKeeper
|
||||||
@@ -310,6 +313,7 @@ func TestMaskReflectCustomQuery(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestReflectStargateQuery(t *testing.T) {
|
func TestReflectStargateQuery(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
cdc := MakeEncodingConfig(t).Marshaler
|
cdc := MakeEncodingConfig(t).Marshaler
|
||||||
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
||||||
keeper := keepers.WasmKeeper
|
keeper := keepers.WasmKeeper
|
||||||
@@ -387,6 +391,7 @@ type reflectState struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestMaskReflectWasmQueries(t *testing.T) {
|
func TestMaskReflectWasmQueries(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
cdc := MakeEncodingConfig(t).Marshaler
|
cdc := MakeEncodingConfig(t).Marshaler
|
||||||
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
||||||
keeper := keepers.WasmKeeper
|
keeper := keepers.WasmKeeper
|
||||||
@@ -459,6 +464,7 @@ func TestMaskReflectWasmQueries(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestWasmRawQueryWithNil(t *testing.T) {
|
func TestWasmRawQueryWithNil(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
cdc := MakeEncodingConfig(t).Marshaler
|
cdc := MakeEncodingConfig(t).Marshaler
|
||||||
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
ctx, keepers := CreateTestInput(t, false, ReflectFeatures, WithMessageEncoders(reflectEncoders(cdc)), WithQueryPlugins(reflectPlugins()))
|
||||||
keeper := keepers.WasmKeeper
|
keeper := keepers.WasmKeeper
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestOnOpenChannel(t *testing.T) {
|
func TestOnOpenChannel(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
var m wasmtesting.MockWasmer
|
var m wasmtesting.MockWasmer
|
||||||
wasmtesting.MakeIBCInstantiable(&m)
|
wasmtesting.MakeIBCInstantiable(&m)
|
||||||
var messenger = &wasmtesting.MockMessageHandler{}
|
var messenger = &wasmtesting.MockMessageHandler{}
|
||||||
@@ -87,6 +88,7 @@ func TestOnOpenChannel(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestOnConnectChannel(t *testing.T) {
|
func TestOnConnectChannel(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
var m wasmtesting.MockWasmer
|
var m wasmtesting.MockWasmer
|
||||||
wasmtesting.MakeIBCInstantiable(&m)
|
wasmtesting.MakeIBCInstantiable(&m)
|
||||||
var messenger = &wasmtesting.MockMessageHandler{}
|
var messenger = &wasmtesting.MockMessageHandler{}
|
||||||
@@ -198,6 +200,7 @@ func TestOnConnectChannel(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestOnCloseChannel(t *testing.T) {
|
func TestOnCloseChannel(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
var m wasmtesting.MockWasmer
|
var m wasmtesting.MockWasmer
|
||||||
wasmtesting.MakeIBCInstantiable(&m)
|
wasmtesting.MakeIBCInstantiable(&m)
|
||||||
var messenger = &wasmtesting.MockMessageHandler{}
|
var messenger = &wasmtesting.MockMessageHandler{}
|
||||||
@@ -308,6 +311,7 @@ func TestOnCloseChannel(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestOnRecvPacket(t *testing.T) {
|
func TestOnRecvPacket(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
var m wasmtesting.MockWasmer
|
var m wasmtesting.MockWasmer
|
||||||
wasmtesting.MakeIBCInstantiable(&m)
|
wasmtesting.MakeIBCInstantiable(&m)
|
||||||
var messenger = &wasmtesting.MockMessageHandler{}
|
var messenger = &wasmtesting.MockMessageHandler{}
|
||||||
@@ -470,6 +474,7 @@ func TestOnRecvPacket(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestOnAckPacket(t *testing.T) {
|
func TestOnAckPacket(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
var m wasmtesting.MockWasmer
|
var m wasmtesting.MockWasmer
|
||||||
wasmtesting.MakeIBCInstantiable(&m)
|
wasmtesting.MakeIBCInstantiable(&m)
|
||||||
var messenger = &wasmtesting.MockMessageHandler{}
|
var messenger = &wasmtesting.MockMessageHandler{}
|
||||||
@@ -576,6 +581,7 @@ func TestOnAckPacket(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestOnTimeoutPacket(t *testing.T) {
|
func TestOnTimeoutPacket(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
var m wasmtesting.MockWasmer
|
var m wasmtesting.MockWasmer
|
||||||
wasmtesting.MakeIBCInstantiable(&m)
|
wasmtesting.MakeIBCInstantiable(&m)
|
||||||
var messenger = &wasmtesting.MockMessageHandler{}
|
var messenger = &wasmtesting.MockMessageHandler{}
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ type InvestmentResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestInitializeStaking(t *testing.T) {
|
func TestInitializeStaking(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
ctx, k := CreateTestInput(t, false, SupportedFeatures)
|
ctx, k := CreateTestInput(t, false, SupportedFeatures)
|
||||||
accKeeper, stakingKeeper, keeper, bankKeeper := k.AccountKeeper, k.StakingKeeper, k.ContractKeeper, k.BankKeeper
|
accKeeper, stakingKeeper, keeper, bankKeeper := k.AccountKeeper, k.StakingKeeper, k.ContractKeeper, k.BankKeeper
|
||||||
|
|
||||||
@@ -226,6 +227,7 @@ func initializeStaking(t *testing.T) initInfo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestBonding(t *testing.T) {
|
func TestBonding(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
initInfo := initializeStaking(t)
|
initInfo := initializeStaking(t)
|
||||||
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
||||||
keeper, stakingKeeper, accKeeper, bankKeeper := initInfo.wasmKeeper, initInfo.stakingKeeper, initInfo.accKeeper, initInfo.bankKeeper
|
keeper, stakingKeeper, accKeeper, bankKeeper := initInfo.wasmKeeper, initInfo.stakingKeeper, initInfo.accKeeper, initInfo.bankKeeper
|
||||||
@@ -274,6 +276,7 @@ func TestBonding(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestUnbonding(t *testing.T) {
|
func TestUnbonding(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
initInfo := initializeStaking(t)
|
initInfo := initializeStaking(t)
|
||||||
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
||||||
keeper, stakingKeeper, accKeeper, bankKeeper := initInfo.wasmKeeper, initInfo.stakingKeeper, initInfo.accKeeper, initInfo.bankKeeper
|
keeper, stakingKeeper, accKeeper, bankKeeper := initInfo.wasmKeeper, initInfo.stakingKeeper, initInfo.accKeeper, initInfo.bankKeeper
|
||||||
@@ -339,6 +342,7 @@ func TestUnbonding(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestReinvest(t *testing.T) {
|
func TestReinvest(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
initInfo := initializeStaking(t)
|
initInfo := initializeStaking(t)
|
||||||
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
||||||
keeper, stakingKeeper, accKeeper, bankKeeper := initInfo.wasmKeeper, initInfo.stakingKeeper, initInfo.accKeeper, initInfo.bankKeeper
|
keeper, stakingKeeper, accKeeper, bankKeeper := initInfo.wasmKeeper, initInfo.stakingKeeper, initInfo.accKeeper, initInfo.bankKeeper
|
||||||
@@ -407,6 +411,7 @@ func TestReinvest(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestQueryStakingInfo(t *testing.T) {
|
func TestQueryStakingInfo(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
// STEP 1: take a lot of setup from TestReinvest so we have non-zero info
|
// STEP 1: take a lot of setup from TestReinvest so we have non-zero info
|
||||||
initInfo := initializeStaking(t)
|
initInfo := initializeStaking(t)
|
||||||
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
||||||
@@ -586,6 +591,7 @@ func TestQueryStakingInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestQueryStakingPlugin(t *testing.T) {
|
func TestQueryStakingPlugin(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
// STEP 1: take a lot of setup from TestReinvest so we have non-zero info
|
// STEP 1: take a lot of setup from TestReinvest so we have non-zero info
|
||||||
initInfo := initializeStaking(t)
|
initInfo := initializeStaking(t)
|
||||||
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
ctx, valAddr, contractAddr := initInfo.ctx, initInfo.valAddr, initInfo.contractAddr
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import (
|
|||||||
|
|
||||||
// Try a simple send, no gas limit to for a sanity check before trying table tests
|
// Try a simple send, no gas limit to for a sanity check before trying table tests
|
||||||
func TestDispatchSubMsgSuccessCase(t *testing.T) {
|
func TestDispatchSubMsgSuccessCase(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
ctx, keepers := CreateTestInput(t, false, ReflectFeatures)
|
ctx, keepers := CreateTestInput(t, false, ReflectFeatures)
|
||||||
accKeeper, keeper, bankKeeper := keepers.AccountKeeper, keepers.WasmKeeper, keepers.BankKeeper
|
accKeeper, keeper, bankKeeper := keepers.AccountKeeper, keepers.WasmKeeper, keepers.BankKeeper
|
||||||
|
|
||||||
@@ -108,6 +109,7 @@ func TestDispatchSubMsgSuccessCase(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestDispatchSubMsgErrorHandling(t *testing.T) {
|
func TestDispatchSubMsgErrorHandling(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
fundedDenom := "funds"
|
fundedDenom := "funds"
|
||||||
fundedAmount := 1_000_000
|
fundedAmount := 1_000_000
|
||||||
ctxGasLimit := uint64(1_000_000)
|
ctxGasLimit := uint64(1_000_000)
|
||||||
@@ -363,6 +365,7 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) {
|
|||||||
// Test an error case, where the Encoded doesn't return any sdk.Msg and we trigger(ed) a null pointer exception.
|
// Test an error case, where the Encoded doesn't return any sdk.Msg and we trigger(ed) a null pointer exception.
|
||||||
// This occurs with the IBC encoder. Test this.
|
// This occurs with the IBC encoder. Test this.
|
||||||
func TestDispatchSubMsgEncodeToNoSdkMsg(t *testing.T) {
|
func TestDispatchSubMsgEncodeToNoSdkMsg(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
// fake out the bank handle to return success with no data
|
// fake out the bank handle to return success with no data
|
||||||
nilEncoder := func(sender sdk.AccAddress, msg *wasmvmtypes.BankMsg) ([]sdk.Msg, error) {
|
nilEncoder := func(sender sdk.AccAddress, msg *wasmvmtypes.BankMsg) ([]sdk.Msg, error) {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
@@ -439,6 +442,7 @@ func TestDispatchSubMsgEncodeToNoSdkMsg(t *testing.T) {
|
|||||||
|
|
||||||
// Try a simple send, no gas limit to for a sanity check before trying table tests
|
// Try a simple send, no gas limit to for a sanity check before trying table tests
|
||||||
func TestDispatchSubMsgConditionalReplyOn(t *testing.T) {
|
func TestDispatchSubMsgConditionalReplyOn(t *testing.T) {
|
||||||
|
SkipIfM1(t)
|
||||||
ctx, keepers := CreateTestInput(t, false, ReflectFeatures)
|
ctx, keepers := CreateTestInput(t, false, ReflectFeatures)
|
||||||
keeper := keepers.WasmKeeper
|
keeper := keepers.WasmKeeper
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user