From 0bd35a096f9841bd6b1149080a3acc42045f6615 Mon Sep 17 00:00:00 2001 From: Malte Poll <1780588+malt3@users.noreply.github.com> Date: Tue, 16 Jan 2024 17:45:35 +0100 Subject: [PATCH] goleak: ignore rules_go SIGTERM handler rules_go added a SIGTERM handler that has a goroutine that survives the scope of the goleak check. Currently, the best known workaround is to ignore this goroutine. https://github.com/uber-go/goleak/issues/119 https://github.com/bazelbuild/rules_go/pull/3749 https://github.com/bazelbuild/rules_go/pull/3827#issuecomment-1894002120 --- bootstrapper/internal/clean/clean_test.go | 2 +- bootstrapper/internal/diskencryption/diskencryption_test.go | 2 +- bootstrapper/internal/initserver/initserver_test.go | 1 + bootstrapper/internal/joinclient/joinclient_test.go | 2 +- bootstrapper/internal/kubernetes/k8sapi/kubeadm_config_test.go | 2 +- bootstrapper/internal/kubernetes/kubernetes_test.go | 2 +- bootstrapper/internal/kubernetes/kubewaiter/kubewaiter_test.go | 2 +- cli/internal/cloudcmd/clients_test.go | 1 + cli/internal/cmd/cloud_test.go | 1 + cli/internal/terraform/terraform_test.go | 2 +- csi/cryptmapper/cryptmapper_test.go | 2 +- csi/kms/constellation_test.go | 2 +- csi/test/mount_integration_test.go | 2 +- debugd/internal/debugd/deploy/download_test.go | 1 + .../debugd/metadata/cloudprovider/cloudprovider_test.go | 1 + debugd/internal/debugd/metadata/fallback/fallback_test.go | 2 +- debugd/internal/debugd/metadata/scheduler_test.go | 2 +- debugd/internal/debugd/server/server_test.go | 2 +- debugd/internal/filetransfer/filetransfer_test.go | 2 +- debugd/internal/filetransfer/streamer/streamer_test.go | 2 +- disk-mapper/internal/recoveryserver/recoveryserver_test.go | 1 + disk-mapper/internal/rejoinclient/rejoinclient_test.go | 2 +- disk-mapper/internal/setup/setup_test.go | 2 +- disk-mapper/internal/systemd/systemd_test.go | 2 +- disk-mapper/internal/test/integration_test.go | 1 + hack/bazel-deps-mirror/internal/bazelfiles/files_test.go | 2 +- hack/bazel-deps-mirror/internal/issues/issues_test.go | 2 +- hack/bazel-deps-mirror/internal/mirror/mirror_test.go | 2 +- hack/bazel-deps-mirror/internal/rules/rules_test.go | 2 +- image/measured-boot/extract/extract_test.go | 2 +- image/measured-boot/measure/measure_test.go | 2 +- internal/api/versionsapi/fetcher_test.go | 2 +- internal/atls/atls_test.go | 2 +- .../measurements/measurement-generator/generate_test.go | 2 +- internal/attestation/vtpm/vtpm_test.go | 2 +- internal/cloud/aws/logger_test.go | 2 +- internal/cloud/azure/azure_test.go | 2 +- internal/cloud/azureshared/appcredentials_test.go | 2 +- internal/cloud/gcp/gcp_test.go | 1 + internal/config/config_test.go | 2 +- internal/crypto/crypto_test.go | 2 +- internal/file/file_test.go | 2 +- internal/grpc/atlscredentials/atlscredentials_test.go | 2 +- internal/grpc/dialer/dialer_test.go | 2 +- internal/imagefetcher/imagefetcher_test.go | 2 +- internal/kms/kms/cluster/cluster_test.go | 2 +- internal/kms/kms/internal/internal_test.go | 1 + internal/kms/setup/setup_test.go | 1 + internal/kms/storage/memfs/memfs_test.go | 1 + internal/kms/uri/uri_test.go | 2 +- internal/nodestate/nodestate_test.go | 2 +- internal/osimage/secureboot/secureboot_test.go | 2 +- internal/retry/retry_test.go | 2 +- internal/role/role_test.go | 2 +- internal/sigstore/rekor_integration_test.go | 2 +- internal/staticupload/staticupload_test.go | 2 +- internal/versions/hash-generator/generate_test.go | 2 +- joinservice/internal/kms/kms_test.go | 2 +- joinservice/internal/kubeadm/kubeadm_test.go | 2 +- joinservice/internal/kubernetes/kubernetes_test.go | 2 +- joinservice/internal/kubernetesca/kubernetesca_test.go | 2 +- joinservice/internal/server/server_test.go | 2 +- joinservice/internal/watcher/validator_test.go | 1 + keyservice/internal/server/server_test.go | 2 +- .../internal/executor/executor_test.go | 2 +- s3proxy/internal/kms/kms_test.go | 2 +- verify/server/server_test.go | 2 +- 67 files changed, 67 insertions(+), 55 deletions(-) diff --git a/bootstrapper/internal/clean/clean_test.go b/bootstrapper/internal/clean/clean_test.go index 5426de44b..f4dd2558c 100644 --- a/bootstrapper/internal/clean/clean_test.go +++ b/bootstrapper/internal/clean/clean_test.go @@ -16,7 +16,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestNew(t *testing.T) { diff --git a/bootstrapper/internal/diskencryption/diskencryption_test.go b/bootstrapper/internal/diskencryption/diskencryption_test.go index 0c4e9c9f5..3de14842a 100644 --- a/bootstrapper/internal/diskencryption/diskencryption_test.go +++ b/bootstrapper/internal/diskencryption/diskencryption_test.go @@ -18,7 +18,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestUpdatePassphrase(t *testing.T) { diff --git a/bootstrapper/internal/initserver/initserver_test.go b/bootstrapper/internal/initserver/initserver_test.go index 65c4485b5..155fa1793 100644 --- a/bootstrapper/internal/initserver/initserver_test.go +++ b/bootstrapper/internal/initserver/initserver_test.go @@ -38,6 +38,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/bootstrapper/internal/joinclient/joinclient_test.go b/bootstrapper/internal/joinclient/joinclient_test.go index b527b1f23..82426b0a5 100644 --- a/bootstrapper/internal/joinclient/joinclient_test.go +++ b/bootstrapper/internal/joinclient/joinclient_test.go @@ -35,7 +35,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestClient(t *testing.T) { diff --git a/bootstrapper/internal/kubernetes/k8sapi/kubeadm_config_test.go b/bootstrapper/internal/kubernetes/k8sapi/kubeadm_config_test.go index 66a0d3dd3..6fef72a88 100644 --- a/bootstrapper/internal/kubernetes/k8sapi/kubeadm_config_test.go +++ b/bootstrapper/internal/kubernetes/k8sapi/kubeadm_config_test.go @@ -18,7 +18,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestInitConfiguration(t *testing.T) { diff --git a/bootstrapper/internal/kubernetes/kubernetes_test.go b/bootstrapper/internal/kubernetes/kubernetes_test.go index 4bc85af5f..4f179f549 100644 --- a/bootstrapper/internal/kubernetes/kubernetes_test.go +++ b/bootstrapper/internal/kubernetes/kubernetes_test.go @@ -30,7 +30,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestInitCluster(t *testing.T) { diff --git a/bootstrapper/internal/kubernetes/kubewaiter/kubewaiter_test.go b/bootstrapper/internal/kubernetes/kubewaiter/kubewaiter_test.go index bb0174ae9..fe51e2dbb 100644 --- a/bootstrapper/internal/kubernetes/kubewaiter/kubewaiter_test.go +++ b/bootstrapper/internal/kubernetes/kubewaiter/kubewaiter_test.go @@ -17,7 +17,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestCloudKubeAPIWaiter(t *testing.T) { diff --git a/cli/internal/cloudcmd/clients_test.go b/cli/internal/cloudcmd/clients_test.go index ec229156c..770907a39 100644 --- a/cli/internal/cloudcmd/clients_test.go +++ b/cli/internal/cloudcmd/clients_test.go @@ -23,6 +23,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/cli/internal/cmd/cloud_test.go b/cli/internal/cmd/cloud_test.go index ceb8636a5..b72cade7b 100644 --- a/cli/internal/cmd/cloud_test.go +++ b/cli/internal/cmd/cloud_test.go @@ -23,6 +23,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/cli/internal/terraform/terraform_test.go b/cli/internal/terraform/terraform_test.go index d603679f3..bf923c236 100644 --- a/cli/internal/terraform/terraform_test.go +++ b/cli/internal/terraform/terraform_test.go @@ -30,7 +30,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestPrepareCluster(t *testing.T) { diff --git a/csi/cryptmapper/cryptmapper_test.go b/csi/cryptmapper/cryptmapper_test.go index fbc9dcd63..537c0f067 100644 --- a/csi/cryptmapper/cryptmapper_test.go +++ b/csi/cryptmapper/cryptmapper_test.go @@ -18,7 +18,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestCloseCryptDevice(t *testing.T) { diff --git a/csi/kms/constellation_test.go b/csi/kms/constellation_test.go index 4b362d287..3b82a8c1c 100644 --- a/csi/kms/constellation_test.go +++ b/csi/kms/constellation_test.go @@ -19,7 +19,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } type stubKMSClient struct { diff --git a/csi/test/mount_integration_test.go b/csi/test/mount_integration_test.go index 6b01a0a62..986636bf1 100644 --- a/csi/test/mount_integration_test.go +++ b/csi/test/mount_integration_test.go @@ -91,7 +91,7 @@ func TestMain(m *testing.M) { os.Exit(1) } - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) result := m.Run() os.Exit(result) diff --git a/debugd/internal/debugd/deploy/download_test.go b/debugd/internal/debugd/deploy/download_test.go index c6215092d..8477377c5 100644 --- a/debugd/internal/debugd/deploy/download_test.go +++ b/debugd/internal/debugd/deploy/download_test.go @@ -27,6 +27,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/debugd/internal/debugd/metadata/cloudprovider/cloudprovider_test.go b/debugd/internal/debugd/metadata/cloudprovider/cloudprovider_test.go index 53eb3ad8e..e7cbf23e5 100644 --- a/debugd/internal/debugd/metadata/cloudprovider/cloudprovider_test.go +++ b/debugd/internal/debugd/metadata/cloudprovider/cloudprovider_test.go @@ -22,6 +22,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/debugd/internal/debugd/metadata/fallback/fallback_test.go b/debugd/internal/debugd/metadata/fallback/fallback_test.go index cfb35582b..9ec2d4e0b 100644 --- a/debugd/internal/debugd/metadata/fallback/fallback_test.go +++ b/debugd/internal/debugd/metadata/fallback/fallback_test.go @@ -16,7 +16,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestDiscoverDebugdIPs(t *testing.T) { diff --git a/debugd/internal/debugd/metadata/scheduler_test.go b/debugd/internal/debugd/metadata/scheduler_test.go index 810207927..13f9d4707 100644 --- a/debugd/internal/debugd/metadata/scheduler_test.go +++ b/debugd/internal/debugd/metadata/scheduler_test.go @@ -19,7 +19,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestSchedulerStart(t *testing.T) { diff --git a/debugd/internal/debugd/server/server_test.go b/debugd/internal/debugd/server/server_test.go index 5837a5071..3ae8b3312 100644 --- a/debugd/internal/debugd/server/server_test.go +++ b/debugd/internal/debugd/server/server_test.go @@ -29,7 +29,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestSetInfo(t *testing.T) { diff --git a/debugd/internal/filetransfer/filetransfer_test.go b/debugd/internal/filetransfer/filetransfer_test.go index 73a977e74..fed9d9d05 100644 --- a/debugd/internal/filetransfer/filetransfer_test.go +++ b/debugd/internal/filetransfer/filetransfer_test.go @@ -20,7 +20,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestSendFiles(t *testing.T) { diff --git a/debugd/internal/filetransfer/streamer/streamer_test.go b/debugd/internal/filetransfer/streamer/streamer_test.go index a1cd333dd..ec64b8ba9 100644 --- a/debugd/internal/filetransfer/streamer/streamer_test.go +++ b/debugd/internal/filetransfer/streamer/streamer_test.go @@ -19,7 +19,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestWriteStream(t *testing.T) { diff --git a/disk-mapper/internal/recoveryserver/recoveryserver_test.go b/disk-mapper/internal/recoveryserver/recoveryserver_test.go index 4673c1137..9da0a1ce2 100644 --- a/disk-mapper/internal/recoveryserver/recoveryserver_test.go +++ b/disk-mapper/internal/recoveryserver/recoveryserver_test.go @@ -29,6 +29,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/disk-mapper/internal/rejoinclient/rejoinclient_test.go b/disk-mapper/internal/rejoinclient/rejoinclient_test.go index e78be25a3..18bf15df1 100644 --- a/disk-mapper/internal/rejoinclient/rejoinclient_test.go +++ b/disk-mapper/internal/rejoinclient/rejoinclient_test.go @@ -30,7 +30,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestStartCancel(t *testing.T) { diff --git a/disk-mapper/internal/setup/setup_test.go b/disk-mapper/internal/setup/setup_test.go index e6720a588..1678b6bbf 100644 --- a/disk-mapper/internal/setup/setup_test.go +++ b/disk-mapper/internal/setup/setup_test.go @@ -28,7 +28,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestPrepareExistingDisk(t *testing.T) { diff --git a/disk-mapper/internal/systemd/systemd_test.go b/disk-mapper/internal/systemd/systemd_test.go index c62d46dcc..a85e52eba 100644 --- a/disk-mapper/internal/systemd/systemd_test.go +++ b/disk-mapper/internal/systemd/systemd_test.go @@ -14,7 +14,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestConfigureUnit(t *testing.T) { diff --git a/disk-mapper/internal/test/integration_test.go b/disk-mapper/internal/test/integration_test.go index 7cfdc4b96..a22faa28e 100644 --- a/disk-mapper/internal/test/integration_test.go +++ b/disk-mapper/internal/test/integration_test.go @@ -87,6 +87,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) result := m.Run() diff --git a/hack/bazel-deps-mirror/internal/bazelfiles/files_test.go b/hack/bazel-deps-mirror/internal/bazelfiles/files_test.go index 61add0b32..c7d37770b 100644 --- a/hack/bazel-deps-mirror/internal/bazelfiles/files_test.go +++ b/hack/bazel-deps-mirror/internal/bazelfiles/files_test.go @@ -18,7 +18,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestFindFiles(t *testing.T) { diff --git a/hack/bazel-deps-mirror/internal/issues/issues_test.go b/hack/bazel-deps-mirror/internal/issues/issues_test.go index 614416dda..2df8baf16 100644 --- a/hack/bazel-deps-mirror/internal/issues/issues_test.go +++ b/hack/bazel-deps-mirror/internal/issues/issues_test.go @@ -16,7 +16,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestMap(t *testing.T) { diff --git a/hack/bazel-deps-mirror/internal/mirror/mirror_test.go b/hack/bazel-deps-mirror/internal/mirror/mirror_test.go index 78d76392b..541c1fa52 100644 --- a/hack/bazel-deps-mirror/internal/mirror/mirror_test.go +++ b/hack/bazel-deps-mirror/internal/mirror/mirror_test.go @@ -24,7 +24,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestMirrorURL(t *testing.T) { diff --git a/hack/bazel-deps-mirror/internal/rules/rules_test.go b/hack/bazel-deps-mirror/internal/rules/rules_test.go index 60c56bf0f..b607b99b8 100644 --- a/hack/bazel-deps-mirror/internal/rules/rules_test.go +++ b/hack/bazel-deps-mirror/internal/rules/rules_test.go @@ -16,7 +16,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestRules(t *testing.T) { diff --git a/image/measured-boot/extract/extract_test.go b/image/measured-boot/extract/extract_test.go index 4e8e6379c..a21cfe467 100644 --- a/image/measured-boot/extract/extract_test.go +++ b/image/measured-boot/extract/extract_test.go @@ -19,7 +19,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestPeSectionReader(t *testing.T) { diff --git a/image/measured-boot/measure/measure_test.go b/image/measured-boot/measure/measure_test.go index 899b2c15c..a787d8846 100644 --- a/image/measured-boot/measure/measure_test.go +++ b/image/measured-boot/measure/measure_test.go @@ -13,5 +13,5 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } diff --git a/internal/api/versionsapi/fetcher_test.go b/internal/api/versionsapi/fetcher_test.go index 810400af9..ff00ebdb6 100644 --- a/internal/api/versionsapi/fetcher_test.go +++ b/internal/api/versionsapi/fetcher_test.go @@ -21,7 +21,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestFetchVersionList(t *testing.T) { diff --git a/internal/atls/atls_test.go b/internal/atls/atls_test.go index 063304fcf..e25122797 100644 --- a/internal/atls/atls_test.go +++ b/internal/atls/atls_test.go @@ -22,7 +22,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestTLSConfig(t *testing.T) { diff --git a/internal/attestation/measurements/measurement-generator/generate_test.go b/internal/attestation/measurements/measurement-generator/generate_test.go index d030a9138..e55c3c1ef 100644 --- a/internal/attestation/measurements/measurement-generator/generate_test.go +++ b/internal/attestation/measurements/measurement-generator/generate_test.go @@ -13,5 +13,5 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } diff --git a/internal/attestation/vtpm/vtpm_test.go b/internal/attestation/vtpm/vtpm_test.go index 18ded35ae..2a6e20668 100644 --- a/internal/attestation/vtpm/vtpm_test.go +++ b/internal/attestation/vtpm/vtpm_test.go @@ -13,5 +13,5 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } diff --git a/internal/cloud/aws/logger_test.go b/internal/cloud/aws/logger_test.go index a5ca7d0a8..9e55a4dec 100644 --- a/internal/cloud/aws/logger_test.go +++ b/internal/cloud/aws/logger_test.go @@ -28,7 +28,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestCreateStream(t *testing.T) { diff --git a/internal/cloud/azure/azure_test.go b/internal/cloud/azure/azure_test.go index b566f1a69..f364f3f2f 100644 --- a/internal/cloud/azure/azure_test.go +++ b/internal/cloud/azure/azure_test.go @@ -24,7 +24,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestGetInstance(t *testing.T) { diff --git a/internal/cloud/azureshared/appcredentials_test.go b/internal/cloud/azureshared/appcredentials_test.go index 086a16d8f..0c7d65424 100644 --- a/internal/cloud/azureshared/appcredentials_test.go +++ b/internal/cloud/azureshared/appcredentials_test.go @@ -16,7 +16,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestApplicationCredentialsFromURI(t *testing.T) { diff --git a/internal/cloud/gcp/gcp_test.go b/internal/cloud/gcp/gcp_test.go index 7ac614065..fa2179163 100644 --- a/internal/cloud/gcp/gcp_test.go +++ b/internal/cloud/gcp/gcp_test.go @@ -27,6 +27,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 3ce3cc273..e2484527c 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -34,7 +34,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestDefaultConfig(t *testing.T) { diff --git a/internal/crypto/crypto_test.go b/internal/crypto/crypto_test.go index be7b0aa77..674ec4c84 100644 --- a/internal/crypto/crypto_test.go +++ b/internal/crypto/crypto_test.go @@ -17,7 +17,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestDeriveKey(t *testing.T) { diff --git a/internal/file/file_test.go b/internal/file/file_test.go index a95c439df..35c6b3bfc 100644 --- a/internal/file/file_test.go +++ b/internal/file/file_test.go @@ -21,7 +21,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestWrite(t *testing.T) { diff --git a/internal/grpc/atlscredentials/atlscredentials_test.go b/internal/grpc/atlscredentials/atlscredentials_test.go index 2fe3fbf54..77272088d 100644 --- a/internal/grpc/atlscredentials/atlscredentials_test.go +++ b/internal/grpc/atlscredentials/atlscredentials_test.go @@ -25,7 +25,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestATLSCredentials(t *testing.T) { diff --git a/internal/grpc/dialer/dialer_test.go b/internal/grpc/dialer/dialer_test.go index 4e152bd56..c137ee727 100644 --- a/internal/grpc/dialer/dialer_test.go +++ b/internal/grpc/dialer/dialer_test.go @@ -22,7 +22,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestDial(t *testing.T) { diff --git a/internal/imagefetcher/imagefetcher_test.go b/internal/imagefetcher/imagefetcher_test.go index 2146e06d6..1397c4fb4 100644 --- a/internal/imagefetcher/imagefetcher_test.go +++ b/internal/imagefetcher/imagefetcher_test.go @@ -24,7 +24,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestGetReference(t *testing.T) { diff --git a/internal/kms/kms/cluster/cluster_test.go b/internal/kms/kms/cluster/cluster_test.go index acfffc56b..d9ec6d7a1 100644 --- a/internal/kms/kms/cluster/cluster_test.go +++ b/internal/kms/kms/cluster/cluster_test.go @@ -18,7 +18,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestClusterKMS(t *testing.T) { diff --git a/internal/kms/kms/internal/internal_test.go b/internal/kms/kms/internal/internal_test.go index c6371a607..a7fc25ca6 100644 --- a/internal/kms/kms/internal/internal_test.go +++ b/internal/kms/kms/internal/internal_test.go @@ -27,6 +27,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/internal/kms/setup/setup_test.go b/internal/kms/setup/setup_test.go index a92bbc0c1..73bb29565 100644 --- a/internal/kms/setup/setup_test.go +++ b/internal/kms/setup/setup_test.go @@ -19,6 +19,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/internal/kms/storage/memfs/memfs_test.go b/internal/kms/storage/memfs/memfs_test.go index 9fe33362b..98d246d1b 100644 --- a/internal/kms/storage/memfs/memfs_test.go +++ b/internal/kms/storage/memfs/memfs_test.go @@ -19,6 +19,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/internal/kms/uri/uri_test.go b/internal/kms/uri/uri_test.go index 3517d2a8c..b7e2ea388 100644 --- a/internal/kms/uri/uri_test.go +++ b/internal/kms/uri/uri_test.go @@ -15,7 +15,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestMasterSecretURI(t *testing.T) { diff --git a/internal/nodestate/nodestate_test.go b/internal/nodestate/nodestate_test.go index 6b457eac9..41081f87f 100644 --- a/internal/nodestate/nodestate_test.go +++ b/internal/nodestate/nodestate_test.go @@ -19,7 +19,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestFromFile(t *testing.T) { diff --git a/internal/osimage/secureboot/secureboot_test.go b/internal/osimage/secureboot/secureboot_test.go index b52760769..679888190 100644 --- a/internal/osimage/secureboot/secureboot_test.go +++ b/internal/osimage/secureboot/secureboot_test.go @@ -17,7 +17,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestDatabaseFromFile(t *testing.T) { diff --git a/internal/retry/retry_test.go b/internal/retry/retry_test.go index 7183c7fe1..8885ac715 100644 --- a/internal/retry/retry_test.go +++ b/internal/retry/retry_test.go @@ -18,7 +18,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestDo(t *testing.T) { diff --git a/internal/role/role_test.go b/internal/role/role_test.go index 8ca802345..4ad65ea4b 100644 --- a/internal/role/role_test.go +++ b/internal/role/role_test.go @@ -15,7 +15,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestMarshal(t *testing.T) { diff --git a/internal/sigstore/rekor_integration_test.go b/internal/sigstore/rekor_integration_test.go index c53a047b2..4870109fb 100644 --- a/internal/sigstore/rekor_integration_test.go +++ b/internal/sigstore/rekor_integration_test.go @@ -18,7 +18,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestRekorSearchByHash(t *testing.T) { diff --git a/internal/staticupload/staticupload_test.go b/internal/staticupload/staticupload_test.go index cd41b20bd..eace5cc1a 100644 --- a/internal/staticupload/staticupload_test.go +++ b/internal/staticupload/staticupload_test.go @@ -28,7 +28,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestUpload(t *testing.T) { diff --git a/internal/versions/hash-generator/generate_test.go b/internal/versions/hash-generator/generate_test.go index d030a9138..e55c3c1ef 100644 --- a/internal/versions/hash-generator/generate_test.go +++ b/internal/versions/hash-generator/generate_test.go @@ -13,5 +13,5 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } diff --git a/joinservice/internal/kms/kms_test.go b/joinservice/internal/kms/kms_test.go index e91fb34d6..cd831ddc4 100644 --- a/joinservice/internal/kms/kms_test.go +++ b/joinservice/internal/kms/kms_test.go @@ -29,7 +29,7 @@ func (c *stubClient) GetDataKey(context.Context, *keyserviceproto.GetDataKeyRequ } func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestGetDataKey(t *testing.T) { diff --git a/joinservice/internal/kubeadm/kubeadm_test.go b/joinservice/internal/kubeadm/kubeadm_test.go index 25fc43e2a..e78d1c0bb 100644 --- a/joinservice/internal/kubeadm/kubeadm_test.go +++ b/joinservice/internal/kubeadm/kubeadm_test.go @@ -23,7 +23,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestGetJoinToken(t *testing.T) { diff --git a/joinservice/internal/kubernetes/kubernetes_test.go b/joinservice/internal/kubernetes/kubernetes_test.go index 225cd2a2d..2d289a068 100644 --- a/joinservice/internal/kubernetes/kubernetes_test.go +++ b/joinservice/internal/kubernetes/kubernetes_test.go @@ -14,7 +14,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestK8sCompliantHostname(t *testing.T) { diff --git a/joinservice/internal/kubernetesca/kubernetesca_test.go b/joinservice/internal/kubernetesca/kubernetesca_test.go index d7920043b..359ef7771 100644 --- a/joinservice/internal/kubernetesca/kubernetesca_test.go +++ b/joinservice/internal/kubernetesca/kubernetesca_test.go @@ -30,7 +30,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestGetCertificate(t *testing.T) { diff --git a/joinservice/internal/server/server_test.go b/joinservice/internal/server/server_test.go index ec6c2dba3..ff11c7b57 100644 --- a/joinservice/internal/server/server_test.go +++ b/joinservice/internal/server/server_test.go @@ -23,7 +23,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestIssueJoinTicket(t *testing.T) { diff --git a/joinservice/internal/watcher/validator_test.go b/joinservice/internal/watcher/validator_test.go index c6e87db94..67b3daff4 100644 --- a/joinservice/internal/watcher/validator_test.go +++ b/joinservice/internal/watcher/validator_test.go @@ -35,6 +35,7 @@ func TestMain(m *testing.M) { goleak.VerifyTestMain(m, // https://github.com/census-instrumentation/opencensus-go/issues/1262 goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), + goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1"), ) } diff --git a/keyservice/internal/server/server_test.go b/keyservice/internal/server/server_test.go index 6f615ff1b..f5c2b2d3b 100644 --- a/keyservice/internal/server/server_test.go +++ b/keyservice/internal/server/server_test.go @@ -20,7 +20,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestGetDataKey(t *testing.T) { diff --git a/operators/constellation-node-operator/internal/executor/executor_test.go b/operators/constellation-node-operator/internal/executor/executor_test.go index 91d0a20f1..a18d249fd 100644 --- a/operators/constellation-node-operator/internal/executor/executor_test.go +++ b/operators/constellation-node-operator/internal/executor/executor_test.go @@ -17,7 +17,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestStartTriggersImmediateReconciliation(t *testing.T) { diff --git a/s3proxy/internal/kms/kms_test.go b/s3proxy/internal/kms/kms_test.go index e91fb34d6..cd831ddc4 100644 --- a/s3proxy/internal/kms/kms_test.go +++ b/s3proxy/internal/kms/kms_test.go @@ -29,7 +29,7 @@ func (c *stubClient) GetDataKey(context.Context, *keyserviceproto.GetDataKeyRequ } func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestGetDataKey(t *testing.T) { diff --git a/verify/server/server_test.go b/verify/server/server_test.go index 16f84d5c5..288a06399 100644 --- a/verify/server/server_test.go +++ b/verify/server/server_test.go @@ -27,7 +27,7 @@ import ( ) func TestMain(m *testing.M) { - goleak.VerifyTestMain(m) + goleak.VerifyTestMain(m, goleak.IgnoreAnyFunction("github.com/bazelbuild/rules_go/go/tools/bzltestutil.RegisterTimeoutHandler.func1")) } func TestRun(t *testing.T) {