diff --git a/TODO-SOON.md b/TODO-SOON.md index 5217f5b3..6f467ed0 100644 --- a/TODO-SOON.md +++ b/TODO-SOON.md @@ -1339,7 +1339,14 @@ load-bearing for a second package. --- -## 16. `cmd/ns` and `cmd/xtcp2` do not link outside nix — `giouring` / `syscall.munmap` — OPEN +## 16. `cmd/ns` and `cmd/xtcp2` do not link outside nix — `giouring` / `syscall.munmap` — DONE 2026-11-07 + +**Resolved:** the fork replaced the linkname with direct mmap/munmap syscalls +(randomizedcoder/giouring ab1091f, in v1.0.1). xtcp2 now requires the fork's +`main` as `github.com/randomizedcoder/giouring v1.1.2`, with no `replace`, so +a plain `go build ./...` links and `-ldflags=-checklinkname=0` is gone. +nix builds from the same module, which drops `nix/lib/patchGoMod.nix` and the +`giouring` flake input. The original notes follow. A plain `go build ./cmd/...` in a working tree fails: diff --git a/flake.lock b/flake.lock index 400c20c4..64068722 100644 --- a/flake.lock +++ b/flake.lock @@ -36,23 +36,6 @@ "type": "github" } }, - "giouring": { - "flake": false, - "locked": { - "lastModified": 1764459401, - "narHash": "sha256-+walGbWCth8JLm3ZoLoTh0tXlrCFIPQa/4ufEWHSmnY=", - "owner": "randomizedcoder", - "repo": "giouring", - "rev": "9e96b7216bf07ce3c97281092444e85311f7b2e4", - "type": "github" - }, - "original": { - "owner": "randomizedcoder", - "repo": "giouring", - "rev": "9e96b7216bf07ce3c97281092444e85311f7b2e4", - "type": "github" - } - }, "libvfio-user": { "flake": false, "locked": { @@ -77,11 +60,11 @@ "spectrum": "spectrum" }, "locked": { - "lastModified": 1791551030, - "narHash": "sha256-jTx3O3MKqPjv+cDfBFQ5zlKECBEwzF91scC+mSumZyE=", + "lastModified": 1793281488, + "narHash": "sha256-ErGIqtoWEX9KKC8NFtJDx2pGGG02Cr6LGxrvzLd2sqA=", "owner": "astro", "repo": "microvm.nix", - "rev": "f13928fe9900e91709d7ce581eefa47eaafa79e1", + "rev": "b7bd556974fa8a171b5b639200e81d52244dfde4", "type": "github" }, "original": { @@ -114,11 +97,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1792502884, - "narHash": "sha256-IoNisKcGbUjdd45qCqywGMCYmZ5EnkxezvLII0FWwNA=", + "lastModified": 1793876309, + "narHash": "sha256-Wojg9lIH/hDH91iDVH2/EPw8oDSpxjxhXONbU1yf4Zg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "02c087f3fe673c9e317f206a627cb6b910336dbe", + "rev": "f9a75f41be3a74eab55d3a7679d34ad6cc0da977", "type": "github" }, "original": { @@ -175,7 +158,6 @@ "root": { "inputs": { "flake-utils": "flake-utils", - "giouring": "giouring", "microvm": "microvm", "nixpkgs": "nixpkgs", "rocm-ernic": "rocm-ernic", diff --git a/flake.nix b/flake.nix index f35c263e..94c08455 100644 --- a/flake.nix +++ b/flake.nix @@ -74,9 +74,6 @@ # Each takes --dry-run (the VM runners with --native-out DIR) to write # placeholder contents and a manifest without a device. # -# Overriding the giouring source (local fork): -# nix develop --override-input giouring path:/home/das/Downloads/giouring -# { description = "xtcp2 — TCP socket introspection via netlink"; @@ -89,13 +86,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - # Local fork of iceber/iouring-go. Pin rev — overridable via - # `--override-input giouring path:/path/to/local`. - giouring = { - url = "github:randomizedcoder/giouring/9e96b7216bf07ce3c97281092444e85311f7b2e4"; - flake = false; - }; - # xdp2 provides `proto-audit`, the netlink layout oracle. It normalises the # kernel UAPI headers and 15 other sources to one IR indexed by wire bit # offset, which is what lets it find a field xtcp2's Go structs are @@ -143,7 +133,6 @@ nixpkgs, flake-utils, microvm, - giouring, xdp2, rocm-ernic, }: @@ -161,7 +150,6 @@ lib microvm nixpkgs - giouring xdp2 ; rocmErnic = rocm-ernic; diff --git a/go.mod b/go.mod index d1fb22cf..077c9aa4 100644 --- a/go.mod +++ b/go.mod @@ -1,23 +1,23 @@ module github.com/randomizedcoder/xtcp2 -go 1.27.0 +go 1.27.3 require ( buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-20260825204119-511051f7f437.2 buf.build/go/protovalidate v1.4.0 github.com/gaissmai/bart v0.30.0 github.com/grafana/pyroscope-go v1.4.3 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.32.0 + github.com/grpc-ecosystem/grpc-gateway/v2 v2.33.0 github.com/klauspost/compress v1.20.3 github.com/minio/minio-go/v7 v7.4.1 - github.com/nats-io/nats.go v1.54.0 + github.com/nats-io/nats.go v1.55.0 github.com/nsqio/go-nsq v1.1.0 github.com/parquet-go/parquet-go v0.32.0 github.com/pkg/profile v1.7.0 github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 github.com/prometheus/client_golang v1.25.0 github.com/prometheus/client_model v0.6.3 - github.com/randomizedcoder/giouring v0.0.0-00010101000000-000000000000 + github.com/randomizedcoder/giouring v1.1.2 github.com/redis/go-redis/v9 v9.23.0 github.com/twmb/franz-go v1.22.2 github.com/twmb/franz-go/pkg/sr v1.8.0 @@ -31,17 +31,17 @@ require ( go.opentelemetry.io/otel/sdk v1.47.0 go.opentelemetry.io/otel/sdk/metric v1.47.0 go.opentelemetry.io/otel/trace v1.47.0 - go.yaml.in/yaml/v3 v3.0.5 + go.yaml.in/yaml/v3 v3.0.6 golang.org/x/sys v0.49.0 - google.golang.org/genproto/googleapis/api v0.0.0-20261019180522-ce908d29299b - google.golang.org/grpc v1.84.0 + google.golang.org/genproto/googleapis/api v0.0.0-20261104224025-d1e00e9f33ab + google.golang.org/grpc v1.85.0 google.golang.org/protobuf v1.36.12 ) require ( - cel.dev/cel-go v0.32.0 // indirect + cel.dev/cel-go v0.33.2 // indirect cel.dev/expr v0.25.3 // indirect - github.com/andybalholm/brotli v1.2.6 // indirect + github.com/andybalholm/brotli v1.2.8 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v5 v5.0.3 // indirect @@ -51,24 +51,25 @@ require ( github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/golang/snappy v1.0.0 // indirect - github.com/google/pprof v0.0.0-20261016150608-1facf8f91b50 // indirect + github.com/google/pprof v0.0.0-20261105003125-4bf881d7fb0b // indirect github.com/google/uuid v1.6.0 // indirect github.com/grafana/pyroscope-go/godeltaprof v0.1.12 // indirect - github.com/klauspost/cpuid/v2 v2.4.1 // indirect + github.com/klauspost/cpuid/v2 v2.4.2 // indirect github.com/klauspost/crc32 v1.3.0 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/minio/crc64nvme v1.1.1 // indirect github.com/minio/md5-simd v1.1.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/nats-io/nkeys v0.4.16 // indirect + github.com/nats-io/nkeys v0.4.17 // indirect github.com/nats-io/nuid v1.0.1 // indirect + github.com/pandatix/go-abnf v0.5.5 // indirect github.com/parquet-go/bitpack v1.1.0 // indirect github.com/parquet-go/jsonlite v1.5.5 // indirect github.com/philhofer/fwd v1.2.1 // indirect github.com/pierrec/lz4/v4 v4.1.33 // indirect - github.com/prometheus/common v0.72.1 // indirect + github.com/prometheus/common v0.73.1 // indirect github.com/prometheus/otlptranslator v1.0.0 // indirect - github.com/prometheus/procfs v0.22.0 // indirect + github.com/prometheus/procfs v0.23.0 // indirect github.com/rs/xid v1.6.0 // indirect github.com/tinylib/msgp v1.6.5 // indirect github.com/twmb/franz-go/pkg/kmsg v1.15.0 // indirect @@ -81,11 +82,9 @@ require ( go.opentelemetry.io/proto/otlp v1.11.1 // indirect go.uber.org/atomic v1.12.0 // indirect golang.org/x/crypto v0.58.0 // indirect - golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e // indirect - golang.org/x/net v0.61.0 // indirect + golang.org/x/exp v0.0.0-20261106192419-47ce03d25ef0 // indirect + golang.org/x/net v0.62.0 // indirect golang.org/x/text v0.43.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20261104224025-d1e00e9f33ab // indirect gopkg.in/ini.v1 v1.67.3 // indirect ) - -replace github.com/randomizedcoder/giouring => /home/das/Downloads/giouring diff --git a/go.sum b/go.sum index 281008d2..f7b69b5e 100644 --- a/go.sum +++ b/go.sum @@ -2,8 +2,8 @@ buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-202608252041 buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.12-20260825204119-511051f7f437.2/go.mod h1:TCt1lluMFnctISJXvkIQ4x3ABrPuUKCWKyjKdkJNBpw= buf.build/go/protovalidate v1.4.0 h1:UjLrYbt5VX7+TMOs2+pG5FhZhIG1mSfK4EIopbb4LcM= buf.build/go/protovalidate v1.4.0/go.mod h1:8vJfzNT6NIG2qm3uFsJDXMlRmG+bQJzbcIn1Aa0vPGs= -cel.dev/cel-go v0.32.0 h1:irvpFKr5EuGPyxeME03ERh0rii1TX+BDAnB9eL3IvNk= -cel.dev/cel-go v0.32.0/go.mod h1:DnVip7tpJSsgZymwfT+m1tnEVy3ivAjSMXPx12YrMkU= +cel.dev/cel-go v0.33.2 h1:eAcEdBguc6AFrGbPOyE0g168Uey4kKFW9J6qsBLSeMU= +cel.dev/cel-go v0.33.2/go.mod h1:DnVip7tpJSsgZymwfT+m1tnEVy3ivAjSMXPx12YrMkU= cel.dev/expr v0.25.3 h1:A2jO8jwOugrrovveCWfj0KEZOfqiLgAcwjpHPhzIGw0= cel.dev/expr v0.25.3/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= @@ -12,8 +12,8 @@ github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8v github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/repr v0.5.4 h1:OVP7JEcuzU9CCDsT6STCr3rg17oQfWILtPWd2EG0uN4= github.com/alecthomas/repr v0.5.4/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= -github.com/andybalholm/brotli v1.2.6 h1:ftYnfj6usCp+UGV5kSJ3+chpMQgU+gJf/AxsUQ52REI= -github.com/andybalholm/brotli v1.2.6/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= +github.com/andybalholm/brotli v1.2.8 h1:H9F6r7RNwzSRsx/lytpIYkbjNFMt2yNBwsJ2+0gpx78= +github.com/andybalholm/brotli v1.2.8/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -63,16 +63,16 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/pprof v0.0.0-20240227163752-401108e1b7e7/go.mod h1:czg5+yv1E0ZGTi6S6vVK1mke0fV+FaUhNGcd6VRS9Ik= -github.com/google/pprof v0.0.0-20261016150608-1facf8f91b50 h1:PlNWJRxu5APSV0pWqfIsZ0qt9OOGHSWfZQ4zvx+WgWs= -github.com/google/pprof v0.0.0-20261016150608-1facf8f91b50/go.mod h1:yUo1AMMpsPIDFGuwDK8nLcf8+vvAd5l2O6JDZ6hpwrM= +github.com/google/pprof v0.0.0-20261105003125-4bf881d7fb0b h1:5NKFt6kcAJNVt3XBOf8jwp8TnWZVOZFmmGkK0XextI4= +github.com/google/pprof v0.0.0-20261105003125-4bf881d7fb0b/go.mod h1:yUo1AMMpsPIDFGuwDK8nLcf8+vvAd5l2O6JDZ6hpwrM= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grafana/pyroscope-go v1.4.3 h1:XAfYZe5ie8eRTsKAMHQG60ESJjHBV5XUijk8vDvqalw= github.com/grafana/pyroscope-go v1.4.3/go.mod h1:enNhwzbML7+hMzJHTvKAIqTGqIaOOF1rgF+2au+NOwg= github.com/grafana/pyroscope-go/godeltaprof v0.1.12 h1:X6OemT2WcLtxdmNukEQuIp0c+efWVI/tBTd0oeWeDHI= github.com/grafana/pyroscope-go/godeltaprof v0.1.12/go.mod h1:aNSXN1bn1VHAd06EiepmwhAabHsMc67gx8itecdF2c8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.32.0 h1:QMILzF8BA7xftE4zVORkRrlv08m12St3csK4RsyRgRs= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.32.0/go.mod h1:+ZQ6iUL8+ATyxGDQNuRKpNwJFdGDUi0e7E1QL9MvI7U= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.33.0 h1:5T5Ns3kMpWr+z3s5ZA0e7ljVyWNVNxK76sHPAxi5D1k= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.33.0/go.mod h1:oWNYw09cH8wl8fFgC5hKlBLxR4XfKy2KQpP8MJjeCcc= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= @@ -81,8 +81,8 @@ github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFF github.com/klauspost/compress v1.20.3 h1:zWNoFqq/lSuYQRim3dUXlXeA0IqwuZGicdG5ZTfY5j4= github.com/klauspost/compress v1.20.3/go.mod h1:LUdAzn7YLVvxLpc7y3V1m40wESHTgc1422pwwBSKYuI= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.4.1 h1:I9KxadAkvo+QjtcEE2f2tyfEvmIla/T0m+14PrZNl0U= -github.com/klauspost/cpuid/v2 v2.4.1/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU= +github.com/klauspost/cpuid/v2 v2.4.2 h1:xRw7IZEsAgVCp6trS/DgWbTAqpixhmywgVgBjYGg1bQ= +github.com/klauspost/cpuid/v2 v2.4.2/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU= github.com/klauspost/crc32 v1.3.0 h1:sSmTt3gUt81RP655XGZPElI0PelVTZ6YwCRnPSupoFM= github.com/klauspost/crc32 v1.3.0/go.mod h1:D7kQaZhnkX/Y0tstFGf8VUzv2UofNGqCjnC3zdHB0Hw= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= @@ -97,15 +97,17 @@ github.com/minio/minio-go/v7 v7.4.1 h1:PtU/zIOfQRWZ+QydXAZysc+xZYHdG+BBR4Z6TUvy7 github.com/minio/minio-go/v7 v7.4.1/go.mod h1:nQnQi7zTfXR4lREtYXZQWqo5aw0Rqv+ZqCGrTORygRk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nats-io/nats.go v1.54.0 h1:vsXoOxjHp/GmPUN+EcI7uOf/uB+iAP+kEsAFNQN0yzA= -github.com/nats-io/nats.go v1.54.0/go.mod h1:y+DZoD1oBOYfZTU681eTUiUjI0vbqYGixNVFHcjHJ0k= -github.com/nats-io/nkeys v0.4.16 h1:rd5oAuLOb8mnAycB0xleuEBNS1pVVnN0fv/FF34Eypg= -github.com/nats-io/nkeys v0.4.16/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs= +github.com/nats-io/nats.go v1.55.0 h1:Ng8QKHdvdHIWoaiq0+d/aH1BWkxvcJxWJ0Y/9BPKx3M= +github.com/nats-io/nats.go v1.55.0/go.mod h1:y+DZoD1oBOYfZTU681eTUiUjI0vbqYGixNVFHcjHJ0k= +github.com/nats-io/nkeys v0.4.17 h1:JAJrlDhOyQqOt0a1eg4cbIZ1Kc7+vmkCigAltpwQpVA= +github.com/nats-io/nkeys v0.4.17/go.mod h1:llLgWoI0o4z/Q57q2R1kHfmocyhGV6VG/U18Glg1Afs= github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nsqio/go-nsq v1.1.0 h1:PQg+xxiUjA7V+TLdXw7nVrJ5Jbl3sN86EhGCQj4+FYE= github.com/nsqio/go-nsq v1.1.0/go.mod h1:vKq36oyeVXgsS5Q8YEO7WghqidAVXQlcFxzQbQTuDEY= github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0= +github.com/pandatix/go-abnf v0.5.5 h1:EXex5KkRQx4Dm6GnpAcQnIMBs9KiK0uf8p/wq+4t9PM= +github.com/pandatix/go-abnf v0.5.5/go.mod h1:AE0KD3/VNoCjGzc1gqetRKshbI4SYErXQ/8kPenR5mc= github.com/parquet-go/bitpack v1.1.0 h1:b80hfKZwIJ3Ku684xJSEj/9G0tywQPKOtmTV8si30mo= github.com/parquet-go/bitpack v1.1.0/go.mod h1:XnVk9TH+O40eOOmvpAVZ7K2ocQFrQwysLMnc6M/8lgs= github.com/parquet-go/jsonlite v1.5.5 h1:TIqJ+b+mYoTvvEt1/ICS4fBacQO0xWwAbvtcrKjEcC8= @@ -125,12 +127,14 @@ github.com/prometheus/client_golang v1.25.0 h1:cDtW1TcFsMi1RJc8khwCKB4VhzwV04aKq github.com/prometheus/client_golang v1.25.0/go.mod h1:j2X/4/kaQHLPnmyEU8zjmkndo1T317VpCIQEml8LTKk= github.com/prometheus/client_model v0.6.3 h1:O0jaTVAYNxTHYInEPFJt5I3+sN8zqBtVMPTB1qyxiEo= github.com/prometheus/client_model v0.6.3/go.mod h1:gpN5P9S7Rr6Yr92PiQ+Ixvhf6JZEkF1dnxsYL2aPBEM= -github.com/prometheus/common v0.72.1 h1:ZAiQed/nk8IIcsdzb2TlJu23NEUDyDLQ9TXTN2WRK6Y= -github.com/prometheus/common v0.72.1/go.mod h1:1IoBY4IRaJnhs2ESjNzjilP1cJ/P8pimGoomq7zRXrA= +github.com/prometheus/common v0.73.1 h1:SZWh/j4AvhCdhX8jvYSnxvPxhWlC9QZkjJ+tOrEr7kU= +github.com/prometheus/common v0.73.1/go.mod h1:I9aA/Ukz9s1olOobh8KtCkU7B1mQPQsB9UvQPsUQ1Dk= github.com/prometheus/otlptranslator v1.0.0 h1:s0LJW/iN9dkIH+EnhiD3BlkkP5QVIUVEoIwkU+A6qos= github.com/prometheus/otlptranslator v1.0.0/go.mod h1:vRYWnXvI6aWGpsdY/mOT/cbeVRBlPWtBNDb7kGR3uKM= -github.com/prometheus/procfs v0.22.0 h1:6q9+/JL9IKAPbCmBrv9n5O5Ty3NKnciV5X7YGw0oics= -github.com/prometheus/procfs v0.22.0/go.mod h1:CvmFr/GVhIjIvWJZW3tgkODBQMRIf0EyWMQLHCHab58= +github.com/prometheus/procfs v0.23.0 h1:ad+S6FTkzwaMgacKLM5h6bNKExS+DMH0YiUwXItH/o4= +github.com/prometheus/procfs v0.23.0/go.mod h1:3AVXO0FqLafyYFU/V/IQRZlC8Rgqz8Dm/x6pKLK+RIk= +github.com/randomizedcoder/giouring v1.1.2 h1:ekIonOEzUpo0yctDAoNVioMv1AL2/AHxa6YMoS7d6gE= +github.com/randomizedcoder/giouring v1.1.2/go.mod h1:Cms4fX07p9f3DZPSoJWwZhuF8+b6s/ckCeg9XtiR1ms= github.com/redis/go-redis/v9 v9.23.0 h1:/TTVdJa8BRNsybwwGGnmiYktHNlUXtbOQxlWpHBPL3s= github.com/redis/go-redis/v9 v9.23.0/go.mod h1:EWP2UUk+XDaI1s5nQB5mablZN6vccXlmBQTyfnF87D0= github.com/rodaine/protogofakeit v0.1.1 h1:ZKouljuRM3A+TArppfBqnH8tGZHOwM/pjvtXe9DaXH8= @@ -203,14 +207,14 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v2 v2.4.4 h1:tuyd0P+2Ont/d6e2rl3be67goVK4R6deVxCUX5vyPaQ= go.yaml.in/yaml/v2 v2.4.4/go.mod h1:gMZqIpDtDqOfM0uNfy0SkpRhvUryYH0Z6wdMYcacYXQ= -go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= -go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +go.yaml.in/yaml/v3 v3.0.6 h1:zcDfvjXEqTQmpjniUBLc91xYJMB2c4QOFxEF/LCEckM= +go.yaml.in/yaml/v3 v3.0.6/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54= golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w= -golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e h1:HgI6W1OolKK6tcV74is+rl9SMT0njsHlp0TbQiGXI/A= -golang.org/x/exp v0.0.0-20261014143641-f0251eb4aa3e/go.mod h1:DBoxwWhjaW8DJJw/YeM4zpeOKMC1FMXSblsYy+1mFSw= -golang.org/x/net v0.61.0 h1:RR+6j/BTBCrggOLugxa+66R8FvoN6MHlzDlZIbN9YFw= -golang.org/x/net v0.61.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= +golang.org/x/exp v0.0.0-20261106192419-47ce03d25ef0 h1:1GO4fJiyGakz0Liu2Ve1qPAwQYPkKlG1Q8iO2CYjtFA= +golang.org/x/exp v0.0.0-20261106192419-47ce03d25ef0/go.mod h1:J3U+E8RzytcGvwz+uJuAP4zULJ2TkAQBnmPZMexpdXs= +golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY= +golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -220,12 +224,12 @@ golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc= golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/genproto/googleapis/api v0.0.0-20261019180522-ce908d29299b h1:nB3spRIaSPtxJpxb0k41yljROvm2Jrwfs2pSNdKS5y8= -google.golang.org/genproto/googleapis/api v0.0.0-20261019180522-ce908d29299b/go.mod h1:9N4vtjEwvgQKEdlFVQO0M44ErhecQ9DCSQfGoZ51M6w= -google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b h1:6WNWHZk91dp4gZ25642OALkuG1UVNZbwENJD19DnB8k= -google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc= -google.golang.org/grpc v1.84.0 h1:soMyaPJ8pAak5PIQ0DGBUir0XRo2fRoMqhNWMLlLxO0= -google.golang.org/grpc v1.84.0/go.mod h1:ljCht0DrxQrXBDRTZp52Qxh3Ffk8CdYm2sj4O2QN2C0= +google.golang.org/genproto/googleapis/api v0.0.0-20261104224025-d1e00e9f33ab h1:n6IDWZ1RzI/NberLoLLFNrjl1H45uhc4+WYsUf5lPPc= +google.golang.org/genproto/googleapis/api v0.0.0-20261104224025-d1e00e9f33ab/go.mod h1:vHV3wJM9WZyfV7GyB+OQGq5dWVrFwCDxapPK4WlRD88= +google.golang.org/genproto/googleapis/rpc v0.0.0-20261104224025-d1e00e9f33ab h1:8sYjjefPfQ+FZEh1ZwBAqK/NifJVhOxut8nRh3SJzZM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20261104224025-d1e00e9f33ab/go.mod h1:OaIUM3+LpYcK2GXM4FTmhWoIq371Owdr+Cc7/BsYHHc= +google.golang.org/grpc v1.85.0 h1:BPBCfuVRQ1qvBhKDOq9uvQllMvO59rKsYhXpp7Dd8vw= +google.golang.org/grpc v1.85.0/go.mod h1:0rQrOD58yjal/0EaVbGBANindixsCZNQPDV3VKtaKuQ= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/nix/README.md b/nix/README.md index d30115e8..b7d9cc31 100644 --- a/nix/README.md +++ b/nix/README.md @@ -115,7 +115,6 @@ flake check because its module dependencies need network access. Local source overrides keep the same workflow: ```sh -nix develop --override-input giouring path:/path/to/giouring nix build path:.#checks.x86_64-linux.proto-audit-netlink \ --override-input xdp2 path:/path/to/xdp2 nix run path:.#test-linkmonitor-ionic-vm \ diff --git a/nix/binaries.nix b/nix/binaries.nix index fb7eda5a..e5652493 100644 --- a/nix/binaries.nix +++ b/nix/binaries.nix @@ -47,7 +47,6 @@ pkgs, lib, src, - giouring, commit ? "nix", date ? "1970-01-01-00:00", # Release version stamped into main.version → the record's daemon_version. @@ -59,7 +58,7 @@ let versions = import ./versions.nix { inherit pkgs; }; - mkGoBinary = import ./lib/mkGoBinary.nix { inherit pkgs lib giouring; }; + mkGoBinary = import ./lib/mkGoBinary.nix { inherit pkgs lib; }; binaryNames = [ "clickhouse_http_insert_protobuflist" diff --git a/nix/default.nix b/nix/default.nix index 88ca04d7..23d72cd7 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -6,7 +6,6 @@ pkgs, lib, src, - giouring, microvm, nixpkgs, xdp2, @@ -25,7 +24,7 @@ let src = goSrc; inherit (import ./lib/goModules.nix { - inherit pkgs giouring; + inherit pkgs; src = goSrc; vendorHash = versions.goVendorHash; }) @@ -38,7 +37,6 @@ let inherit pkgs lib - giouring ; src = goSrc; }; @@ -48,7 +46,6 @@ let inherit pkgs src - giouring ; vendorHash = versions.goVendorHash; }; diff --git a/nix/devshell.nix b/nix/devshell.nix index 636cc707..a1ee1b03 100644 --- a/nix/devshell.nix +++ b/nix/devshell.nix @@ -84,16 +84,11 @@ let Tests: go test ./... Unit tests - go test -ldflags=-checklinkname=0 ./pkg/xtcp/ ./cmd/xtcp2/ - Local workaround when the toolchain - rejects giouring's syscall linkname - ("invalid reference to syscall.munmap") go test -tags 'enrich_asn enrich_locality' ./pkg/xtcp/ ./cmd/xtcp2/ The gated enrichers. Untagged runs skip enrich_{asn,locality}.go entirely, so their tests never - compile without this. Combine with - -ldflags=-checklinkname=0 above. + compile without this. Same for dest_* — see nix/tests/go-test-flavors.nix, which nix flake check runs for you. diff --git a/nix/lib/goModules.nix b/nix/lib/goModules.nix index 949d6fb5..e24e13d0 100644 --- a/nix/lib/goModules.nix +++ b/nix/lib/goModules.nix @@ -12,12 +12,10 @@ { pkgs, src, - giouring, vendorHash, }: let - patchGoMod = import ./patchGoMod.nix { inherit giouring; }; versions = import ../versions.nix { inherit pkgs; }; # buildGoModule exposes `goModules` — a derivation containing the populated @@ -32,7 +30,6 @@ let pname = "xtcp2"; version = "vendored"; inherit src vendorHash; - postPatch = patchGoMod; env.CGO_ENABLED = "0"; doCheck = false; }; @@ -44,7 +41,5 @@ in cp -r ${src}/. $out chmod -R +w $out cp -r ${parent.goModules} $out/vendor - cd $out - ${patchGoMod} ''; } diff --git a/nix/lib/mkGoBinary.nix b/nix/lib/mkGoBinary.nix index 2e9e7909..4cc7b50d 100644 --- a/nix/lib/mkGoBinary.nix +++ b/nix/lib/mkGoBinary.nix @@ -23,12 +23,10 @@ { pkgs, lib, - giouring, }: let versions = import ../versions.nix { inherit pkgs; }; - patchGoMod = import ./patchGoMod.nix { inherit giouring; }; # Build with the pinned Go toolchain (versions.go = go_1_27), not pkgs' # default `go` — otherwise the compiled binary uses whatever pkgs.go @@ -122,8 +120,6 @@ buildGoModule { subPackages = [ subPath ]; - postPatch = patchGoMod; - env = { CGO_ENABLED = if versions.cgoEnabled then "1" else "0"; }; diff --git a/nix/lib/patchGoMod.nix b/nix/lib/patchGoMod.nix deleted file mode 100644 index 8aa215b8..00000000 --- a/nix/lib/patchGoMod.nix +++ /dev/null @@ -1,34 +0,0 @@ -# nix/lib/patchGoMod.nix -# -# Rewrites the local `replace github.com/randomizedcoder/giouring => /home/das/Downloads/giouring` -# in go.mod so it points to a copy of the giouring source vendored at a fixed -# relative path inside the build sandbox. -# -# Why not just rewrite to `${giouring}` (the Nix store path)? -# buildGoModule's go-modules sub-derivation is fixed-output and cannot -# reference store paths — Nix rejects it with -# "fixed-output derivations must not reference store paths". -# Copying the source into a relative path under the build tree is safe. -# -# Developers iterating against a writable local checkout override with: -# nix develop --override-input giouring path:/home/das/Downloads/giouring -# -{ giouring }: - -'' - if [ -f go.mod ]; then - mkdir -p ./.nix-vendored-giouring - cp -r ${giouring}/. ./.nix-vendored-giouring/ - chmod -R u+w ./.nix-vendored-giouring - - sed -i -E \ - 's|^(replace github\.com/randomizedcoder/giouring => ).*$|\1./.nix-vendored-giouring|' \ - go.mod - - if ! grep -qF "replace github.com/randomizedcoder/giouring => ./.nix-vendored-giouring" go.mod; then - echo "patchGoMod: failed to rewrite giouring replace directive" >&2 - cat go.mod >&2 - exit 1 - fi - fi -'' diff --git a/nix/tests/focused-quality.nix b/nix/tests/focused-quality.nix index be590d5e..9405a5d6 100644 --- a/nix/tests/focused-quality.nix +++ b/nix/tests/focused-quality.nix @@ -78,7 +78,6 @@ in focused-xtcp-enrich = mkFocusedTest "xtcp-enrich" { tags = "enrich_asn enrich_locality"; - ldflags = "-checklinkname=0"; paths = [ "./pkg/xtcp" "./cmd/xtcp2" diff --git a/nix/tests/linkmonitor-embedding.nix b/nix/tests/linkmonitor-embedding.nix index d8ba0f7d..83210fbe 100644 --- a/nix/tests/linkmonitor-embedding.nix +++ b/nix/tests/linkmonitor-embedding.nix @@ -28,16 +28,15 @@ pkgs.runCommand "xtcp2-test-linkmonitor-embedding" printf '%s\n' '${src}' > "$out/source.txt" go version > "$out/go-version.txt" uname -srmo > "$out/kernel.txt" - # Match the existing xtcp test targets: its giouring dependency uses linkname. echo 'Running complete xtcp unit suite' - go test -ldflags=-checklinkname=0 -json -count=1 -timeout=5m ./pkg/xtcp > "$out/xtcp.jsonl" 2>&1 || { cat "$out/xtcp.jsonl"; exit 1; } + go test -json -count=1 -timeout=5m ./pkg/xtcp > "$out/xtcp.jsonl" 2>&1 || { cat "$out/xtcp.jsonl"; exit 1; } # One build since R4-T02 removed the cgo rdma variant. echo "Running embedding race suite and building guest executable" - go test -ldflags=-checklinkname=0 -race -json -count=10 -timeout=5m \ + go test -race -json -count=10 -timeout=5m \ ./pkg/xtcp ./pkg/linkmonitor/... -run 'Test(LinkmonitorEmbedding|Embedding|RunFailures|LifecycleIncompleteShutdown)' > "$out/core-race.jsonl" 2>&1 || { cat "$out/core-race.jsonl"; exit 1; } CGO_ENABLED=0 go test -tags embedding_vm -c -o "$out/bin/core.test" ./pkg/linkmonitor # TestLinkMonitorOnDemandScrape skips here (no /sys); the embedding VM runs it. - CGO_ENABLED=0 go test -ldflags=-checklinkname=0 -c -o "$out/bin/xtcp.test" ./pkg/xtcp + CGO_ENABLED=0 go test -c -o "$out/bin/xtcp.test" ./pkg/xtcp echo 'Running embedding vet and comprehensive lint' go vet ./pkg/xtcp > "$out/vet.log" 2>&1 || { cat "$out/vet.log"; exit 1; } golangci-lint run --config .golangci-comprehensive.yml ./pkg/xtcp > "$out/lint.log" 2>&1 || { cat "$out/lint.log"; exit 1; } diff --git a/nix/versions.nix b/nix/versions.nix index d4ecc5f8..d8168d87 100644 --- a/nix/versions.nix +++ b/nix/versions.nix @@ -171,5 +171,5 @@ # Go vendor hash. Update by running `nix build .#xtcp2` and pasting the # `got:` value from the hash mismatch error. Used by every Nix check that # needs deps in the sandbox (see nix/lib/goModules.nix). - goVendorHash = "sha256-WaTwMyuIhe3qJUCzdSTcSF/AfJ2yKlaa5DAL/5yCPzc="; + goVendorHash = "sha256-0RSs3rFAFtb8gq0ZAc1c0UHIIE8gA9OOUjSRpHcIa7o="; } diff --git a/pkg/xtcp/enrich_asn_test.go b/pkg/xtcp/enrich_asn_test.go index 44fdc8d4..6cd8301f 100644 --- a/pkg/xtcp/enrich_asn_test.go +++ b/pkg/xtcp/enrich_asn_test.go @@ -69,7 +69,7 @@ func writeLookupCacheArtifact(t *testing.T, path string, rows []model.Record) { } } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestInitAsnEnricher +// go test ./pkg/xtcp/ -run TestInitAsnEnricher func TestInitAsnEnricher(t *testing.T) { const tick = 20 * time.Millisecond @@ -306,7 +306,7 @@ func summaryCount(t *testing.T, x *XTCP, function, variable string) uint64 { return m.GetSummary().GetSampleCount() } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestLoadAsnMetrics +// go test ./pkg/xtcp/ -run TestLoadAsnMetrics func TestLoadAsnMetrics(t *testing.T) { tests := []struct { description string diff --git a/pkg/xtcp/enrich_core_test.go b/pkg/xtcp/enrich_core_test.go index 8aee79c2..c98d44ab 100644 --- a/pkg/xtcp/enrich_core_test.go +++ b/pkg/xtcp/enrich_core_test.go @@ -21,7 +21,7 @@ import ( // ---- the known set ---------------------------------------------------------- -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestIsKnownEnricher +// go test ./pkg/xtcp/ -run TestIsKnownEnricher func TestIsKnownEnricher(t *testing.T) { tests := []struct { description string @@ -50,7 +50,7 @@ func TestIsKnownEnricher(t *testing.T) { } } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestCompiledInEnrichers +// go test ./pkg/xtcp/ -run TestCompiledInEnrichers func TestCompiledInEnrichers(t *testing.T) { got := CompiledInEnrichers() @@ -95,7 +95,7 @@ func TestCompiledInEnrichers(t *testing.T) { // ---- registration guards ------------------------------------------------------ -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestRegisterEnricherPanics +// go test ./pkg/xtcp/ -run TestRegisterEnricherPanics func TestRegisterEnricherPanics(t *testing.T) { noop := func(context.Context, *XTCP) {} @@ -161,7 +161,7 @@ func toStr(v any) string { // ---- lookup + the operator-facing error ---------------------------------------- -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestLookupEnricherFactory +// go test ./pkg/xtcp/ -run TestLookupEnricherFactory func TestLookupEnricherFactory(t *testing.T) { tests := []struct { description string @@ -196,7 +196,7 @@ func TestLookupEnricherFactory(t *testing.T) { } } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestEnricherLookupError +// go test ./pkg/xtcp/ -run TestEnricherLookupError func TestEnricherLookupError(t *testing.T) { tests := []struct { description string @@ -244,7 +244,7 @@ func TestEnricherLookupError(t *testing.T) { // ---- config -> requested enrichers, and the compiled-in gate -------------------- -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestRequestedEnrichers +// go test ./pkg/xtcp/ -run TestRequestedEnrichers func TestRequestedEnrichers(t *testing.T) { tests := []struct { description string @@ -286,7 +286,7 @@ func TestRequestedEnrichers(t *testing.T) { } } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestCheckConfigEnrichersCompiledIn +// go test ./pkg/xtcp/ -run TestCheckConfigEnrichersCompiledIn func TestCheckConfigEnrichersCompiledIn(t *testing.T) { tests := []struct { description string @@ -344,7 +344,7 @@ func TestCheckConfigEnrichersCompiledIn(t *testing.T) { // ---- initEnrichers: fatal on a missing build tag ------------------------------- -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestInitEnrichersCompiledInGate +// go test ./pkg/xtcp/ -run TestInitEnrichersCompiledInGate func TestInitEnrichersCompiledInGate(t *testing.T) { tests := []struct { description string @@ -392,7 +392,7 @@ func TestInitEnrichersCompiledInGate(t *testing.T) { // ---- the compiledInEnrichers gauge --------------------------------------------- -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestPublishCompiledInEnrichers +// go test ./pkg/xtcp/ -run TestPublishCompiledInEnrichers func TestPublishCompiledInEnrichers(t *testing.T) { x := newMetricsFixture(t, 0) x.publishCompiledInEnrichers() diff --git a/pkg/xtcp/enrich_locality_listen_test.go b/pkg/xtcp/enrich_locality_listen_test.go index d02d0841..04bfe2ab 100644 --- a/pkg/xtcp/enrich_locality_listen_test.go +++ b/pkg/xtcp/enrich_locality_listen_test.go @@ -97,7 +97,7 @@ var ( addThird = xtcpnl.AddrEvent{Action: xtcpnl.EventActionAdd, Addr: xtcpnl.AddrInfo{Family: unix.AF_INET, Prefixlen: 24, Index: 2, Local: []byte{10, 0, 0, 3}, Address: []byte{10, 0, 0, 3}}} ) -// go test -ldflags=-checklinkname=0 -tags enrich_locality ./pkg/xtcp/ -run TestLocalityListener +// go test -tags enrich_locality ./pkg/xtcp/ -run TestLocalityListener func TestLocalityListener(t *testing.T) { type expect struct { self []string // addresses inode 1 resolves as self @@ -307,7 +307,7 @@ func TestLocalityListener(t *testing.T) { } } -// go test -ldflags=-checklinkname=0 -tags enrich_locality ./pkg/xtcp/ -run TestLocalityListenerKernel +// go test -tags enrich_locality ./pkg/xtcp/ -run TestLocalityListenerKernel func TestLocalityListenerKernel(t *testing.T) { t.Run("positive: the real listener goes live on this namespace and stops with its context", func(t *testing.T) { x, li := newLocalityFixture(t, time.Minute) diff --git a/pkg/xtcp/enrich_locality_test.go b/pkg/xtcp/enrich_locality_test.go index 14c4fa05..2d12729a 100644 --- a/pkg/xtcp/enrich_locality_test.go +++ b/pkg/xtcp/enrich_locality_test.go @@ -84,7 +84,7 @@ func seq(from, to uint64) []uint64 { return out } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestRefreshLocalityLifecycle +// go test ./pkg/xtcp/ -run TestRefreshLocalityLifecycle func TestRefreshLocalityLifecycle(t *testing.T) { const refresh = 60 * time.Second @@ -448,7 +448,7 @@ func uniqueU64(a []uint64) map[uint64]struct{} { // TestRefreshLocalityDeferredCounter checks the deferred / dumped counters and // that a partial pass's duration is observed, on the cap scenario. // -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestRefreshLocalityDeferredCounter +// go test ./pkg/xtcp/ -run TestRefreshLocalityDeferredCounter func TestRefreshLocalityDeferredCounter(t *testing.T) { tests := []struct { description string @@ -496,7 +496,7 @@ func TestRefreshLocalityDeferredCounter(t *testing.T) { } } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestNextLocalityRetry +// go test ./pkg/xtcp/ -run TestNextLocalityRetry func TestNextLocalityRetry(t *testing.T) { now := time.Date(2026, 9, 22, 12, 0, 0, 0, time.UTC) tests := []struct { @@ -554,7 +554,7 @@ const ( replyENOENT // NLMSG_ERROR -ENOENT ) -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestDumpRetrying +// go test ./pkg/xtcp/ -run TestDumpRetrying func TestDumpRetrying(t *testing.T) { tests := []struct { description string diff --git a/pkg/xtcp/enrich_seam_test.go b/pkg/xtcp/enrich_seam_test.go index b17db618..d4db91df 100644 --- a/pkg/xtcp/enrich_seam_test.go +++ b/pkg/xtcp/enrich_seam_test.go @@ -60,7 +60,7 @@ func ipv6(s string) []byte { return addr[:] } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestDestAddr +// go test ./pkg/xtcp/ -run TestDestAddr func TestDestAddr(t *testing.T) { tests := []struct { description string @@ -109,7 +109,7 @@ func TestDestAddr(t *testing.T) { } } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestApplyEnrichmentSeams +// go test ./pkg/xtcp/ -run TestApplyEnrichmentSeams func TestApplyEnrichmentSeams(t *testing.T) { const inode = uint64(4026531840) @@ -284,7 +284,7 @@ func TestApplyEnrichmentSeams(t *testing.T) { } } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestRefreshLocalityDispatch +// go test ./pkg/xtcp/ -run TestRefreshLocalityDispatch func TestRefreshLocalityDispatch(t *testing.T) { tests := []struct { description string @@ -310,7 +310,7 @@ func TestRefreshLocalityDispatch(t *testing.T) { } } -// go test -ldflags=-checklinkname=0 ./pkg/xtcp/ -run TestListenLocalityDispatch +// go test ./pkg/xtcp/ -run TestListenLocalityDispatch func TestListenLocalityDispatch(t *testing.T) { for _, tc := range []struct { description string