sys-proctable 0.8.0-sparc-solaris-2.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,302 @@
1
+ #######################################################################
2
+ # tc_sunos.rb
3
+ #
4
+ # Test suite for sys-proctable for SunOS/Solaris. This should be run
5
+ # run via the 'rake test' task.
6
+ #######################################################################
7
+ require 'rubygems'
8
+ gem 'test-unit'
9
+
10
+ require 'sys/proctable'
11
+ require 'test/test_sys_proctable_all'
12
+ include Sys
13
+
14
+ class TC_ProcTable_SunOS < Test::Unit::TestCase
15
+ def self.startup
16
+ @@fields = %w//
17
+ end
18
+
19
+ def setup
20
+ @ptable = ProcTable.ps.first
21
+ end
22
+
23
+ # PSINFO
24
+
25
+ def test_flag
26
+ assert_respond_to(@ptable, :flag)
27
+ assert_kind_of(Integer, @ptable.flag)
28
+ end
29
+
30
+ def test_nlwp
31
+ assert_respond_to(@ptable, :nlwp)
32
+ assert_kind_of(Integer, @ptable.nlwp)
33
+ assert_true(@ptable.nlwp >= 0)
34
+ end
35
+
36
+ def test_pid
37
+ assert_respond_to(@ptable, :pid)
38
+ assert_kind_of(Integer, @ptable.pid)
39
+ assert_true(@ptable.pid >= 0)
40
+ end
41
+
42
+ def test_ppid
43
+ assert_respond_to(@ptable, :ppid)
44
+ assert_kind_of(Integer, @ptable.ppid)
45
+ assert_true(@ptable.ppid >= 0)
46
+ end
47
+
48
+ def test_pgid
49
+ assert_respond_to(@ptable, :pgid)
50
+ assert_kind_of(Integer, @ptable.pgid)
51
+ assert_true(@ptable.pgid >= 0)
52
+ end
53
+
54
+ def test_sid
55
+ assert_respond_to(@ptable, :sid)
56
+ assert_kind_of(Integer, @ptable.sid)
57
+ assert_true(@ptable.sid >= 0)
58
+ end
59
+
60
+ def test_uid
61
+ assert_respond_to(@ptable, :uid)
62
+ assert_kind_of(Integer, @ptable.uid)
63
+ assert_true(@ptable.uid >= 0)
64
+ end
65
+
66
+ def test_euid
67
+ assert_respond_to(@ptable, :euid)
68
+ assert_kind_of(Integer, @ptable.euid)
69
+ assert_true(@ptable.euid >= 0)
70
+ end
71
+
72
+ def test_gid
73
+ assert_respond_to(@ptable, :gid)
74
+ assert_kind_of(Integer, @ptable.gid)
75
+ assert_true(@ptable.gid >= 0)
76
+ end
77
+
78
+ def test_egid
79
+ assert_respond_to(@ptable, :egid)
80
+ assert_kind_of(Integer, @ptable.egid)
81
+ assert_true(@ptable.egid >= 0)
82
+ end
83
+
84
+ def test_addr
85
+ assert_respond_to(@ptable, :addr)
86
+ assert_kind_of(Integer, @ptable.addr)
87
+ assert_true(@ptable.addr >= 0)
88
+ end
89
+
90
+ def test_size
91
+ assert_respond_to(@ptable, :size)
92
+ assert_kind_of(Integer, @ptable.size)
93
+ assert_true(@ptable.size >= 0)
94
+ end
95
+
96
+ def test_rssize
97
+ assert_respond_to(@ptable, :rssize)
98
+ assert_kind_of(Integer, @ptable.rssize)
99
+ assert_true(@ptable.rssize >= 0)
100
+ end
101
+
102
+ def test_ttydev
103
+ assert_respond_to(@ptable, :ttydev)
104
+ assert_kind_of(Integer, @ptable.ttydev)
105
+ assert_true(@ptable.ttydev >= 0 || @ptable.ttydev == -1)
106
+ end
107
+
108
+ def test_pctcpu
109
+ assert_respond_to(@ptable, :pctcpu)
110
+ assert_kind_of(Float, @ptable.pctcpu)
111
+ assert_true(@ptable.pctcpu >= 0)
112
+ end
113
+
114
+ def test_pctmem
115
+ assert_respond_to(@ptable, :pctmem)
116
+ assert_kind_of(Float, @ptable.pctmem)
117
+ assert_true(@ptable.pctmem >= 0)
118
+ end
119
+
120
+ def test_start
121
+ assert_respond_to(@ptable, :start)
122
+ assert_kind_of(Time, @ptable.start)
123
+ end
124
+
125
+ def test_time
126
+ assert_respond_to(@ptable, :time)
127
+ assert_kind_of(Integer, @ptable.time)
128
+ assert_true(@ptable.time >= 0)
129
+ end
130
+
131
+ def test_ctime
132
+ assert_respond_to(@ptable, :ctime)
133
+ assert_kind_of(Integer, @ptable.ctime)
134
+ assert_true(@ptable.ctime >= 0)
135
+ end
136
+
137
+ def test_fname
138
+ assert_respond_to(@ptable, :fname)
139
+ assert_kind_of(String, @ptable.fname)
140
+ assert_true(@ptable.fname.size > 0)
141
+ end
142
+
143
+ def test_psargs
144
+ assert_respond_to(@ptable, :psargs)
145
+ assert_kind_of(String, @ptable.psargs)
146
+ assert_true(@ptable.psargs.size > 0)
147
+ end
148
+
149
+ def test_wstat
150
+ assert_respond_to(@ptable, :wstat)
151
+ assert_kind_of(Integer, @ptable.wstat)
152
+ assert_true(@ptable.wstat >= 0)
153
+ end
154
+
155
+ def test_argc
156
+ assert_respond_to(@ptable, :argc)
157
+ assert_kind_of(Integer, @ptable.argc)
158
+ assert_true(@ptable.argc >= 0)
159
+ end
160
+
161
+ def test_argv
162
+ assert_respond_to(@ptable, :argv)
163
+ assert_kind_of(Integer, @ptable.argv)
164
+ assert_true(@ptable.argv >= 0)
165
+ end
166
+
167
+ def test_envp
168
+ assert_respond_to(@ptable, :envp)
169
+ assert_kind_of(Integer, @ptable.envp)
170
+ assert_true(@ptable.envp >= 0)
171
+ end
172
+
173
+ def test_dmodel
174
+ assert_respond_to(@ptable, :dmodel)
175
+ assert_kind_of(Integer, @ptable.dmodel)
176
+ assert_true(@ptable.dmodel >= 0)
177
+ end
178
+
179
+ def test_taskid
180
+ assert_respond_to(@ptable, :taskid)
181
+ assert_kind_of(Integer, @ptable.taskid)
182
+ assert_true(@ptable.taskid >= 0)
183
+ end
184
+
185
+ def test_projid
186
+ assert_respond_to(@ptable, :projid)
187
+ assert_kind_of(Integer, @ptable.projid)
188
+ assert_true(@ptable.projid >= 0)
189
+ end
190
+
191
+ def test_nzomb
192
+ assert_respond_to(@ptable, :nzomb)
193
+ assert_kind_of(Integer, @ptable.nzomb)
194
+ assert_true(@ptable.nzomb >= 0)
195
+ end
196
+
197
+ def test_poolid
198
+ assert_respond_to(@ptable, :poolid)
199
+ assert_kind_of(Integer, @ptable.poolid)
200
+ assert_true(@ptable.poolid >= 0)
201
+ end
202
+
203
+ def test_zoneid
204
+ assert_respond_to(@ptable, :zoneid)
205
+ assert_kind_of(Integer, @ptable.zoneid)
206
+ assert_true(@ptable.zoneid >= 0)
207
+ end
208
+
209
+ def test_contract
210
+ assert_respond_to(@ptable, :contract)
211
+ assert_kind_of(Integer, @ptable.contract)
212
+ assert_true(@ptable.contract >= 0 || @ptable.contract == -1)
213
+ end
214
+
215
+ # LWPSINFO
216
+
217
+ def test_lwpid
218
+ assert_respond_to(@ptable, :lwpid)
219
+ assert_kind_of(Integer, @ptable.lwpid)
220
+ assert_true(@ptable.lwpid >= 0)
221
+ end
222
+
223
+ def test_wchan
224
+ assert_respond_to(@ptable, :wchan)
225
+ assert_kind_of(Integer, @ptable.wchan)
226
+ assert_true(@ptable.wchan >= 0)
227
+ end
228
+
229
+ def test_stype
230
+ assert_respond_to(@ptable, :stype)
231
+ assert_kind_of(Fixnum, @ptable.stype)
232
+ assert_true(@ptable.stype >= 0)
233
+ end
234
+
235
+ def test_state
236
+ assert_respond_to(@ptable, :state)
237
+ assert_kind_of(Fixnum, @ptable.state)
238
+ assert_true(@ptable.state >= 0)
239
+ end
240
+
241
+ def test_sname
242
+ assert_respond_to(@ptable, :sname)
243
+ assert_kind_of(String, @ptable.sname)
244
+ assert_true(['S', 'R', 'Z', 'T', 'I', 'O'].include?(@ptable.sname))
245
+ end
246
+
247
+ def test_nice
248
+ assert_respond_to(@ptable, :nice)
249
+ assert_kind_of(Fixnum, @ptable.nice)
250
+ assert_true(@ptable.nice >= 0)
251
+ end
252
+
253
+ def test_syscall
254
+ assert_respond_to(@ptable, :syscall)
255
+ assert_kind_of(Fixnum, @ptable.syscall)
256
+ assert_true(@ptable.syscall >= 0)
257
+ end
258
+
259
+ def test_pri
260
+ assert_respond_to(@ptable, :pri)
261
+ assert_kind_of(Fixnum, @ptable.pri)
262
+ assert_true(@ptable.pri >= 0)
263
+ end
264
+
265
+ def test_clname
266
+ assert_respond_to(@ptable, :clname)
267
+ assert_kind_of(String, @ptable.clname)
268
+ assert_true(@ptable.clname.length >= 0 && @ptable.clname.length <= 8)
269
+ end
270
+
271
+ def test_name
272
+ assert_respond_to(@ptable, :name)
273
+ assert_kind_of(String, @ptable.name)
274
+ assert_true(@ptable.name.length >= 0 && @ptable.name.length <= 16)
275
+ end
276
+
277
+ def test_onpro
278
+ assert_respond_to(@ptable, :onpro)
279
+ assert_kind_of(Fixnum, @ptable.onpro)
280
+ assert_true(@ptable.onpro >= 0)
281
+ end
282
+
283
+ def test_bindpro
284
+ assert_respond_to(@ptable, :bindpro)
285
+ assert_kind_of(Fixnum, @ptable.bindpro)
286
+ assert_true(@ptable.bindpro >= 0 || @ptable.bindpro == -1)
287
+ end
288
+
289
+ def test_bindpset
290
+ assert_respond_to(@ptable, :bindpset)
291
+ assert_kind_of(Fixnum, @ptable.bindpset)
292
+ assert_true(@ptable.bindpset >= 0 || @ptable.bindpset == -1)
293
+ end
294
+
295
+ def teardown
296
+ @ptable = nil
297
+ end
298
+
299
+ def self.shutdown
300
+ @@fields = nil
301
+ end
302
+ end
metadata ADDED
@@ -0,0 +1,74 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sys-proctable
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.8.0
5
+ platform: sparc-solaris-2.10
6
+ authors:
7
+ - Daniel J. Berger
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-01-27 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: test-unit
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.0.2
24
+ version:
25
+ description: An interface for providing process table information
26
+ email: djberg96@gmail.com
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files:
32
+ - CHANGES
33
+ - README
34
+ - MANIFEST
35
+ - doc/top.txt
36
+ - doc/solaris.txt
37
+ files:
38
+ - lib/sys/top.rb
39
+ - test/test_sys_proctable_all.rb
40
+ - CHANGES
41
+ - README
42
+ - MANIFEST
43
+ - doc/top.txt
44
+ - lib/sys/proctable.rb
45
+ - doc/solaris.txt
46
+ has_rdoc: true
47
+ homepage: http://www.rubyforge.org/projects/sysutils
48
+ post_install_message:
49
+ rdoc_options: []
50
+
51
+ require_paths:
52
+ - lib
53
+ required_ruby_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: 1.8.2
58
+ version:
59
+ required_rubygems_version: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: "0"
64
+ version:
65
+ requirements: []
66
+
67
+ rubyforge_project: sysutils
68
+ rubygems_version: 1.3.1
69
+ signing_key:
70
+ specification_version: 2
71
+ summary: An interface for providing process table information
72
+ test_files:
73
+ - test/test_sys_proctable_all.rb
74
+ - test/test_sys_proctable_sunos.rb