diff --git a/system_tests/aliasing_test.go b/system_tests/aliasing_test.go index e6c9dab45f..86ed0e8179 100644 --- a/system_tests/aliasing_test.go +++ b/system_tests/aliasing_test.go @@ -19,7 +19,6 @@ import ( ) func TestAliasing(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/ancients_finalized_test.go b/system_tests/ancients_finalized_test.go index e58e86a511..cb4637b313 100644 --- a/system_tests/ancients_finalized_test.go +++ b/system_tests/ancients_finalized_test.go @@ -30,7 +30,6 @@ func generateBlocks(t *testing.T, ctx context.Context, builder *NodeBuilder, tes } func TestFinalizedBlocksMovedToAncients(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -92,7 +91,6 @@ func TestFinalizedBlocksMovedToAncients(t *testing.T) { } func TestFinalityDataWaitForBlockValidator(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -177,7 +175,6 @@ func TestFinalityDataWaitForBlockValidator(t *testing.T) { } func TestFinalityDataPushedFromConsensusToExecution(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/arbos_upgrade_test.go b/system_tests/arbos_upgrade_test.go index a7103a8585..77f247ce6c 100644 --- a/system_tests/arbos_upgrade_test.go +++ b/system_tests/arbos_upgrade_test.go @@ -83,7 +83,6 @@ func checkArbOSVersion(t *testing.T, testClient *TestClient, expectedVersion uin } func TestArbos11To32UpgradeWithMcopy(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -187,7 +186,6 @@ func TestArbos11To32UpgradeWithMcopy(t *testing.T) { } func TestArbos11To32UpgradeWithCalldata(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/batch_poster_test.go b/system_tests/batch_poster_test.go index fe2fa2df1d..9c2b30adf3 100644 --- a/system_tests/batch_poster_test.go +++ b/system_tests/batch_poster_test.go @@ -208,7 +208,6 @@ func testBatchPosterParallel(t *testing.T, useRedis bool) { } func TestBatchPosterLargeTx(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -281,7 +280,6 @@ func TestBatchPosterKeepsUp(t *testing.T) { } func testAllowPostingFirstBatchWhenSequencerMessageCountMismatch(t *testing.T, enabled bool) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/block_validator_test.go b/system_tests/block_validator_test.go index d6ae4973ac..694275faaa 100644 --- a/system_tests/block_validator_test.go +++ b/system_tests/block_validator_test.go @@ -52,7 +52,6 @@ type Options struct { } func testBlockValidatorSimple(t *testing.T, opts Options) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/bloom_test.go b/system_tests/bloom_test.go index df6c549dda..7526436b63 100644 --- a/system_tests/bloom_test.go +++ b/system_tests/bloom_test.go @@ -22,7 +22,6 @@ import ( ) func TestBloom(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() builder := NewNodeBuilder(ctx).DefaultConfig(t, false) diff --git a/system_tests/bold_state_provider_test.go b/system_tests/bold_state_provider_test.go index 0ecce5ba64..12e8de1400 100644 --- a/system_tests/bold_state_provider_test.go +++ b/system_tests/bold_state_provider_test.go @@ -41,7 +41,6 @@ import ( ) func TestChallengeProtocolBOLD_Bisections(t *testing.T) { - t.Parallel() ctx, cancelCtx := context.WithCancel(context.Background()) defer cancelCtx() l2node, l1info, l2info, l1stack, l1client, stateManager, blockValidator := setupBoldStateProvider(t, ctx, 1<<5) @@ -156,8 +155,7 @@ func TestChallengeProtocolBOLD_Bisections(t *testing.T) { } func TestChallengeProtocolBOLD_StateProvider(t *testing.T) { - // t.Parallel() - ctx, cancelCtx := context.WithCancel(context.Background()) + // ctx, cancelCtx := context.WithCancel(context.Background()) defer cancelCtx() maxNumBlocks := uint64(1 << 14) l2node, l1info, l2info, l1stack, l1client, stateManager, blockValidator := setupBoldStateProvider(t, ctx, maxNumBlocks) diff --git a/system_tests/classic_redirect_test.go b/system_tests/classic_redirect_test.go index c0662eb71f..b20b89a6e2 100644 --- a/system_tests/classic_redirect_test.go +++ b/system_tests/classic_redirect_test.go @@ -14,7 +14,6 @@ import ( ) func TestClassicRedirectURLNotLeaked(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/common_test.go b/system_tests/common_test.go index 1b8434513c..97acd7ad46 100644 --- a/system_tests/common_test.go +++ b/system_tests/common_test.go @@ -10,6 +10,7 @@ import ( "encoding/hex" "encoding/json" "flag" + "fmt" "io" "log/slog" "math/big" @@ -17,8 +18,11 @@ import ( "net/http" "os" "reflect" + "runtime" "strconv" "strings" + "sync" + "sync/atomic" "testing" "time" @@ -238,18 +242,21 @@ func ExecConfigDefaultTest(t *testing.T) *gethexec.Config { type NodeBuilder struct { // NodeBuilder configuration - ctx context.Context - chainConfig *params.ChainConfig - nodeConfig *arbnode.Config - execConfig *gethexec.Config - l1StackConfig *node.Config - l2StackConfig *node.Config - valnodeConfig *valnode.Config - l3Config *NitroConfig - deployBold bool - L1Info info - L2Info info - L3Info info + ctx context.Context + ctxCancel context.CancelFunc + chainConfig *params.ChainConfig + nodeConfig *arbnode.Config + execConfig *gethexec.Config + l1StackConfig *node.Config + l2StackConfig *node.Config + valnodeConfig *valnode.Config + l3Config *NitroConfig + deployBold bool + parallelise bool + paralleliseOnce sync.Once + L1Info info + L2Info info + L3Info info // L1, L2, L3 Node parameters dataDir string @@ -318,13 +325,18 @@ func L3NitroConfigDefaultTest(t *testing.T) *NitroConfig { } } -func NewNodeBuilder(ctx context.Context) *NodeBuilder { - return &NodeBuilder{ctx: ctx} +func NewNodeBuilder(ctxIn context.Context) *NodeBuilder { + ctx, cancel := context.WithCancel(ctxIn) + return &NodeBuilder{ + ctx: ctx, + ctxCancel: cancel, + } } func (b *NodeBuilder) DefaultConfig(t *testing.T, withL1 bool) *NodeBuilder { // most used values across current tests are set here as default b.withL1 = withL1 + b.parallelise = true if withL1 { b.isSequencer = true b.nodeConfig = arbnode.ConfigDefaultL1Test() @@ -382,6 +394,11 @@ func (b *NodeBuilder) WithStylusLongTermCache(enabled bool) *NodeBuilder { return b } +func (b *NodeBuilder) DontParalellise() *NodeBuilder { + b.parallelise = false + return b +} + // WithDelayBuffer sets the delay-buffer threshold, which is the number of blocks the batch-poster // is allowed to delay a batch with a delayed message. // Setting the threshold to zero disabled the delay buffer (default behaviour). @@ -391,6 +408,10 @@ func (b *NodeBuilder) WithDelayBuffer(threshold uint64) *NodeBuilder { } func (b *NodeBuilder) Build(t *testing.T) func() { + if b.parallelise { + b.parallelise = false + t.Parallel() + } b.CheckConfig(t) if b.withL1 { b.BuildL1(t) @@ -399,6 +420,97 @@ func (b *NodeBuilder) Build(t *testing.T) func() { return b.BuildL2(t) } +type testCollection struct { + room atomic.Int64 + cond *sync.Cond + running map[string]int64 + waiting map[string]int64 +} + +var globalCollection *testCollection + +func initTestCollection() { + if globalCollection != nil { + panic("trying to init testCollection twice") + } + globalCollection = &testCollection{} + globalCollection.cond = sync.NewCond(&sync.Mutex{}) + room := int64(runtime.NumCPU()) + if room < 2 { + room = 2 + } + globalCollection.running = make(map[string]int64) + globalCollection.waiting = make(map[string]int64) + globalCollection.room.Store(room) +} + +func runningWithContext(ctx context.Context, weight int64, name string) { + current := globalCollection.running[name] + globalCollection.running[name] = current + weight + globalCollection.cond.L.Unlock() + go func() { + <-ctx.Done() + globalCollection.cond.L.Lock() + current := globalCollection.running[name] + if current-weight <= 0 { + delete(globalCollection.running, name) + } else { + globalCollection.running[name] = current - weight + } + if globalCollection.room.Add(weight) > 0 { + globalCollection.cond.Broadcast() + } + globalCollection.cond.L.Unlock() + }() +} + +func WaitAndRun(ctx context.Context, weight int64, name string) error { + globalCollection.cond.L.Lock() + current := globalCollection.waiting[name] + globalCollection.waiting[name] = current + weight + for globalCollection.room.Add(0-weight) < 0 { + if globalCollection.room.Add(weight) > 0 { + globalCollection.cond.Broadcast() + } + if ctx.Err() != nil { + return fmt.Errorf("Context cancelled while waiting to launch test: %s", name) + } + globalCollection.cond.Wait() + } + current = globalCollection.waiting[name] + if current-weight <= 0 { + delete(globalCollection.waiting, name) + } else { + globalCollection.waiting[name] = current - weight + } + runningWithContext(ctx, weight, name) + return nil +} + +func DontWaitAndRun(ctx context.Context, weight int64, name string) { + globalCollection.room.Add(0 - weight) + globalCollection.cond.L.Lock() + runningWithContext(ctx, weight, name) +} + +func CurrentlyRunning() (map[string]int64, map[string]int64) { + running := make(map[string]int64) + waiting := make(map[string]int64) + globalCollection.cond.L.Lock() + for k, v := range globalCollection.running { + if v > 0 { + running[k] = v + } + } + for k, v := range globalCollection.waiting { + if v > 0 { + waiting[k] = v + } + } + globalCollection.cond.L.Unlock() + return running, waiting +} + func (b *NodeBuilder) CheckConfig(t *testing.T) { if b.chainConfig == nil { b.chainConfig = chaininfo.ArbitrumDevTestChainConfig() @@ -425,6 +537,14 @@ func (b *NodeBuilder) CheckConfig(t *testing.T) { } func (b *NodeBuilder) BuildL1(t *testing.T) { + if b.parallelise { + b.parallelise = false + t.Parallel() + } + err := WaitAndRun(b.ctx, 2, t.Name()) + if err != nil { + t.Fatal(err) + } b.L1 = NewTestClient(b.ctx) b.L1Info, b.L1.Client, b.L1.L1Backend, b.L1.Stack = createTestL1BlockChain(t, b.L1Info) locator, err := server_common.NewMachineLocator(b.valnodeConfig.Wasm.RootPath) @@ -528,6 +648,7 @@ func buildOnParentChain( } func (b *NodeBuilder) BuildL3OnL2(t *testing.T) func() { + DontWaitAndRun(b.ctx, 1, t.Name()) b.L3Info = NewArbTestInfo(t, b.l3Config.chainConfig.ChainID) locator, err := server_common.NewMachineLocator(b.l3Config.valnodeConfig.Wasm.RootPath) @@ -610,12 +731,22 @@ func (b *NodeBuilder) BuildL2OnL1(t *testing.T) func() { if b.L1 != nil && b.L1.cleanup != nil { b.L1.cleanup() } + b.ctxCancel() } } // L2 -Only. Enough for tests that needs no interface to L1 // Requires precompiles.AllowDebugPrecompiles = true func (b *NodeBuilder) BuildL2(t *testing.T) func() { + if b.parallelise { + b.parallelise = false + t.Parallel() + } + err := WaitAndRun(b.ctx, 1, t.Name()) + if err != nil { + Fatal(t, err) + } + b.L2 = NewTestClient(b.ctx) AddValNodeIfNeeded(t, b.ctx, b.nodeConfig, true, "", b.valnodeConfig.Wasm.RootPath) @@ -665,7 +796,10 @@ func (b *NodeBuilder) BuildL2(t *testing.T) func() { b.L2.ExecNode = getExecNode(t, b.L2.ConsensusNode) b.L2.cleanup = func() { b.L2.ConsensusNode.StopAndWait() } - return func() { b.L2.cleanup() } + return func() { + b.L2.cleanup() + b.ctxCancel() + } } // L2 -Only. RestartL2Node shutdowns the existing l2 node and start it again using the same data dir. @@ -760,6 +894,7 @@ func build2ndNode( } func (b *NodeBuilder) Build2ndNode(t *testing.T, params *SecondNodeParams) (*TestClient, func()) { + DontWaitAndRun(b.ctx, 1, t.Name()) if b.L2 == nil { t.Fatal("builder did not previously built an L2 Node") } @@ -788,6 +923,7 @@ func (b *NodeBuilder) Build2ndNode(t *testing.T, params *SecondNodeParams) (*Tes } func (b *NodeBuilder) Build2ndNodeOnL3(t *testing.T, params *SecondNodeParams) (*TestClient, func()) { + DontWaitAndRun(b.ctx, 1, t.Name()) if b.L3 == nil { t.Fatal("builder did not previously built an L3 Node") } @@ -1818,18 +1954,42 @@ func doUntil(t *testing.T, delay time.Duration, max int, lambda func() bool) { Fatal(t, "failed to complete after ", delay*time.Duration(max)) } -func TestMain(m *testing.M) { +func initDefaultTestLog() { logLevelEnv := os.Getenv("TEST_LOGLEVEL") + logLevel := log.LevelError if logLevelEnv != "" { - logLevel, err := strconv.ParseInt(logLevelEnv, 10, 32) - if err != nil || logLevel > int64(log.LevelCrit) { + logLevelI64, err := strconv.ParseInt(logLevelEnv, 10, 32) + if err != nil || logLevelI64 > int64(log.LevelCrit) { log.Warn("TEST_LOGLEVEL exists but out of bound, ignoring", "logLevel", logLevelEnv, "max", log.LvlTrace) + } else { + logLevel = slog.Level(logLevelI64) } - glogger := log.NewGlogHandler( - log.NewTerminalHandler(io.Writer(os.Stderr), false)) - glogger.Verbosity(slog.Level(logLevel)) - log.SetDefault(log.NewLogger(glogger)) } + glogger := log.NewGlogHandler( + log.NewTerminalHandler(io.Writer(os.Stderr), false)) + glogger.Verbosity(logLevel) + log.SetDefault(log.NewLogger(glogger)) +} + +func TestMain(m *testing.M) { + initDefaultTestLog() + initTestCollection() + go func() { + for { + <-time.After(time.Second) + running, waiting := CurrentlyRunning() + print := "[" + for test, count := range running { + print += fmt.Sprintf("%s[%d],", test, count) + } + print += "] Q{" + for test, count := range waiting { + print += fmt.Sprintf("%s[%d],", test, count) + } + print += "}" + fmt.Printf("\n------ room: %d, %s\n", globalCollection.room.Load(), print) + } + }() code := m.Run() os.Exit(code) } diff --git a/system_tests/conditionaltx_test.go b/system_tests/conditionaltx_test.go index 2d9140ffcd..f1dd8d35e0 100644 --- a/system_tests/conditionaltx_test.go +++ b/system_tests/conditionaltx_test.go @@ -402,7 +402,6 @@ func TestSendRawTransactionConditionalMultiRoutine(t *testing.T) { } func TestSendRawTransactionConditionalPreCheck(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/contract_tx_test.go b/system_tests/contract_tx_test.go index ad4f51204a..991e0e133a 100644 --- a/system_tests/contract_tx_test.go +++ b/system_tests/contract_tx_test.go @@ -22,7 +22,6 @@ import ( ) func TestContractTxDeploy(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() builder := NewNodeBuilder(ctx).DefaultConfig(t, false) diff --git a/system_tests/das_test.go b/system_tests/das_test.go index ba50dcfff2..80e9d6de7b 100644 --- a/system_tests/das_test.go +++ b/system_tests/das_test.go @@ -7,20 +7,15 @@ import ( "context" "encoding/base64" "errors" - "io" - "log/slog" "math/big" "net" "net/http" - "os" - "strconv" "testing" "time" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" "github.com/offchainlabs/nitro/arbnode" "github.com/offchainlabs/nitro/blsSignatures" @@ -306,22 +301,7 @@ func TestDASComplexConfigAndRestMirror(t *testing.T) { Require(t, err) } -func enableLogging(logLvl int) { - glogger := log.NewGlogHandler( - log.NewTerminalHandler(io.Writer(os.Stderr), false)) - glogger.Verbosity(slog.Level(logLvl)) - log.SetDefault(log.NewLogger(glogger)) -} - func initTest(t *testing.T) { - t.Parallel() - loggingStr := os.Getenv("LOGGING") - if len(loggingStr) > 0 { - var err error - logLvl, err := strconv.Atoi(loggingStr) - Require(t, err, "Failed to parse string") - enableLogging(logLvl) - } } func TestDASBatchPosterFallback(t *testing.T) { diff --git a/system_tests/delayedinbox_test.go b/system_tests/delayedinbox_test.go index 346b0fbc2f..c8c5e2659d 100644 --- a/system_tests/delayedinbox_test.go +++ b/system_tests/delayedinbox_test.go @@ -36,7 +36,6 @@ func WrapL2ForDelayed(t *testing.T, l2Tx *types.Transaction, l1info *BlockchainT } func TestDelayInboxSimple(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/delayedinboxlong_test.go b/system_tests/delayedinboxlong_test.go index ed9e40cdcd..e191611036 100644 --- a/system_tests/delayedinboxlong_test.go +++ b/system_tests/delayedinboxlong_test.go @@ -18,7 +18,6 @@ import ( ) func TestDelayInboxLong(t *testing.T) { - t.Parallel() addLocalLoops := 3 messagesPerAddLocal := 1000 messagesPerDelayed := 10 diff --git a/system_tests/eth_sync_test.go b/system_tests/eth_sync_test.go index ce9994fb1e..af1fd4943f 100644 --- a/system_tests/eth_sync_test.go +++ b/system_tests/eth_sync_test.go @@ -10,7 +10,6 @@ import ( ) func TestEthSyncing(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/fast_confirm_test.go b/system_tests/fast_confirm_test.go index 5a0ed3d7fc..500fcc4dcc 100644 --- a/system_tests/fast_confirm_test.go +++ b/system_tests/fast_confirm_test.go @@ -44,7 +44,6 @@ import ( ) func TestFastConfirmationWithdrawal(t *testing.T) { - t.Parallel() ctx, cancelCtx := context.WithCancel(context.Background()) defer cancelCtx() builder, stakerA, cleanupBuilder, cleanupBackgroundTx := setupFastConfirmation(ctx, t) diff --git a/system_tests/fees_test.go b/system_tests/fees_test.go index 5540728df8..e919e04659 100644 --- a/system_tests/fees_test.go +++ b/system_tests/fees_test.go @@ -31,7 +31,6 @@ import ( ) func TestSequencerFeePaid(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/full_challenge_impl_test.go b/system_tests/full_challenge_impl_test.go index 4d902f87ba..442417bb96 100644 --- a/system_tests/full_challenge_impl_test.go +++ b/system_tests/full_challenge_impl_test.go @@ -8,7 +8,6 @@ import ( "context" "io" "math/big" - "os" "strings" "testing" "time" @@ -18,7 +17,6 @@ import ( "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" - "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" @@ -235,15 +233,11 @@ func setupSequencerInboxStub(ctx context.Context, t *testing.T, l1Info *Blockcha } func RunChallengeTest(t *testing.T, asserterIsCorrect bool, useStubs bool, challengeMsgIdx int64, wasmRootDir string) { - glogger := log.NewGlogHandler( - log.NewTerminalHandler(io.Writer(os.Stderr), false)) - glogger.Verbosity(log.LvlInfo) - log.SetDefault(log.NewLogger(glogger)) - ctx, cancel := context.WithCancel(context.Background()) defer cancel() builder := NewNodeBuilder(ctx).DefaultConfig(t, true) + builder.parallelise = false initialBalance := new(big.Int).Lsh(big.NewInt(1), 200) l1Info := builder.L1Info l1Info.GenerateGenesisAccount("deployer", initialBalance) diff --git a/system_tests/full_challenge_test.go b/system_tests/full_challenge_test.go index 96c82848d2..ec226a9d25 100644 --- a/system_tests/full_challenge_test.go +++ b/system_tests/full_challenge_test.go @@ -14,13 +14,11 @@ import ( ) func TestChallengeManagerFullAsserterIncorrect(t *testing.T) { - t.Parallel() defaultWasmRootDir := "" RunChallengeTest(t, false, false, makeBatch_MsgsPerBatch+1, defaultWasmRootDir) } func TestChallengeManagerFullAsserterIncorrectWithPublishedMachine(t *testing.T) { - t.Parallel() cr, err := github.LatestConsensusRelease(context.Background()) Require(t, err) machPath := populateMachineDir(t, cr) @@ -28,13 +26,11 @@ func TestChallengeManagerFullAsserterIncorrectWithPublishedMachine(t *testing.T) } func TestChallengeManagerFullAsserterCorrect(t *testing.T) { - t.Parallel() defaultWasmRootDir := "" RunChallengeTest(t, true, false, makeBatch_MsgsPerBatch+2, defaultWasmRootDir) } func TestChallengeManagerFullAsserterCorrectWithPublishedMachine(t *testing.T) { - t.Parallel() cr, err := github.LatestConsensusRelease(context.Background()) Require(t, err) machPath := populateMachineDir(t, cr) diff --git a/system_tests/infra_fee_test.go b/system_tests/infra_fee_test.go index 2e03eb0815..5c3ea7d806 100644 --- a/system_tests/infra_fee_test.go +++ b/system_tests/infra_fee_test.go @@ -20,7 +20,6 @@ import ( ) func TestInfraFee(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/initialization_test.go b/system_tests/initialization_test.go index 4807a8e67a..18c3541d98 100644 --- a/system_tests/initialization_test.go +++ b/system_tests/initialization_test.go @@ -46,7 +46,6 @@ func InitOneContract(prand *testhelpers.PseudoRandomDataSource) (*statetransfer. } func TestInitContract(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() expectedSums := make(map[common.Address]*big.Int) diff --git a/system_tests/l3_test.go b/system_tests/l3_test.go index 97eabcee78..b4366c4e1b 100644 --- a/system_tests/l3_test.go +++ b/system_tests/l3_test.go @@ -10,7 +10,6 @@ import ( ) func TestSimpleL3(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/maintenance_test.go b/system_tests/maintenance_test.go index a1f36bbcfc..c5ede67597 100644 --- a/system_tests/maintenance_test.go +++ b/system_tests/maintenance_test.go @@ -11,7 +11,6 @@ import ( ) func TestMaintenance(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/meaningless_reorg_test.go b/system_tests/meaningless_reorg_test.go index 350b21a6cf..ebcac24834 100644 --- a/system_tests/meaningless_reorg_test.go +++ b/system_tests/meaningless_reorg_test.go @@ -15,7 +15,6 @@ import ( ) func TestMeaninglessBatchReorg(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/nodeinterface_test.go b/system_tests/nodeinterface_test.go index 5c32dcf20f..9615ceece1 100644 --- a/system_tests/nodeinterface_test.go +++ b/system_tests/nodeinterface_test.go @@ -86,7 +86,6 @@ func TestFindBatch(t *testing.T) { } func TestL2BlockRangeForL1(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -146,7 +145,6 @@ func TestL2BlockRangeForL1(t *testing.T) { } func TestGetL1Confirmations(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/outbox_test.go b/system_tests/outbox_test.go index 2b3ff38da1..b9e4913496 100644 --- a/system_tests/outbox_test.go +++ b/system_tests/outbox_test.go @@ -52,7 +52,6 @@ func TestP256VerifyEnabled(t *testing.T) { } func TestOutboxProofs(t *testing.T) { - t.Parallel() gethhook.RequireHookedGeth() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/pendingblock_test.go b/system_tests/pendingblock_test.go index dc21bca525..f5d034351c 100644 --- a/system_tests/pendingblock_test.go +++ b/system_tests/pendingblock_test.go @@ -12,7 +12,6 @@ import ( ) func TestPendingBlockTimeAndNumberAdvance(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -32,7 +31,6 @@ func TestPendingBlockTimeAndNumberAdvance(t *testing.T) { } func TestPendingBlockArbBlockHashReturnsLatest(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/precompile_doesnt_revert_test.go b/system_tests/precompile_doesnt_revert_test.go index fc4b0e745e..06a616f20a 100644 --- a/system_tests/precompile_doesnt_revert_test.go +++ b/system_tests/precompile_doesnt_revert_test.go @@ -24,7 +24,6 @@ import ( // They are not a substitute for unit tests, as they don't test the actual functionality of the precompile. func TestArbAddressTableDoesntRevert(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -78,7 +77,6 @@ func TestArbAddressTableDoesntRevert(t *testing.T) { } func TestArbAggregatorDoesntRevert(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -103,7 +101,6 @@ func TestArbAggregatorDoesntRevert(t *testing.T) { } func TestArbosTestDoesntRevert(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -122,7 +119,6 @@ func TestArbosTestDoesntRevert(t *testing.T) { } func TestArbSysDoesntRevert(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -143,7 +139,6 @@ func TestArbSysDoesntRevert(t *testing.T) { } func TestArbOwnerDoesntRevert(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -183,7 +178,6 @@ func TestArbOwnerDoesntRevert(t *testing.T) { } func TestArbGasInfoDoesntRevert(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -230,7 +224,6 @@ func TestArbGasInfoDoesntRevert(t *testing.T) { } func TestArbRetryableTxDoesntRevert(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/precompile_test.go b/system_tests/precompile_test.go index 5bc6315086..8ca99e68db 100644 --- a/system_tests/precompile_test.go +++ b/system_tests/precompile_test.go @@ -264,7 +264,6 @@ func setupArbOwnerAndArbGasInfo( } func TestL1BaseFeeEstimateInertia(t *testing.T) { - t.Parallel() builder, cleanup, auth, arbOwner, arbGasInfo := setupArbOwnerAndArbGasInfo(t) defer cleanup() @@ -284,7 +283,6 @@ func TestL1BaseFeeEstimateInertia(t *testing.T) { // Similar to TestL1BaseFeeEstimateInertia, but now using a different setter from ArbOwner func TestL1PricingInertia(t *testing.T) { - t.Parallel() builder, cleanup, auth, arbOwner, arbGasInfo := setupArbOwnerAndArbGasInfo(t) defer cleanup() @@ -303,7 +301,6 @@ func TestL1PricingInertia(t *testing.T) { } func TestL1PricingRewardRate(t *testing.T) { - t.Parallel() builder, cleanup, auth, arbOwner, arbGasInfo := setupArbOwnerAndArbGasInfo(t) defer cleanup() @@ -322,7 +319,6 @@ func TestL1PricingRewardRate(t *testing.T) { } func TestL1PricingRewardRecipient(t *testing.T) { - t.Parallel() builder, cleanup, auth, arbOwner, arbGasInfo := setupArbOwnerAndArbGasInfo(t) defer cleanup() @@ -341,7 +337,6 @@ func TestL1PricingRewardRecipient(t *testing.T) { } func TestL2GasPricingInertia(t *testing.T) { - t.Parallel() builder, cleanup, auth, arbOwner, arbGasInfo := setupArbOwnerAndArbGasInfo(t) defer cleanup() @@ -360,7 +355,6 @@ func TestL2GasPricingInertia(t *testing.T) { } func TestL2GasBacklogTolerance(t *testing.T) { - t.Parallel() builder, cleanup, auth, arbOwner, arbGasInfo := setupArbOwnerAndArbGasInfo(t) defer cleanup() @@ -379,7 +373,6 @@ func TestL2GasBacklogTolerance(t *testing.T) { } func TestPerBatchGasCharge(t *testing.T) { - t.Parallel() builder, cleanup, auth, arbOwner, arbGasInfo := setupArbOwnerAndArbGasInfo(t) defer cleanup() @@ -398,7 +391,6 @@ func TestPerBatchGasCharge(t *testing.T) { } func TestL1PricingEquilibrationUnits(t *testing.T) { - t.Parallel() builder, cleanup, auth, arbOwner, arbGasInfo := setupArbOwnerAndArbGasInfo(t) defer cleanup() @@ -417,7 +409,6 @@ func TestL1PricingEquilibrationUnits(t *testing.T) { } func TestGasAccountingParams(t *testing.T) { - t.Parallel() builder, cleanup, auth, arbOwner, arbGasInfo := setupArbOwnerAndArbGasInfo(t) defer cleanup() @@ -450,7 +441,6 @@ func TestGasAccountingParams(t *testing.T) { } func TestCurrentTxL1GasFees(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -506,7 +496,6 @@ func TestGetBrotliCompressionLevel(t *testing.T) { } func TestArbStatistics(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -531,7 +520,6 @@ func TestArbStatistics(t *testing.T) { } func TestArbFunctionTable(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -567,7 +555,6 @@ func TestArbFunctionTable(t *testing.T) { } func TestArbAggregatorBaseFee(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -595,7 +582,6 @@ func TestArbAggregatorBaseFee(t *testing.T) { } func TestFeeAccounts(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -637,7 +623,6 @@ func TestFeeAccounts(t *testing.T) { } func TestChainOwners(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -712,7 +697,6 @@ func TestChainOwners(t *testing.T) { } func TestArbAggregatorBatchPosters(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -761,7 +745,6 @@ func TestArbAggregatorBatchPosters(t *testing.T) { } func TestArbAggregatorGetPreferredAggregator(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/program_gas_test.go b/system_tests/program_gas_test.go index 3450214a14..5421231832 100644 --- a/system_tests/program_gas_test.go +++ b/system_tests/program_gas_test.go @@ -78,7 +78,6 @@ func checkInkUsage( } func TestWriteResultGasUsage(t *testing.T) { - t.Parallel() builder := setupGasCostTest(t) auth := builder.L2Info.GetDefaultTransactOpts("Owner", builder.ctx) @@ -108,7 +107,6 @@ func TestWriteResultGasUsage(t *testing.T) { } func TestReadArgsGasUsage(t *testing.T) { - t.Parallel() builder := setupGasCostTest(t) auth := builder.L2Info.GetDefaultTransactOpts("Owner", builder.ctx) @@ -134,7 +132,6 @@ func TestReadArgsGasUsage(t *testing.T) { } func TestMsgReentrantGasUsage(t *testing.T) { - t.Parallel() builder := setupGasCostTest(t) auth := builder.L2Info.GetDefaultTransactOpts("Owner", builder.ctx) @@ -149,7 +146,6 @@ func TestMsgReentrantGasUsage(t *testing.T) { } func TestStorageCacheBytes32GasUsage(t *testing.T) { - t.Parallel() builder := setupGasCostTest(t) auth := builder.L2Info.GetDefaultTransactOpts("Owner", builder.ctx) @@ -164,7 +160,6 @@ func TestStorageCacheBytes32GasUsage(t *testing.T) { } func TestPayForMemoryGrowGasUsage(t *testing.T) { - t.Parallel() builder := setupGasCostTest(t) auth := builder.L2Info.GetDefaultTransactOpts("Owner", builder.ctx) diff --git a/system_tests/program_norace_test.go b/system_tests/program_norace_test.go index b1e5af8395..bc03f2ad0d 100644 --- a/system_tests/program_norace_test.go +++ b/system_tests/program_norace_test.go @@ -106,7 +106,6 @@ func validateBlockRange( } func TestProgramEvmData(t *testing.T) { - t.Parallel() testEvmData(t, true) } diff --git a/system_tests/program_test.go b/system_tests/program_test.go index 053cfe859d..8641885a53 100644 --- a/system_tests/program_test.go +++ b/system_tests/program_test.go @@ -49,7 +49,6 @@ var oneEth = arbmath.UintToBig(1e18) var allWasmTargets = []string{string(rawdb.TargetWavm), string(rawdb.TargetArm64), string(rawdb.TargetAmd64), string(rawdb.TargetHost)} func TestProgramKeccak(t *testing.T) { - t.Parallel() t.Run("WithDefaultWasmTargets", func(t *testing.T) { keccakTest(t, true) }) @@ -161,7 +160,6 @@ func keccakTest(t *testing.T, jit bool, builderOpts ...func(*NodeBuilder)) { } func TestProgramActivateTwice(t *testing.T) { - t.Parallel() t.Run("WithDefaultWasmTargets", func(t *testing.T) { testActivateTwice(t, true) }) @@ -268,7 +266,6 @@ func testActivateTwice(t *testing.T, jit bool, builderOpts ...func(*NodeBuilder) } func TestStylusUpgrade(t *testing.T) { - t.Parallel() testStylusUpgrade(t, true) } @@ -364,7 +361,6 @@ func testStylusUpgrade(t *testing.T, jit bool) { } func TestProgramErrors(t *testing.T) { - t.Parallel() errorTest(t, true) } @@ -406,7 +402,6 @@ func errorTest(t *testing.T, jit bool) { } func TestProgramStorage(t *testing.T) { - t.Parallel() storageTest(t, true) } @@ -507,7 +502,6 @@ func transientStorageTest(t *testing.T, jit bool) { } func TestProgramMath(t *testing.T) { - t.Parallel() fastMathTest(t, true) } @@ -535,7 +529,6 @@ func fastMathTest(t *testing.T, jit bool) { } func TestProgramCalls(t *testing.T) { - t.Parallel() testCalls(t, true) } @@ -750,7 +743,6 @@ func testCalls(t *testing.T, jit bool) { } func TestProgramReturnData(t *testing.T) { - t.Parallel() testReturnData(t, true) } @@ -803,12 +795,10 @@ func testReturnData(t *testing.T, jit bool) { } func TestProgramLogs(t *testing.T) { - t.Parallel() testLogs(t, true, false) } func TestProgramLogsWithTracing(t *testing.T) { - t.Parallel() testLogs(t, true, true) } @@ -917,7 +907,6 @@ func testLogs(t *testing.T, jit, tracing bool) { } func TestProgramCreate(t *testing.T) { - t.Parallel() testCreate(t, true) } @@ -1013,9 +1002,7 @@ func testCreate(t *testing.T, jit bool) { } func TestProgramInfiniteLoopShouldCauseErrOutOfGas(t *testing.T) { - t.Parallel() testInfiniteLoopCausesErrOutOfGas(t, true) - testInfiniteLoopCausesErrOutOfGas(t, false) } func testInfiniteLoopCausesErrOutOfGas(t *testing.T, jit bool) { @@ -1038,7 +1025,6 @@ func testInfiniteLoopCausesErrOutOfGas(t *testing.T, jit bool) { } func TestProgramMemory(t *testing.T) { - t.Parallel() testMemory(t, true) } @@ -1196,7 +1182,6 @@ func testMemory(t *testing.T, jit bool) { } func TestProgramActivateFails(t *testing.T) { - t.Parallel() testActivateFails(t, true) } @@ -1235,7 +1220,6 @@ func testActivateFails(t *testing.T, jit bool) { } func TestProgramSdkStorage(t *testing.T) { - t.Parallel() testSdkStorage(t, true) } @@ -1431,7 +1415,6 @@ func TestStylusPrecompileMethodsSimple(t *testing.T) { } func TestProgramActivationLogs(t *testing.T) { - t.Parallel() builder, auth, cleanup := setupProgramTest(t, true) l2client := builder.L2.Client ctx := builder.ctx @@ -1471,7 +1454,6 @@ func TestProgramActivationLogs(t *testing.T) { } func TestProgramEarlyExit(t *testing.T) { - t.Parallel() testEarlyExit(t, true) } @@ -1681,8 +1663,11 @@ func testReturnDataCost(t *testing.T, arbosVersion uint64) { } } -func TestReturnDataCost(t *testing.T) { +func TestReturnDataCostOld(t *testing.T) { testReturnDataCost(t, params.ArbosVersion_Stylus) +} + +func TestReturnDataCostNew(t *testing.T) { testReturnDataCost(t, params.ArbosVersion_StylusFixes) } @@ -2494,7 +2479,7 @@ func TestWasmLongTermCache(t *testing.T) { func TestRepopulateWasmLongTermCacheFromLru(t *testing.T) { builder, ownerAuth, cleanup := setupProgramTest(t, true, func(builder *NodeBuilder) { - builder.WithStylusLongTermCache(true) + builder.WithStylusLongTermCache(true).DontParalellise() }) ctx := builder.ctx l2info := builder.L2Info diff --git a/system_tests/recreatestate_rpc_test.go b/system_tests/recreatestate_rpc_test.go index dc1356347c..90d9735e40 100644 --- a/system_tests/recreatestate_rpc_test.go +++ b/system_tests/recreatestate_rpc_test.go @@ -340,7 +340,6 @@ func TestRecreateStateForRPCBlockNotFoundWhileRecreating(t *testing.T) { } func testSkippingSavingStateAndRecreatingAfterRestart(t *testing.T, cacheConfig *gethexec.CachingConfig, txCount int) { - t.Parallel() maxRecreateStateDepth := int64(30 * 1000 * 1000) ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/reorg_resequencing_test.go b/system_tests/reorg_resequencing_test.go index 8f452ce95d..26d17a3f0c 100644 --- a/system_tests/reorg_resequencing_test.go +++ b/system_tests/reorg_resequencing_test.go @@ -28,7 +28,6 @@ import ( // If step 1 is still executing when Execution calls TransactionStreamer in step 2 then this error happens: // 'failed to re-sequence old user message removed by reorg err="insert lock taken"' func TestReorgResequencing(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/retryable_test.go b/system_tests/retryable_test.go index 4f94452903..acb0a4df58 100644 --- a/system_tests/retryable_test.go +++ b/system_tests/retryable_test.go @@ -136,7 +136,6 @@ func TestRetryableNoExist(t *testing.T) { } func TestEstimateRetryableTicketWithNoFundsAndZeroGasPrice(t *testing.T) { - t.Parallel() builder, _, _, ctx, teardown := retryableSetup(t) defer teardown() @@ -168,7 +167,6 @@ func TestEstimateRetryableTicketWithNoFundsAndZeroGasPrice(t *testing.T) { } func TestSubmitRetryableImmediateSuccess(t *testing.T) { - t.Parallel() builder, delayedInbox, lookupL2Tx, ctx, teardown := retryableSetup(t) defer teardown() @@ -246,7 +244,6 @@ func TestSubmitRetryableImmediateSuccess(t *testing.T) { } func testSubmitRetryableEmptyEscrow(t *testing.T, arbosVersion uint64) { - t.Parallel() builder, delayedInbox, lookupL2Tx, ctx, teardown := retryableSetup(t, func(builder *NodeBuilder) { builder.WithArbOSVersion(arbosVersion) }) @@ -335,7 +332,6 @@ func TestSubmitRetryableEmptyEscrowArbOS30(t *testing.T) { } func TestSubmitRetryableFailThenRetry(t *testing.T) { - t.Parallel() builder, delayedInbox, lookupL2Tx, ctx, teardown := retryableSetup(t) defer teardown() @@ -431,7 +427,6 @@ func TestSubmitRetryableFailThenRetry(t *testing.T) { } func TestGetLifetime(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -476,7 +471,6 @@ func warpL1Time(t *testing.T, builder *NodeBuilder, ctx context.Context, current } func TestRetryableExpiry(t *testing.T) { - t.Parallel() builder, delayedInbox, lookupL2Tx, ctx, teardown := retryableSetup(t) defer teardown() @@ -543,7 +537,6 @@ func TestRetryableExpiry(t *testing.T) { } func TestKeepaliveAndRetryableExpiry(t *testing.T) { - t.Parallel() builder, delayedInbox, lookupL2Tx, ctx, teardown := retryableSetup(t) defer teardown() @@ -633,7 +626,6 @@ func TestKeepaliveAndRetryableExpiry(t *testing.T) { } func TestKeepaliveAndCancelRetryable(t *testing.T) { - t.Parallel() builder, delayedInbox, lookupL2Tx, ctx, teardown := retryableSetup(t) defer teardown() @@ -722,7 +714,6 @@ func TestKeepaliveAndCancelRetryable(t *testing.T) { } func TestSubmissionGasCosts(t *testing.T) { - t.Parallel() builder, delayedInbox, lookupL2Tx, ctx, teardown := retryableSetup(t) defer teardown() infraFeeAddr, networkFeeAddr := setupFeeAddresses(t, ctx, builder) @@ -894,7 +885,6 @@ func waitForL1DelayBlocks(t *testing.T, builder *NodeBuilder) { } func TestDepositETH(t *testing.T) { - t.Parallel() builder, delayedInbox, lookupL2Tx, ctx, teardown := retryableSetup(t) defer teardown() @@ -989,7 +979,6 @@ func TestArbitrumContractTx(t *testing.T) { } func TestL1FundedUnsignedTransaction(t *testing.T) { - t.Parallel() ctx := context.Background() builder := NewNodeBuilder(ctx).DefaultConfig(t, true) cleanup := builder.Build(t) diff --git a/system_tests/seq_coordinator_test.go b/system_tests/seq_coordinator_test.go index f6de83b3d3..28994c0c23 100644 --- a/system_tests/seq_coordinator_test.go +++ b/system_tests/seq_coordinator_test.go @@ -48,7 +48,7 @@ func TestRedisSeqCoordinatorPriorities(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - builder := NewNodeBuilder(ctx).DefaultConfig(t, false) + builder := NewNodeBuilder(ctx).DefaultConfig(t, false).DontParalellise() builder.takeOwnership = false builder.nodeConfig.SeqCoordinator.Enable = true builder.nodeConfig.SeqCoordinator.RedisUrl = redisutil.CreateTestRedis(ctx, t) diff --git a/system_tests/seq_filter_test.go b/system_tests/seq_filter_test.go index d57bb8fd0a..c57ae03bd2 100644 --- a/system_tests/seq_filter_test.go +++ b/system_tests/seq_filter_test.go @@ -21,7 +21,6 @@ import ( ) func TestSequencerTxFilter(t *testing.T) { - t.Parallel() builder, header, txes, hooks, cleanup := setupSequencerFilterTest(t, false) defer cleanup() @@ -49,7 +48,6 @@ func TestSequencerTxFilter(t *testing.T) { } func TestSequencerBlockFilterReject(t *testing.T) { - t.Parallel() builder, header, txes, hooks, cleanup := setupSequencerFilterTest(t, true) defer cleanup() @@ -67,7 +65,6 @@ func TestSequencerBlockFilterReject(t *testing.T) { } func TestSequencerBlockFilterAccept(t *testing.T) { - t.Parallel() builder, header, txes, hooks, cleanup := setupSequencerFilterTest(t, true) defer cleanup() diff --git a/system_tests/seq_nonce_test.go b/system_tests/seq_nonce_test.go index 7486b8a4ae..b1247d14be 100644 --- a/system_tests/seq_nonce_test.go +++ b/system_tests/seq_nonce_test.go @@ -20,7 +20,6 @@ import ( ) func TestSequencerParallelNonces(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -59,7 +58,6 @@ func TestSequencerParallelNonces(t *testing.T) { } func TestSequencerNonceTooHigh(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -86,7 +84,6 @@ func TestSequencerNonceTooHigh(t *testing.T) { } func TestSequencerNonceTooHighQueueFull(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/seq_pause_test.go b/system_tests/seq_pause_test.go index c867a98271..1f102e01b1 100644 --- a/system_tests/seq_pause_test.go +++ b/system_tests/seq_pause_test.go @@ -13,7 +13,6 @@ import ( ) func TestSequencerPause(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/seq_reject_test.go b/system_tests/seq_reject_test.go index be230e26f5..5bfd741fe5 100644 --- a/system_tests/seq_reject_test.go +++ b/system_tests/seq_reject_test.go @@ -24,7 +24,6 @@ import ( ) func TestSequencerRejection(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -36,6 +35,7 @@ func TestSequencerRejection(t *testing.T) { builder := NewNodeBuilder(ctx).DefaultConfig(t, false) builder.takeOwnership = false + builder.parallelise = false port := testhelpers.AddrTCPPort(builderSeq.L2.ConsensusNode.BroadcastServer.ListenerAddr(), t) builder.nodeConfig.Feed.Input = *newBroadcastClientConfigTest(port) cleanup := builder.Build(t) diff --git a/system_tests/seqcompensation_test.go b/system_tests/seqcompensation_test.go index 41133b8a42..6ac3789585 100644 --- a/system_tests/seqcompensation_test.go +++ b/system_tests/seqcompensation_test.go @@ -16,7 +16,6 @@ import ( // L1 Pricer pool address gets something when the sequencer posts batches func TestSequencerCompensation(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() builder := NewNodeBuilder(ctx).DefaultConfig(t, true) diff --git a/system_tests/seqfeed_test.go b/system_tests/seqfeed_test.go index b757291561..69169245e4 100644 --- a/system_tests/seqfeed_test.go +++ b/system_tests/seqfeed_test.go @@ -65,6 +65,7 @@ func TestSequencerFeed(t *testing.T) { builder := NewNodeBuilder(ctx).DefaultConfig(t, false) builder.nodeConfig.Feed.Input = *newBroadcastClientConfigTest(port) builder.takeOwnership = false + builder.parallelise = false cleanup := builder.Build(t) defer cleanup() client := builder.L2.Client @@ -93,7 +94,6 @@ func TestSequencerFeed(t *testing.T) { } func TestRelayedSequencerFeed(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -123,6 +123,7 @@ func TestRelayedSequencerFeed(t *testing.T) { builder := NewNodeBuilder(ctx).DefaultConfig(t, false) builder.nodeConfig.Feed.Input = *newBroadcastClientConfigTest(port) builder.takeOwnership = false + builder.parallelise = false cleanup := builder.Build(t) defer cleanup() node, client := builder.L2.ConsensusNode, builder.L2.Client @@ -187,7 +188,6 @@ func compareAllMsgResultsFromConsensusAndExecution( } func testLyingSequencer(t *testing.T, dasModeStr string) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -363,7 +363,7 @@ func testBlockHashComparison(t *testing.T, blockHash *common.Hash, mustMismatch port := testhelpers.AddrTCPPort(wsBroadcastServer.ListenerAddr(), t) - builder := NewNodeBuilder(ctx).DefaultConfig(t, true) + builder := NewNodeBuilder(ctx).DefaultConfig(t, true).DontParalellise() builder.nodeConfig.Feed.Input = *newBroadcastClientConfigTest(port) cleanup := builder.Build(t) defer cleanup() diff --git a/system_tests/seqinbox_test.go b/system_tests/seqinbox_test.go index a8a7ee1b2e..2fefaf963c 100644 --- a/system_tests/seqinbox_test.go +++ b/system_tests/seqinbox_test.go @@ -134,7 +134,6 @@ func deployGasRefunder(ctx context.Context, t *testing.T, builder *NodeBuilder) } func testSequencerInboxReaderImpl(t *testing.T, validator bool) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/staker_test.go b/system_tests/staker_test.go index e0444055d9..27d28b61c7 100644 --- a/system_tests/staker_test.go +++ b/system_tests/staker_test.go @@ -73,7 +73,7 @@ func stakerTestImpl(t *testing.T, faultyStaker bool, honestStakerInactive bool) }() var transferGas = util.NormalizeL2GasForL1GasInitial(800_000, params.GWei) // include room for aggregator L1 costs - builder := NewNodeBuilder(ctx).DefaultConfig(t, true) + builder := NewNodeBuilder(ctx).DefaultConfig(t, true).DontParalellise() builder.L2Info = NewBlockChainTestInfo( t, types.NewArbitrumSigner(types.NewLondonSigner(builder.chainConfig.ChainID)), big.NewInt(l2pricing.InitialBaseFeeWei*2), @@ -479,7 +479,6 @@ func TestStakersCooperative(t *testing.T) { } func TestGetValidatorWalletContractWithDataposterOnlyUsedToCreateValidatorWalletContract(t *testing.T) { - t.Parallel() ctx, cancelCtx := context.WithCancel(context.Background()) defer cancelCtx() diff --git a/system_tests/storage_trie_test.go b/system_tests/storage_trie_test.go index 75a2f5aee6..b97b47b738 100644 --- a/system_tests/storage_trie_test.go +++ b/system_tests/storage_trie_test.go @@ -17,7 +17,6 @@ import ( ) func TestStorageTrie(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/stylus_test.go b/system_tests/stylus_test.go index 331bca2e9c..79ce53d9c7 100644 --- a/system_tests/stylus_test.go +++ b/system_tests/stylus_test.go @@ -57,12 +57,10 @@ func TestProgramArbitratorMemory(t *testing.T) { } func TestProgramArbitratorActivateTwice(t *testing.T) { - t.Parallel() testActivateTwice(t, false) } func TestProgramArbitratorActivateFails(t *testing.T) { - t.Parallel() testActivateFails(t, false) } @@ -70,6 +68,10 @@ func TestProgramArbitratorEarlyExit(t *testing.T) { testEarlyExit(t, false) } +func TestProgramArbitratorInfiniteLoopShouldCauseErrOutOfGas(t *testing.T) { + testInfiniteLoopCausesErrOutOfGas(t, false) +} + func fullRecurseTest() [][]multiCallRecurse { result := make([][]multiCallRecurse, 0) for _, op0 := range []vm.OpCode{vm.SSTORE, vm.SLOAD} { diff --git a/system_tests/timeboost_test.go b/system_tests/timeboost_test.go index de09dfa6fd..43b7441046 100644 --- a/system_tests/timeboost_test.go +++ b/system_tests/timeboost_test.go @@ -63,7 +63,6 @@ func TestAuctionResolutionDuringATieMultipleRuns(t *testing.T) { } func testAuctionResolutionDuringATie(t *testing.T, multiRuns bool) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -176,7 +175,6 @@ func TestExpressLaneTxsHandlingDuringSequencerSwapDueToActiveSequencerCrashing(t } func testTxsHandlingDuringSequencerSwap(t *testing.T, dueToCrash bool) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -309,7 +307,6 @@ func testTxsHandlingDuringSequencerSwap(t *testing.T, dueToCrash bool) { } func TestForwardingExpressLaneTxs(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -354,7 +351,6 @@ func TestForwardingExpressLaneTxs(t *testing.T) { } func TestExpressLaneTransactionHandlingComplex(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -451,7 +447,6 @@ func TestExpressLaneTransactionHandlingComplex(t *testing.T) { } func TestExpressLaneTransactionHandling(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -601,7 +596,6 @@ func dbKey(prefix []byte, pos uint64) []byte { } func TestTimeboostBulkBlockMetadataFetcher(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -970,8 +964,7 @@ func TestTimeboostBulkBlockMetadataAPI(t *testing.T) { } // func TestExpressLaneControlTransfer(t *testing.T) { -// t.Parallel() -// ctx, cancel := context.WithCancel(context.Background()) +// // ctx, cancel := context.WithCancel(context.Background()) // defer cancel() // tmpDir, err := os.MkdirTemp("", "*") @@ -1071,7 +1064,6 @@ func TestTimeboostBulkBlockMetadataAPI(t *testing.T) { // } func TestSequencerFeed_ExpressLaneAuction_ExpressLaneTxsHaveAdvantage(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -1115,7 +1107,6 @@ func TestSequencerFeed_ExpressLaneAuction_ExpressLaneTxsHaveAdvantage(t *testing } func TestSequencerFeed_ExpressLaneAuction_InnerPayloadNoncesAreRespected_TimeboostedFieldIsCorrect(t *testing.T) { - t.Parallel() logHandler := testhelpers.InitTestLog(t, log.LevelInfo) ctx, cancel := context.WithCancel(context.Background()) diff --git a/system_tests/transfer_test.go b/system_tests/transfer_test.go index c221ecc137..cc5cfec233 100644 --- a/system_tests/transfer_test.go +++ b/system_tests/transfer_test.go @@ -61,8 +61,10 @@ func TestP256Verify(t *testing.T) { want: common.Hex2Bytes("0000000000000000000000000000000000000000000000000000000000000001"), }, } { + tc := tc t.Run(tc.desc, func(t *testing.T) { builder := NewNodeBuilder(ctx).DefaultConfig(t, false) + builder.parallelise = false builder.chainConfig.ArbitrumChainParams.InitialArbOSVersion = tc.initialVersion cleanup := builder.Build(t) defer cleanup() diff --git a/system_tests/twonodes_test.go b/system_tests/twonodes_test.go index c8e348cffb..e96b31438c 100644 --- a/system_tests/twonodes_test.go +++ b/system_tests/twonodes_test.go @@ -13,7 +13,6 @@ import ( ) func testTwoNodesSimple(t *testing.T, dasModeStr string) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() diff --git a/system_tests/twonodeslong_test.go b/system_tests/twonodeslong_test.go index 5791661b16..636a0bdbfa 100644 --- a/system_tests/twonodeslong_test.go +++ b/system_tests/twonodeslong_test.go @@ -21,7 +21,6 @@ import ( ) func testTwoNodesLong(t *testing.T, dasModeStr string) { - t.Parallel() largeLoops := 8 avgL2MsgsPerLoop := 30 avgDelayedMessagesPerLoop := 10 diff --git a/system_tests/validation_mock_test.go b/system_tests/validation_mock_test.go index 98dab7ad39..af054016e7 100644 --- a/system_tests/validation_mock_test.go +++ b/system_tests/validation_mock_test.go @@ -206,7 +206,6 @@ func createMockValidationNode(t *testing.T, ctx context.Context, config *server_ // mostly tests translation to/from json and running over network func TestValidationServerAPI(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() _, validationDefault := createMockValidationNode(t, ctx, nil) @@ -283,7 +282,6 @@ func TestValidationServerAPI(t *testing.T) { } func TestValidationClientRoom(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() mockSpawner, spawnerStack := createMockValidationNode(t, ctx, nil) @@ -365,7 +363,6 @@ func TestValidationClientRoom(t *testing.T) { } func TestExecutionKeepAlive(t *testing.T) { - t.Parallel() ctx, cancel := context.WithCancel(context.Background()) defer cancel() _, validationDefault := createMockValidationNode(t, ctx, nil)