Repository: prometheus/procfs
Pull request #593 (2023-12-01 20:25:33)

Bump golang.org/x/sys from 0.13.0 to 0.15.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.13.0 to 0.15.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/golang/sys/commit/13b15b780d9013988b1fb0e79e30b2528a877638"><code>13b15b7</code></a> unix: add IoctlLoopConfigure on linux</li>
<li><a href="https://github.com/golang/sys/commit/11eadc05e9bfbaaf23ac6ebc28595a9a12f607f4"><code>11eadc0</code></a> windows: add AddDllDirectory and RemoveDllDirectory</li>
<li><a href="https://github.com/golang/sys/commit/e4099bfacb8c86adc69243822b224201edc89276"><code>e4099bf</code></a> unix: fix trimmed socket opt string in GetsockoptString</li>
<li><a href="https://github.com/golang/sys/commit/98889049283a05a1b41093739621b9606e7c3ca3"><code>9888904</code></a> unix: update BPF constants for Linux kernel 6.6</li>
<li><a href="https://github.com/golang/sys/commit/2d0c73638b2c8ff6b776ac86fdcf56fa33e362db"><code>2d0c736</code></a> unix: use fchmodat2 in Fchmodat</li>
<li><a href="https://github.com/golang/sys/commit/ec230dae7fd9abe06a61e3e05310d935e7e32b12"><code>ec230da</code></a> unix: use fcntl(2) libc stub on OpenBSD</li>
<li><a href="https://github.com/golang/sys/commit/cb378ae1ff8cd45e69d4f172df8370bc844e1f86"><code>cb378ae</code></a> syscall: call getfsstat via libc on openbsd</li>
<li><a href="https://github.com/golang/sys/commit/661d749b94a62dfdcbe1027bb3c2cdea498377b9"><code>661d749</code></a> unix: use libc stubs for OpenBSD pledge+unveil</li>
<li><a href="https://github.com/golang/sys/commit/1168e2596da3c107050a45359d2a33b6ff4b5bc6"><code>1168e25</code></a> unix/linux: update Linux kernel to v6.6</li>
<li><a href="https://github.com/golang/sys/commit/249e16f7caf5bdc2b6025811648e1074df96e3f5"><code>249e16f</code></a> unix: require minimum OpenBSD 6.4 for pledge, unveil</li>
<li>Additional commits viewable in <a href="https://github.com/golang/sys/compare/v0.13.0...v0.15.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/sys&package-manager=go_modules&previous-version=0.13.0&new-version=0.15.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/Makefile.common b/Makefile.common
index 062a281..bc2a07d 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -61,7 +61,7 @@ PROMU_URL     := https://github.com/prometheus/promu/releases/download/v$(PROMU_
 SKIP_GOLANGCI_LINT :=
 GOLANGCI_LINT :=
 GOLANGCI_LINT_OPTS ?=
-GOLANGCI_LINT_VERSION ?= v1.54.2
+GOLANGCI_LINT_VERSION ?= v1.55.2
 # golangci-lint only supports linux, darwin and windows platforms on i386/amd64.
 # windows isn't included here because of the path separator being different.
 ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin))
diff --git a/go.mod b/go.mod
index 56ba14c..1a75fa4 100644
--- a/go.mod
+++ b/go.mod
@@ -5,5 +5,5 @@ go 1.19
 require (
 	github.com/google/go-cmp v0.6.0
 	golang.org/x/sync v0.5.0
-	golang.org/x/sys v0.13.0
+	golang.org/x/sys v0.15.0
 )
diff --git a/go.sum b/go.sum
index cabf297..1d329dc 100644
--- a/go.sum
+++ b/go.sum
@@ -2,5 +2,5 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
 github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
 golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
 golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
-golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
-golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
+golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
diff --git a/meminfo.go b/meminfo.go
index db1daea..73a03e8 100644
--- a/meminfo.go
+++ b/meminfo.go
@@ -126,6 +126,7 @@ type Meminfo struct {
 	VmallocUsed *uint64
 	// largest contiguous block of vmalloc area which is free
 	VmallocChunk      *uint64
+	Percpu            *uint64
 	HardwareCorrupted *uint64
 	AnonHugePages     *uint64
 	ShmemHugePages    *uint64
@@ -178,6 +179,7 @@ type Meminfo struct {
 	VmallocTotalBytes      *uint64
 	VmallocUsedBytes       *uint64
 	VmallocChunkBytes      *uint64
+	PercpuBytes            *uint64
 	HardwareCorruptedBytes *uint64
 	AnonHugePagesBytes     *uint64
 	ShmemHugePagesBytes    *uint64
@@ -339,6 +341,9 @@ func parseMemInfo(r io.Reader) (*Meminfo, error) {
 		case "VmallocChunk:":
 			m.VmallocChunk = &val
 			m.VmallocChunkBytes = &valBytes
+		case "Percpu:":
+			m.Percpu = &val
+			m.PercpuBytes = &valBytes
 		case "HardwareCorrupted:":
 			m.HardwareCorrupted = &val
 			m.HardwareCorruptedBytes = &valBytes


Test patch:
diff --git a/meminfo_test.go b/meminfo_test.go
index 2d2b238..3d3b409 100644
--- a/meminfo_test.go
+++ b/meminfo_test.go
@@ -53,6 +53,7 @@ func TestMeminfo(t *testing.T) {
 		VmallocTotal:      newuint64(34359738367),
 		VmallocUsed:       newuint64(36596),
 		VmallocChunk:      newuint64(34359637840),
+		Percpu:            newuint64(26176),
 		HardwareCorrupted: newuint64(0),
 		AnonHugePages:     newuint64(12288),
 		HugePagesTotal:    newuint64(0),
@@ -96,6 +97,7 @@ func TestMeminfo(t *testing.T) {
 		VmallocTotalBytes:      newuint64(35184372087808),
 		VmallocUsedBytes:       newuint64(37474304),
 		VmallocChunkBytes:      newuint64(35184269148160),
+		PercpuBytes:            newuint64(26804224),
 		HardwareCorruptedBytes: newuint64(0),
 		AnonHugePagesBytes:     newuint64(12582912),
 		HugepagesizeBytes:      newuint64(2097152),
diff --git a/testdata/fixtures.ttar b/testdata/fixtures.ttar
index 92f72fa..6706516 100644
--- a/testdata/fixtures.ttar
+++ b/testdata/fixtures.ttar
@@ -2317,7 +2317,7 @@ unused devices: <none>
 Mode: 644
 # ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Path: fixtures/proc/meminfo
-Lines: 42
+Lines: 43
 MemTotal:       15666184 kB
 MemFree:          440324 kB
 Buffers:         1020128 kB
@@ -2351,6 +2351,7 @@ Committed_AS:     530844 kB
 VmallocTotal:   34359738367 kB
 VmallocUsed:       36596 kB
 VmallocChunk:   34359637840 kB
+Percpu:            26176 kB
 HardwareCorrupted:     0 kB
 AnonHugePages:     12288 kB
 HugePages_Total:       0