diff --git a/pkg/cli/debug_synctest.go b/pkg/cli/debug_synctest.go index 4ca47b1ff35c..be359c2ee0b0 100644 --- a/pkg/cli/debug_synctest.go +++ b/pkg/cli/debug_synctest.go @@ -30,6 +30,11 @@ import ( "github.com/spf13/cobra" ) +// TODO(sumeer): consider deleting this command, now that it is no longer +// exercised by the synctest roachtest (which has been deleted). We will need +// to confirm that users of CockroachDB are not running it as part of their +// testing. + var debugSyncTestCmd = &cobra.Command{ Use: "synctest <empty-dir> <nemesis-script>", Short: "Run a log-like workload that can help expose filesystem anomalies", diff --git a/pkg/cmd/roachtest/tests/BUILD.bazel b/pkg/cmd/roachtest/tests/BUILD.bazel index aeccbb0757f0..22f2563bc5e9 100644 --- a/pkg/cmd/roachtest/tests/BUILD.bazel +++ b/pkg/cmd/roachtest/tests/BUILD.bazel @@ -152,7 +152,6 @@ go_library( "sqlsmith.go", "sstable_corruption.go", "status_server.go", - "synctest.go", "sysbench.go", "tlp.go", "tombstones.go", diff --git a/pkg/cmd/roachtest/tests/synctest.go b/pkg/cmd/roachtest/tests/synctest.go deleted file mode 100644 index 8f79ef2f3275..000000000000 --- a/pkg/cmd/roachtest/tests/synctest.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2018 The Cockroach Authors. -// -// Use of this software is governed by the Business Source License -// included in the file licenses/BSL.txt. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0, included in the file -// licenses/APL.txt. - -package tests - -import ( - "context" - "os" - "path/filepath" - - "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster" - "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/registry" - "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/spec" - "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test" -) - -func registerSyncTest(r registry.Registry) { - const nemesisScript = `#!/usr/bin/env bash - -if [[ $1 == "on" ]]; then - charybdefs-nemesis --probability -else - charybdefs-nemesis --clear -fi -` - - r.Add(registry.TestSpec{ - Skip: "#48603: broken on Pebble", - Name: "synctest", - Owner: registry.OwnerStorage, - // This test sets up a custom file system; we don't want the cluster reused. - Cluster: r.MakeClusterSpec(1, spec.ReuseNone()), - Leases: registry.MetamorphicLeases, - Run: func(ctx context.Context, t test.Test, c cluster.Cluster) { - n := c.Node(1) - tmpDir, err := os.MkdirTemp("", "synctest") - if err != nil { - t.Fatal(err) - } - defer func() { - _ = os.RemoveAll(tmpDir) - }() - nemesis := filepath.Join(tmpDir, "nemesis") - - if err := os.WriteFile(nemesis, []byte(nemesisScript), 0755); err != nil { - t.Fatal(err) - } - - c.Put(ctx, t.Cockroach(), "./cockroach") - c.Put(ctx, nemesis, "./nemesis") - c.Run(ctx, n, "chmod +x nemesis") - c.Run(ctx, n, "sudo umount {store-dir}/faulty || true") - c.Run(ctx, n, "mkdir -p {store-dir}/{real,faulty} || true") - t.Status("setting up charybdefs") - - if err := c.Install(ctx, t.L(), n, "charybdefs"); err != nil { - t.Fatal(err) - } - c.Run(ctx, n, "sudo charybdefs {store-dir}/faulty -oallow_other,modules=subdir,subdir={store-dir}/real && chmod 777 {store-dir}/{real,faulty}") - - t.Status("running synctest") - c.Run(ctx, n, "./cockroach debug synctest {store-dir}/faulty ./nemesis") - }, - }) -}