X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c3d26486e5d4e4bd11964285a6fece4897120cf8..b1ffc878a5ea6ba083b8fbc8f20c15c7a6f1e1ec:/lib/crunchstat/crunchstat_test.go diff --git a/lib/crunchstat/crunchstat_test.go b/lib/crunchstat/crunchstat_test.go index c369152b82..415c58a533 100644 --- a/lib/crunchstat/crunchstat_test.go +++ b/lib/crunchstat/crunchstat_test.go @@ -44,6 +44,7 @@ func (s testdatasource) FS() fs.FS { // // arvados-server crunchstat -dump ./testdata/example1234 sleep 2 var testdata = map[string]testdatasource{ + "debian10": {fspath: "testdata/debian10", pid: 3288}, "debian11": {fspath: "testdata/debian11", pid: 4153022}, "debian12": {fspath: "testdata/debian12", pid: 1115883}, "ubuntu1804": {fspath: "testdata/ubuntu1804", pid: 2523}, @@ -85,7 +86,7 @@ func (s *suite) TestReportCurrent(c *C) { `(?ms).*rss.*`, `(?ms).*net:.*`, `(?ms).*blkio:.*`, - `(?ms).* [\d.]+ user [\d.]+ sys ` + fmt.Sprintf("%d", runtime.NumCPU()) + ` cpus -- .*`, + `(?ms).* [\d.]+ user [\d.]+ sys ` + fmt.Sprintf("%.2f", float64(runtime.NumCPU())) + ` cpus -- .*`, } for deadline := time.Now().Add(4 * time.Second); !c.Failed(); time.Sleep(time.Millisecond) { done := true @@ -154,7 +155,7 @@ func (s *suite) TestAllTestdata(c *C) { c.Check(logs, Matches, `(?ms).* \d\d+ rss\\n.*`) c.Check(logs, Matches, `(?ms).*blkio:\d+:\d+ \d+ write \d+ read\\n.*`) c.Check(logs, Matches, `(?ms).*net:\S+ \d+ tx \d+ rx\\n.*`) - c.Check(logs, Matches, `(?ms).* [\d.]+ user [\d.]+ sys [2-9]\d* cpus.*`) + c.Check(logs, Matches, `(?ms).* [\d.]+ user [\d.]+ sys [2-9]\d*\.\d\d cpus.*`) } }