@@ -38,11 +38,11 @@ func TestArcstatsParsing(t *testing.T) {
38
38
err = c .parseProcfsFile (arcstatsFile , "arcstats" , func (s zfsSysctl , v interface {}) {
39
39
40
40
if s == zfsSysctl ("kstat.zfs.misc.arcstats.hits" ) {
41
- if v .(uint64 ) != uint64 ( 8772612 ) {
41
+ if v .(uint64 ) != 8772612 {
42
42
t .Fatalf ("Incorrect value parsed from procfs data" )
43
43
}
44
44
} else if s == zfsSysctl ("kstat.zfs.misc.arcstats.memory_available_bytes" ) {
45
- if v .(int64 ) != int64 ( - 922337203685477580 ) {
45
+ if v .(int64 ) != - 922337203685477580 {
46
46
t .Fatalf ("Incorrect value parsed from procfs data" )
47
47
}
48
48
} else {
@@ -80,7 +80,7 @@ func TestZfetchstatsParsing(t *testing.T) {
80
80
81
81
handlerCalled = true
82
82
83
- if v .(uint64 ) != uint64 ( 7067992 ) {
83
+ if v .(uint64 ) != 7067992 {
84
84
t .Fatalf ("Incorrect value parsed from procfs data" )
85
85
}
86
86
@@ -116,7 +116,7 @@ func TestZilParsing(t *testing.T) {
116
116
117
117
handlerCalled = true
118
118
119
- if v .(uint64 ) != uint64 ( 10 ) {
119
+ if v .(uint64 ) != 10 {
120
120
t .Fatalf ("Incorrect value parsed from procfs data" )
121
121
}
122
122
@@ -152,7 +152,7 @@ func TestVdevCacheStatsParsing(t *testing.T) {
152
152
153
153
handlerCalled = true
154
154
155
- if v .(uint64 ) != uint64 ( 40 ) {
155
+ if v .(uint64 ) != 40 {
156
156
t .Fatalf ("Incorrect value parsed from procfs data" )
157
157
}
158
158
@@ -188,7 +188,7 @@ func TestXuioStatsParsing(t *testing.T) {
188
188
189
189
handlerCalled = true
190
190
191
- if v .(uint64 ) != uint64 ( 32 ) {
191
+ if v .(uint64 ) != 32 {
192
192
t .Fatalf ("Incorrect value parsed from procfs data" )
193
193
}
194
194
@@ -224,7 +224,7 @@ func TestFmParsing(t *testing.T) {
224
224
225
225
handlerCalled = true
226
226
227
- if v .(uint64 ) != uint64 ( 18 ) {
227
+ if v .(uint64 ) != 18 {
228
228
t .Fatalf ("Incorrect value parsed from procfs data" )
229
229
}
230
230
@@ -260,7 +260,7 @@ func TestDmuTxParsing(t *testing.T) {
260
260
261
261
handlerCalled = true
262
262
263
- if v .(uint64 ) != uint64 ( 3532844 ) {
263
+ if v .(uint64 ) != 3532844 {
264
264
t .Fatalf ("Incorrect value parsed from procfs data" )
265
265
}
266
266
@@ -300,7 +300,7 @@ func TestZpoolParsing(t *testing.T) {
300
300
301
301
handlerCalled = true
302
302
303
- if v != uint64 ( 1884160 ) && v != uint64 ( 2826240 ) {
303
+ if v != 1884160 && v != 2826240 {
304
304
t .Fatalf ("Incorrect value parsed from procfs data %v" , v )
305
305
}
306
306
@@ -340,7 +340,7 @@ func TestZpoolObjsetParsing(t *testing.T) {
340
340
341
341
handlerCalled = true
342
342
343
- if v != uint64 ( 0 ) && v != uint64 ( 4 ) && v != uint64 ( 10 ) {
343
+ if v != 0 && v != 4 && v != 10 {
344
344
t .Fatalf ("Incorrect value parsed from procfs data %v" , v )
345
345
}
346
346
@@ -376,7 +376,7 @@ func TestAbdstatsParsing(t *testing.T) {
376
376
377
377
handlerCalled = true
378
378
379
- if v .(uint64 ) != uint64 ( 223232 ) {
379
+ if v .(uint64 ) != 223232 {
380
380
t .Fatalf ("Incorrect value parsed from procfs abdstats data" )
381
381
}
382
382
@@ -412,7 +412,7 @@ func TestDbufstatsParsing(t *testing.T) {
412
412
413
413
handlerCalled = true
414
414
415
- if v .(uint64 ) != uint64 ( 108807 ) {
415
+ if v .(uint64 ) != 108807 {
416
416
t .Fatalf ("Incorrect value parsed from procfs dbufstats data" )
417
417
}
418
418
@@ -448,7 +448,7 @@ func TestDnodestatsParsing(t *testing.T) {
448
448
449
449
handlerCalled = true
450
450
451
- if v .(uint64 ) != uint64 ( 37617 ) {
451
+ if v .(uint64 ) != 37617 {
452
452
t .Fatalf ("Incorrect value parsed from procfs dnodestats data" )
453
453
}
454
454
@@ -484,7 +484,7 @@ func TestVdevMirrorstatsParsing(t *testing.T) {
484
484
485
485
handlerCalled = true
486
486
487
- if v .(uint64 ) != uint64 ( 94 ) {
487
+ if v .(uint64 ) != 94 {
488
488
t .Fatalf ("Incorrect value parsed from procfs vdev_mirror_stats data" )
489
489
}
490
490
@@ -521,26 +521,26 @@ func TestPoolStateParsing(t *testing.T) {
521
521
handlerCalled = true
522
522
523
523
if poolName == "pool1" {
524
- if isActive != uint64 ( 1 ) && stateName == "online" {
524
+ if isActive != 1 && stateName == "online" {
525
525
t .Fatalf ("Incorrect parsed value for online state" )
526
526
}
527
- if isActive != uint64 ( 0 ) && stateName != "online" {
527
+ if isActive != 0 && stateName != "online" {
528
528
t .Fatalf ("Incorrect parsed value for online state" )
529
529
}
530
530
}
531
531
if poolName == "poolz1" {
532
- if isActive != uint64 ( 1 ) && stateName == "degraded" {
532
+ if isActive != 1 && stateName == "degraded" {
533
533
t .Fatalf ("Incorrect parsed value for degraded state" )
534
534
}
535
- if isActive != uint64 ( 0 ) && stateName != "degraded" {
535
+ if isActive != 0 && stateName != "degraded" {
536
536
t .Fatalf ("Incorrect parsed value for degraded state" )
537
537
}
538
538
}
539
539
if poolName == "pool2" {
540
- if isActive != uint64 ( 1 ) && stateName == "suspended" {
540
+ if isActive != 1 && stateName == "suspended" {
541
541
t .Fatalf ("Incorrect parsed value for suspended state" )
542
542
}
543
- if isActive != uint64 ( 0 ) && stateName != "suspended" {
543
+ if isActive != 0 && stateName != "suspended" {
544
544
t .Fatalf ("Incorrect parsed value for suspended state" )
545
545
}
546
546
}
0 commit comments