File tree 2 files changed +29
-16
lines changed
2 files changed +29
-16
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,8 @@ func (p Proc) Stat() (ProcStat, error) {
128
128
}
129
129
130
130
var (
131
- ignore int
131
+ ignoreInt64 int64
132
+ ignoreUint64 uint64
132
133
133
134
s = ProcStat {PID : p .PID , proc : p .fs }
134
135
l = bytes .Index (data , []byte ("(" ))
@@ -160,25 +161,25 @@ func (p Proc) Stat() (ProcStat, error) {
160
161
& s .Priority ,
161
162
& s .Nice ,
162
163
& s .NumThreads ,
163
- & ignore ,
164
+ & ignoreInt64 ,
164
165
& s .Starttime ,
165
166
& s .VSize ,
166
167
& s .RSS ,
167
168
& s .RSSLimit ,
168
- & ignore ,
169
- & ignore ,
170
- & ignore ,
171
- & ignore ,
172
- & ignore ,
173
- & ignore ,
174
- & ignore ,
175
- & ignore ,
176
- & ignore ,
177
- & ignore ,
178
- & ignore ,
179
- & ignore ,
180
- & ignore ,
181
- & ignore ,
169
+ & ignoreUint64 ,
170
+ & ignoreUint64 ,
171
+ & ignoreUint64 ,
172
+ & ignoreUint64 ,
173
+ & ignoreUint64 ,
174
+ & ignoreUint64 ,
175
+ & ignoreUint64 ,
176
+ & ignoreUint64 ,
177
+ & ignoreUint64 ,
178
+ & ignoreUint64 ,
179
+ & ignoreUint64 ,
180
+ & ignoreUint64 ,
181
+ & ignoreInt64 ,
182
+ & ignoreInt64 ,
182
183
& s .RTPriority ,
183
184
& s .Policy ,
184
185
& s .DelayAcctBlkIOTicks ,
Original file line number Diff line number Diff line change @@ -76,6 +76,18 @@ func TestProcStat(t *testing.T) {
76
76
}
77
77
}
78
78
79
+ func TestProcStatIgnored (t * testing.T ) {
80
+ p , err := getProcFixtures (t ).Proc (26232 )
81
+ if err != nil {
82
+ t .Fatal (err )
83
+ }
84
+
85
+ _ , err = p .Stat ()
86
+ if err != nil {
87
+ t .Errorf ("want not error, have %s" , err )
88
+ }
89
+ }
90
+
79
91
func TestProcStatComm (t * testing.T ) {
80
92
s1 , err := testProcStat (26231 )
81
93
if err != nil {
You can’t perform that action at this time.
0 commit comments