| 1 |
Some information can be obsolete. |
| 2 |
|
| 3 |
It was useful when we started designing the tests to |
| 4 |
attempt to gather ideas about the subject of testing |
| 5 |
and approach of testing. |
| 6 |
================================ |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
Source Operand Complex test specification |
| 12 |
(guideline of designing the test) |
| 13 |
|
| 14 |
Collection of remarks not intended to constitute the facile |
| 15 |
joined statement. These considerations should be taken into |
| 16 |
account while designing the Source Operand Complex test. |
| 17 |
Some of them are applicable in general while designing the |
| 18 |
ASL tests. |
| 19 |
|
| 20 |
All the ASL declarartions allowed by the ASL compiler have to |
| 21 |
work in compliance with the ACPI specification, in a predictable |
| 22 |
and convenient for users manner (so, ACPI could be changed as well). |
| 23 |
|
| 24 |
Outlined are the subject of testing, the main aspects of it, |
| 25 |
the main points to be concentrated on while designing the test |
| 26 |
and the practical steps which should be performed to achieve the |
| 27 |
worthy coverage of the test. Also the objective difficulties |
| 28 |
which are on that way are explained. |
| 29 |
|
| 30 |
This text is for ourselves in the first order. |
| 31 |
Allow, some statements to be abstract, non-strict and questionable. |
| 32 |
Bilieve, the abstraction will be useful. |
| 33 |
|
| 34 |
Writing the Operand Complex test is quite complicated |
| 35 |
(it is not a functional test were you simply verify each |
| 36 |
feature separately), so after implementing some its part you |
| 37 |
see some ASL functionality is involved by test repeatedly though |
| 38 |
you thought about different things. This text is in particular |
| 39 |
intended to enumerate all the aspects to be verified, and don't |
| 40 |
further hesitate if all them are applied. |
| 41 |
|
| 42 |
The intention of the test is to verify all the grammar rules |
| 43 |
of specifying and delivering operands to operators. |
| 44 |
|
| 45 |
This is a wide range of issues which are simpler to understand and |
| 46 |
embrace given together as a separate particular topic, as a separate |
| 47 |
approach. Each the particular relevant aspect should be given separately, |
| 48 |
the approach of how to test it should be designed and then applied to all |
| 49 |
the ASL operators. Then the next aspect should be taken separately and |
| 50 |
also verified for all the operators. This would allow to concentrate |
| 51 |
deeply on each aspect and to observe the coverage provided by the test |
| 52 |
which would be impossible to do in the contrary case when the |
| 53 |
per-operator tests each contains all the aspects checkings. |
| 54 |
|
| 55 |
All the relevant aspects should be verified for each particular operator |
| 56 |
(or at least for one member of each group of operators divided according |
| 57 |
to the considered aspects of delivering operands to operators if only you |
| 58 |
can found such division to groups). While building the tests we have |
| 59 |
observed many confirmations of the idea that aspects of delivering |
| 60 |
operands to operators can work differently for different operators, |
| 61 |
while being proper for some of them it fails for other. |
| 62 |
|
| 63 |
Minimum functionality of operators should be involved there to prove |
| 64 |
only the fact that operands are delivered to operators correctly. |
| 65 |
To check functionality of operators is up to other tests. |
| 66 |
|
| 67 |
The test should also check that the source values which were |
| 68 |
referred to as parameters were not corrupted by the execution |
| 69 |
of the particular operator, which are the situations being in |
| 70 |
practice revealed by our other tests many times. |
| 71 |
|
| 72 |
The test verifies processing of both the valid operands and |
| 73 |
invalid operands. Building the invalid operand checkings is a simple |
| 74 |
task - pass operator with the inappropriate type operand and check that |
| 75 |
the exception occurs. So, below are mostly about the valid operand checkings. |
| 76 |
|
| 77 |
The valid operand checkings verify all the legal ways of specifying and |
| 78 |
delivering operands to ASL operators. The following section describes the |
| 79 |
essential aspects of that process. |
| 80 |
|
| 81 |
Note: some particularities are obsolete due to the change of ACPI |
| 82 |
specification since that. |
| 83 |
|
| 84 |
|
| 85 |
ESSENTIAL ASPECTS OF OPERAND DELIVERING |
| 86 |
======================================= |
| 87 |
|
| 88 |
IMAGES |
| 89 |
|
| 90 |
All the vatiety of ways specifying the immediate images of ASL objects |
| 91 |
of all types should be represented. All the types are given in the table |
| 92 |
17-20 of ACPI specification: |
| 93 |
|
| 94 |
Uninitialized |
| 95 |
* Integer |
| 96 |
* String |
| 97 |
* Buffer |
| 98 |
* Package |
| 99 |
* Field Unit |
| 100 |
Device |
| 101 |
Event |
| 102 |
Method |
| 103 |
Mutex |
| 104 |
Operation Region |
| 105 |
Power Resource |
| 106 |
Processor |
| 107 |
Thermal Zone |
| 108 |
* Buffer Field |
| 109 |
DDB Handle |
| 110 |
|
| 111 |
(*) - computational types. The table #1 below shows |
| 112 |
all the variety of computational type images |
| 113 |
() - the remained types are mostly used in the |
| 114 |
invalid operand checkings |
| 115 |
|
| 116 |
|
| 117 |
LOCATIONS |
| 118 |
|
| 119 |
The location of the object in the name space relating |
| 120 |
to the operator where that object is utilized. |
| 121 |
|
| 122 |
- statically accessible global object |
| 123 |
located immediately in the DefinitionBlock |
| 124 |
- statically accessible declared locally in the current scope |
| 125 |
- statically accessible declared locally in the surrounding upper |
| 126 |
scope, (1,2,3,...,LOC_LEVELS levels up) |
| 127 |
- inaccessible statically, declared locally in the sequence |
| 128 |
of the calling methods, (1,2,3,...,LOC_LEVELS levels up) |
| 129 |
|
| 130 |
Note: all the functionality of all scope generating concepts: |
| 131 |
DefinitionBlock, Scope, Device, Method, Function, Processor, |
| 132 |
PowerResource, ThermalZone,... will be verified in the |
| 133 |
relevant complex tests, not here. |
| 134 |
|
| 135 |
|
| 136 |
REFERENCES |
| 137 |
|
| 138 |
References to objects, dereferred then by DeRefOf. |
| 139 |
|
| 140 |
References by Index |
| 141 |
|
| 142 |
Index(String, Index) |
| 143 |
Index(Buffer, Index) |
| 144 |
Index(Package, Index) |
| 145 |
Index(String, Index, Destination) |
| 146 |
Index(Buffer, Index, Destination) |
| 147 |
Index(Package, Index, Destination) |
| 148 |
DerefOf(Index(String, Index)) |
| 149 |
DerefOf(Index(Buffer, Index)) |
| 150 |
DerefOf(Index(Package, Index)) |
| 151 |
DerefOf(Index(String, Index, Destination)) |
| 152 |
DerefOf(Index(Buffer, Index, Destination)) |
| 153 |
DerefOf(Index(Package, Index, Destination)) |
| 154 |
|
| 155 |
References by RefOf |
| 156 |
|
| 157 |
RefOf(Integer) |
| 158 |
RefOf(String) |
| 159 |
RefOf(Buffer) |
| 160 |
RefOf(Package) |
| 161 |
DerefOf(RefOf(Integer)) |
| 162 |
DerefOf(RefOf(String)) |
| 163 |
DerefOf(RefOf(Buffer)) |
| 164 |
DerefOf(RefOf(Package)) |
| 165 |
|
| 166 |
References by CondRefOf |
| 167 |
|
| 168 |
CondRefOf(Integer) |
| 169 |
CondRefOf(String) |
| 170 |
CondRefOf(Buffer) |
| 171 |
CondRefOf(Package) |
| 172 |
CondRefOf(Integer, Result) |
| 173 |
CondRefOf(String, Result) |
| 174 |
CondRefOf(Buffer, Result) |
| 175 |
CondRefOf(Package, Result) |
| 176 |
DerefOf(CondRefOf(Integer)) |
| 177 |
DerefOf(CondRefOf(String)) |
| 178 |
DerefOf(CondRefOf(Buffer)) |
| 179 |
DerefOf(CondRefOf(Package)) |
| 180 |
DerefOf(CondRefOf(Integer, Result)) |
| 181 |
DerefOf(CondRefOf(String, Result)) |
| 182 |
DerefOf(CondRefOf(Buffer, Result)) |
| 183 |
DerefOf(CondRefOf(Package, Result)) |
| 184 |
|
| 185 |
Note: it was observed earlier that logical operators |
| 186 |
didn't cause exceptions when using references. |
| 187 |
This looks incorrect. Keep attention to that. |
| 188 |
Don't forget to build the test for it. |
| 189 |
|
| 190 |
Note: specification of Reference test contains more exact list. |
| 191 |
|
| 192 |
EXPRESSIONS |
| 193 |
|
| 194 |
The way how the object is specified |
| 195 |
for operator in place of operand. |
| 196 |
|
| 197 |
- immediate image |
| 198 |
- ArgX |
| 199 |
- LocalX |
| 200 |
- NamedX |
| 201 |
- expression as such, immediate result of other operators |
| 202 |
(references are some of operators as well) like this: |
| 203 |
Operator(Operator(Operator(Operator(...)))) |
| 204 |
Operator([Operand,]Operator([Operand,]Operator(...))) |
| 205 |
Depth: 1,2,3,...,EXP_LEVELS |
| 206 |
- use execution of other Methods as a kind of expressions as well |
| 207 |
|
| 208 |
Note: expressions in place of locations for results |
| 209 |
(Destinations) should be verified in this test |
| 210 |
as well, because together with the expressions |
| 211 |
of operands they can influence each other. |
| 212 |
|
| 213 |
Issue: expressions in result, is that possible to use? |
| 214 |
|
| 215 |
METHODS |
| 216 |
|
| 217 |
- use Methods as elements of expressions |
| 218 |
- use all kind expressions as parameters to Methods |
| 219 |
|
| 220 |
|
| 221 |
CONVERSION |
| 222 |
|
| 223 |
The Implicit Source Operand Conversion functionality |
| 224 |
(17.2.5.7 Data Type Conversion Rules) should be verified also. |
| 225 |
|
| 226 |
The table # 1 below proposes the particular values for to initiate |
| 227 |
all the variety of Implicit Source Operand Conversion rules. |
| 228 |
|
| 229 |
|
| 230 |
OPERATORS |
| 231 |
|
| 232 |
As it was mentioned above, the particular target operator |
| 233 |
can impact delivering operands to it. Thus, we can't build the test |
| 234 |
for only one particular operator but should be bent on building the |
| 235 |
checkings for many (to all is the best) of them or for one member of |
| 236 |
each group (if manage found division). An aspect can work correctly |
| 237 |
while delivering operand to one operator but fail while delivering |
| 238 |
to other. |
| 239 |
|
| 240 |
Pay attention to both: |
| 241 |
|
| 242 |
- the complete and the reduced forms of operators |
| 243 |
- the target operators and operators used in expressions |
| 244 |
|
| 245 |
|
| 246 |
MISCELLANEOUS |
| 247 |
|
| 248 |
Additional miscellaneous features, particular situations |
| 249 |
which should be verified. They are descended from the aspects |
| 250 |
above (as the particular elements of an absolute test (see below)). |
| 251 |
These notes allow to keep additional attention to them. They look |
| 252 |
to be a complicated modes for ACPICA. |
| 253 |
|
| 254 |
Note: add this aspect with more new complicated checkings. |
| 255 |
|
| 256 |
1. Use the same object more than one time in expressions of |
| 257 |
operands and destinations: |
| 258 |
|
| 259 |
- in expression of one operand of target operator |
| 260 |
- in expressions of different operands of the target operator |
| 261 |
- in expression of one operand and the result is stored into the object |
| 262 |
- in expressions of different operands of target operator and |
| 263 |
the result is located into the object... |
| 264 |
- in other words, continue combinations of these features: |
| 265 |
|
| 266 |
(one operand)/(some (all) operands) |
| 267 |
(one operator)/(several operators) |
| 268 |
(store result in it)/(don't store result in it)... |
| 269 |
|
| 270 |
2. Pass the object of upper level (or even global) accessible |
| 271 |
statically by ArgX of sequence of calling methods (operand1) and |
| 272 |
specify the same object as another operand immediately by its NameX |
| 273 |
(operand2) and use them both in turn (operand1/operand2) as locations |
| 274 |
for result. |
| 275 |
|
| 276 |
3. Other cases. |
| 277 |
|
| 278 |
|
| 279 |
ABSOLUTE TEST ABSTRACTION |
| 280 |
========================= |
| 281 |
|
| 282 |
So, all the aspects which can impact delivering operands to operators |
| 283 |
and thus should be verified are these: |
| 284 |
|
| 285 |
Images |
| 286 |
Locations |
| 287 |
References |
| 288 |
Expressions |
| 289 |
Methods |
| 290 |
Conversion |
| 291 |
Operators |
| 292 |
Miscellaneous |
| 293 |
|
| 294 |
The more you mix these aspects the more comprehensive test you |
| 295 |
have. Each impact generated and verified by test is a function of |
| 296 |
(N1,N2,N3,N4,N5,N6,N7,N8) parameters. So, to build the total absolute |
| 297 |
comprehensive test we have to build and verify all the possible |
| 298 |
combinations of these input states. |
| 299 |
|
| 300 |
In this case we will miss nothing and the total coverage of testing |
| 301 |
the operand delivering will be achieved. |
| 302 |
|
| 303 |
To build the test as a simple enumeration and verification |
| 304 |
of all possible combinations of given above parameters would be |
| 305 |
the simplest way. Though it would be usually much redundant we |
| 306 |
would be happy and assured that the total coverage would be |
| 307 |
actually achieved. |
| 308 |
|
| 309 |
Note: what actually is the mix of these (N1-N8) aspects? |
| 310 |
|
| 311 |
|
| 312 |
REALITY, LIMITATIONS OF ACPICA ASL |
| 313 |
================================== |
| 314 |
|
| 315 |
But there are several limitations of ACPICA ASL which make |
| 316 |
such simplest and the total coverage assured approach (absolute |
| 317 |
test) impossible, because they prevent automated processing. |
| 318 |
About all that below. In consequence of all that, it is remained |
| 319 |
only to rely on the human factor, intuition and skill to achieve |
| 320 |
the worthy coverage of the test. |
| 321 |
|
| 322 |
Elements of ASL Package could be only Integer, String, Buffer |
| 323 |
and Package type objects. Other type objects could not be represented |
| 324 |
immediately in Package. So, it is impossible to collect all the |
| 325 |
desirable different type objects in Package and then refer them |
| 326 |
in cycle. |
| 327 |
|
| 328 |
We can't pass Method with the Uninitialized object, so these |
| 329 |
conditions should be also provided by the test as the immediate |
| 330 |
references to the Uninitialized objects which prevents automated |
| 331 |
processing as well. |
| 332 |
|
| 333 |
One more inconvenience for testing arises from the type conversion |
| 334 |
functionality. Due to that some type objects could not be represented |
| 335 |
not only as elements of Package, but also be passed to Method as parameters |
| 336 |
(Buffer Field, Field Unit, etc..), since they are converted to either Integer |
| 337 |
or Buffer types in the latter case. As a result, these conditions should |
| 338 |
be provided by the test immediately also and can not be referred in cycle. |
| 339 |
|
| 340 |
The are similar limitations on return from method as well. |
| 341 |
|
| 342 |
Some groups of operators (Concatenate; Logical operators) have |
| 343 |
particularities of Implicit Source Operand Conversion functionality |
| 344 |
which also restricts uniformity of test for different operators. |
| 345 |
|
| 346 |
So, we can't run in cycle all the possible desirable combinations |
| 347 |
(and aspects) of operands for all the ASL operators, because the ASL |
| 348 |
limitations don't allow to achieve uniformity of the test building. |
| 349 |
It is impossible to build the test which simply enumerates all |
| 350 |
combinations and so achieve the total coverage. One more, such the |
| 351 |
test will go during the huge boundless time. |
| 352 |
|
| 353 |
Thus, it is up to the skill of the designer of the test to choose |
| 354 |
the main points to be verified in order to build the test which would |
| 355 |
achieve the worthy coverage for the acceptable time of execution. |
| 356 |
|
| 357 |
So, maybe, attempt to divide operators on groups according to |
| 358 |
the specific of their operands and one operator of each group verify |
| 359 |
comprehensively, while other members of groups verify in a simplified |
| 360 |
manner. Do that if the run time of the test increases extremely. |
| 361 |
|
| 362 |
So, because of the ASL limitations described above we can't implement |
| 363 |
the comprehencive test, which would be proven to approximate to the absolute |
| 364 |
test on coverage. But this specification and the tests adhered to it would |
| 365 |
allow us to feel ourselves to be on the firm way to achieve the worthy coverage |
| 366 |
and consider that we have done all needed from our side to achieve the |
| 367 |
comprehencive tests. |
| 368 |
|
| 369 |
So, due to the limitations of ASL above, we refuse attempts to write the |
| 370 |
common engine which would simplify our work and ensure the high coverage of |
| 371 |
test. Nevertheless, write and apply where possible the common use methods. |
| 372 |
|
| 373 |
|
| 374 |
Bugs of product revealed must be fixed in real time! Very, very much important! |
| 375 |
Basing on the proper functionality provided by the target product you achieve |
| 376 |
more and more deep testing. Once again, it is very much important. Otherwise, |
| 377 |
the testing turns sour. |
| 378 |
|
| 379 |
|
| 380 |
|
| 381 |
COMPUTATIONAL DATA IMMEDIATE IMAGES |
| 382 |
=================================== |
| 383 |
|
| 384 |
The table below contains the recommended variety of immediate images |
| 385 |
for computational types: Integer, String, Buffer, Buffer Field, Field Unit, |
| 386 |
Package. The table pretends to enumerate all the variety of them. |
| 387 |
|
| 388 |
(the Implicit Source Operand Conversion Rules are marked in the table #x |
| 389 |
with (*). They are ... in this table. For example 8,32:b4,b25,b28 means ...) |
| 390 |
|
| 391 |
|
| 392 |
Table 1. Computational data, immediate images |
| 393 |
|
| 394 |
Features of source Operands Features of target Operands |
| 395 |
|
| 396 |
| Integer | String | Buffer | |
| 397 |
================================================================================== |
| 398 |
| i1| 0321 | | 25 | 17 | |
| 399 |
| i2| 9876543210 | | | | |
| 400 |
I | i3| 0xc179b3fe | | 25,32:i3 | 17,32:i3 | |
| 401 |
n | i4| 0xfe7cb391d650a284 | | 25,64:i4 | 17,64:i4 | |
| 402 |
t | i5| 0 | | | | |
| 403 |
e | i6| 0xffffffff | | | | |
| 404 |
g | i7| 0xffffffffffffffff | | | | |
| 405 |
e | i8| 0xabcdef | | | | |
| 406 |
r | i9| 0xABCDEF | | | | |
| 407 |
| i10| 0xff | | | | |
| 408 |
| i11| 0xffffffffff | | | | |
| 409 |
---------------------------------------------------------------------------------- |
| 410 |
| s1| "0321" | 36 | | 28 | |
| 411 |
| s2| "321" | | | | |
| 412 |
| s3| "ba9876" | 36,32:s1,s4 | | 28,32:s1,s14, | |
| 413 |
| s4| "c179b3fe" | 36,64:s1,s5 | | s12 | |
| 414 |
| s5| "fe7cb391d650a284" | | | 28,64:s1,s14, | |
| 415 |
| s6| "ffffffff" | 32:s8(exc) | | s12 | |
| 416 |
S | s7| "ffffffffffffffff" | 64:s8(exc) | | | |
| 417 |
t | s8| "fe7cb391d650a2841" | 32:s11(exc) | | | |
| 418 |
r | s9| "9876543210" | 64:s11(exc) | | | |
| 419 |
i | s10| "0xfe7cb3" | 32:s12(exc) | | | |
| 420 |
n | s11| "1234q" | 64:s12(exc) | | | |
| 421 |
g | s12| "" | 32:s13(exc) | | | |
| 422 |
| s13| " " | 64:s13(exc) | | | |
| 423 |
| s14| of size 200 bytes | 32:s10(exc) | | | |
| 424 |
| - | >200, imps, bugs fix | 64:s10(exc) | | | |
| 425 |
| s15| <all symbols> | | | | |
| 426 |
| s16| "abcdef" | | | | |
| 427 |
| s17| "ABCDEF" | | | | |
| 428 |
| s18| "ff" | | | | |
| 429 |
| s19| "ffffffffff" | | | | |
| 430 |
---------------------------------------------------------------------------------- |
| 431 |
| b1| B(1){b0} | 6,7 | 8,9 | | |
| 432 |
| b2| B(2){b0,b1} | | | | |
| 433 |
| b3| B() {b0,b1,b2} | 6,32:b6 | 8,32:b6,b20 | | |
| 434 |
| b4| B(2){b0,b1,b2} | 6,64:b6 | 8,64:b6,b20 | | |
| 435 |
| b5| B(3){b0,b1} | | | | |
| 436 |
| b6| B(3){b0,b1,b2} | 7,32:b10 | 9,32:b21(exc) | | |
| 437 |
| b7| B(4){b0,...,b3} | 7,64:b10 | 9,64:b21(exc) | | |
| 438 |
| b8| B(5){b0,...,b4} | | | | |
| 439 |
| b9| B(8){b0,...,b7} | | 32:b22(exc) | | |
| 440 |
| b10| B(9){b0,b1,...,b8} | | 64:b22(exc) | | |
| 441 |
| b11| B(257){b0} | | | | |
| 442 |
| b12| B(257){b0,...,b256} | | | | |
| 443 |
| b13| B(){b0,...,b256} | | | | |
| 444 |
| b14| B(ArgX){=} | | | | |
| 445 |
B | b15| B(ArgX){<} | | | | |
| 446 |
u | b16| B(ArgX){>} | | | | |
| 447 |
f | b17| B(LocalX){=} | | | | |
| 448 |
f | b18| B(LocalX){<} | | | | |
| 449 |
e | b19| B(LocalX){>} | | | | |
| 450 |
r | b20| B(67){b0,...,b66} | | | | |
| 451 |
| b21| B(68){b0,...,b67} | | | | |
| 452 |
| b22| B(ArgX/LocalX==0){} | | | | |
| 453 |
| b23| B(1){} | | | | |
| 454 |
| b24| B(5){} | | | | |
| 455 |
| b25| B(9){} | | | | |
| 456 |
| b26| B(4){0,...,0} | | | | |
| 457 |
| b27| B(8){0,...,0} | | | | |
| 458 |
| b28| B(1){0xff} | | | | |
| 459 |
| b29| B(4){0xff,...,0xff} | | | | |
| 460 |
| b30| B(5){0xff,...,0xff} | | | | |
| 461 |
| b31| B(8){0xff,...,0xff} | | | | |
| 462 |
| b32| B(9){0xff,...,0xff} | | | | |
| 463 |
| b33| B(5){0x12,...,0x90} | | | | |
| 464 |
| b34| B(3){0xab,0xcd,0xef} | | | | |
| 465 |
| b35| B(3){0xAB,0xCD,0xEF} | | | | |
| 466 |
| b36| B(200){b0,...,b199} | | | | |
| 467 |
| b37| B(201){b0,...,b200} | | | | |
| 468 |
---------------------------------------------------------------------------------- |
| 469 |
B | bf1| CF(:31) | 10 | | 11 | |
| 470 |
u | bf2| CF(:32) | | | | |
| 471 |
f | bf3| CF(:33) | 10,32:bf1,bf2 | | 11,32:bf3 | |
| 472 |
f | bf4| CF(:63) | 10,64:bf4,bf5 | | 11,32:bf6 | |
| 473 |
e | bf5| CF(:64) | | | | |
| 474 |
r | bf6| CF(:65) | | 32:bf10(exc) | | |
| 475 |
| bf7| CF(:0) | | 64:bf10(exc) | | |
| 476 |
F | bf9| CF(:67*8) | | | | |
| 477 |
i |bf10| CF(:68*8) | | | | |
| 478 |
e |bf11| CF(:257*8) | | | | |
| 479 |
l |bf12| BfField,3bytes+{0-16}| | | | |
| 480 |
d |bf13| BfField,7bytes+{0-16}| | | | |
| 481 |
---------------------------------------------------------------------------------- |
| 482 |
| fu1| F(:31) | 14 | | 15 | |
| 483 |
F | fu2| F(:32) | | | | |
| 484 |
i | fu3| F(:33) | 14,32:fu1,fu2 | | 15,32:fu3 | |
| 485 |
e | fu4| F(:63) | 14,64:fu4,fu5 | | 15,32:fu6 | |
| 486 |
l | fu5| F(:64) | | | | |
| 487 |
d | fu6| F(:65) | | 32:fu10(exc) | | |
| 488 |
| fu7| F(:0) | | 64:fu10(exc) | | |
| 489 |
U | fu9| F(:67*8) | | | | |
| 490 |
n |fu10| F(:68*8) | | | | |
| 491 |
i |fu11| F(:257*8) | | | | |
| 492 |
t |fu12| Field,3bytes+{0-16} | | | | |
| 493 |
|fu13| Field,7bytes+{0-16} | | | | |
| 494 |
---------------------------------------------------------------------------------- |
| 495 |
Package |
| 496 |
================================================================================== |
| 497 |
|
| 498 |
Note: the Implicit Rules were a few changed since that! |
| 499 |
|
| 500 |
|
| 501 |
START WITH THESE OPERATORS (and maybe don't go beyond that) |
| 502 |
========================== |
| 503 |
|
| 504 |
|
| 505 |
This is a list of operators which are recommended |
| 506 |
to be implemented in the first turn. |
| 507 |
|
| 508 |
List of operators which should be verified completely (all the |
| 509 |
aspects of delivering operands to them should be verified). |
| 510 |
|
| 511 |
One-parameter operators: |
| 512 |
|
| 513 |
- Increment |
| 514 |
- Decrement |
| 515 |
- FindSetLeftBit |
| 516 |
- one of these: ToBuffer, ToDecimalString, |
| 517 |
ToHexString, ToInteger, |
| 518 |
ToBCD, FromBCD |
| 519 |
- Not |
| 520 |
- SizeOf |
| 521 |
- Store |
| 522 |
- CopyObject |
| 523 |
|
| 524 |
All other one-parameter operators may be verified partially. |
| 525 |
|
| 526 |
Two-parameters operators: |
| 527 |
|
| 528 |
- Add |
| 529 |
- Divide |
| 530 |
- Multiply |
| 531 |
- LGreater |
| 532 |
- ToString |
| 533 |
- Concatenate |
| 534 |
- ShiftLeft |
| 535 |
- Lor |
| 536 |
- NAnd |
| 537 |
- XOr |
| 538 |
|
| 539 |
All other two-parameters operators may be verified partially. |
| 540 |
|
| 541 |
Three-parameters operators: |
| 542 |
|
| 543 |
- Mid |
| 544 |
|
| 545 |
Six-parameters operators: |
| 546 |
|
| 547 |
- Match |
| 548 |
|
| 549 |
The tests of operands for the following operators |
| 550 |
may be implemented separately in their per-operator tests: |
| 551 |
|
| 552 |
- If,Elseif |
| 553 |
- While |
| 554 |
|
| 555 |
The positive (not exceptions) tests of operands for the |
| 556 |
following operators have been done in per-operator tests: |
| 557 |
|
| 558 |
- Switch, Case |
| 559 |
|
| 560 |
|
| 561 |
OPERATORS INFO |
| 562 |
============== |
| 563 |
|
| 564 |
The table below contains the list of operators assigned |
| 565 |
with digital indexes in the alphabetical order: |
| 566 |
- one-parameter (25 Operators) |
| 567 |
- two-parameters (26 Operators) |
| 568 |
- three-parameters (2 Operators) |
| 569 |
- six-parameters (1 Operator) |
| 570 |
|
| 571 |
|
| 572 |
Table 2. Operators |
| 573 |
|
| 574 |
// ////////////////////////////////////////////////////////////////////////// |
| 575 |
// |
| 576 |
// 1 parameter (25 Operators) |
| 577 |
// |
| 578 |
// 5 - CondRefOf (any, Result) => Boolean |
| 579 |
// 6 - CopyObject (any, Destination) => DataRefObject |
| 580 |
// * 7 - Decrement (int) => Integer |
| 581 |
// 8 - DerefOf ({ref|str}) => Object |
| 582 |
// * 11 - FindSetLeftBit (int, Result) => Integer |
| 583 |
// * 12 - FindSetRightBit (int, Result) => Integer |
| 584 |
// * 13 - FromBCD (int, Result) => Integer |
| 585 |
// * 14 - Increment (int) => Integer |
| 586 |
// * 22 - LNot (int) => Boolean |
| 587 |
// * 31 - Not (int, Result) => Integer |
| 588 |
// 32 - ObjectType (any) => Integer |
| 589 |
// 34 - RefOf (any) => ObjectReference |
| 590 |
// 35 - Release (mux) |
| 591 |
// 36 - Reset (evt) |
| 592 |
// 37 - Return ({any|ref}) |
| 593 |
// 40 - Signal (evt) |
| 594 |
// * 41 - SizeOf ({int|str|buf|pkg}) => Integer |
| 595 |
// * 42 - Sleep (int) |
| 596 |
// * 43 - Stall (int) |
| 597 |
// 44 - Store (any, Destination) => DataRefObject |
| 598 |
// * 46 - ToBCD (int, Result) => Integer |
| 599 |
// * 47 - ToBuffer ({int|str|buf}, Result) => Buffer |
| 600 |
// * 48 - ToDecimalString ({int|str|buf}, Result) => String |
| 601 |
// * 49 - ToHexString ({int|str|buf}, Result) => String |
| 602 |
// * 50 - ToInteger ({int|str|buf}, Result) => Integer |
| 603 |
// |
| 604 |
// 2 parameters (26 Operators) |
| 605 |
// |
| 606 |
// 0 - Acquire (mux, wrd) => Boolean |
| 607 |
// * 1 - Add (int, int, Result) => Integer |
| 608 |
// * 2 - And (int, int, Result) => Integer |
| 609 |
// * 3 - Concatenate ({int|str|buf}, {int|str|buf}, Result) => ComputationalData |
| 610 |
// * 4 - ConcatResTempl (rtb, rtb, Result) => Buffer |
| 611 |
// * 9 - Divide (int, int, Remainder, Result) => Integer |
| 612 |
// 15 - Index ({str|buf|pkg}, int, Destination) => ObjectReference |
| 613 |
// * 16 - LAnd (int, int) => Boolean |
| 614 |
// * 17 - LEqual ({int|str|buf}, {int|str|buf}) => Boolean |
| 615 |
// * 18 - LGreater ({int|str|buf}, {int|str|buf}) => Boolean |
| 616 |
// * 19 - LGreaterEqual ({int|str|buf}, {int|str|buf}) => Boolean |
| 617 |
// * 20 - LLess ({int|str|buf}, {int|str|buf}) => Boolean |
| 618 |
// * 21 - LLessEqual ({int|str|buf}, {int|str|buf}) => Boolean |
| 619 |
// * 23 - LNotEqual ({int|str|buf}, {int|str|buf}) => Boolean |
| 620 |
// * 24 - LOr (int, int) => Boolean |
| 621 |
// * 27 - Mod (int, int, Result) => Integer |
| 622 |
// * 28 - Multiply (int, int, Result) => Integer |
| 623 |
// * 29 - NAnd (int, int, Result) => Integer |
| 624 |
// * 30 - NOr (int, int, Result) => Integer |
| 625 |
// * 33 - Or (int, int, Result) => Integer |
| 626 |
// * 38 - ShiftLeft (int, int, Result) => Integer |
| 627 |
// * 39 - ShiftRight (int, int, Result) => Integer |
| 628 |
// * 45 - Subtract (int, int, Result) => Integer |
| 629 |
// * 51 - ToString (buf, int, Result) => String |
| 630 |
// * 52 - Wait (evt, int) => Boolean |
| 631 |
// * 53 - XOr (int, int, Result) => Integer |
| 632 |
// |
| 633 |
// 3 parameters (2 Operators) |
| 634 |
// |
| 635 |
// 10 - Fatal (byt, dwd, int) |
| 636 |
// * 26 - Mid ({str|buf}, int, int, Result) => Buffer or String |
| 637 |
// |
| 638 |
// 6 parameters (1 Operator) |
| 639 |
// |
| 640 |
// * 25 - Match (pkg, byt, int, byt, int, int) => Ones | Integer |
| 641 |
// |
| 642 |
// 1 parameter (5 Operators) |
| 643 |
// |
| 644 |
// * 54 - If (int) |
| 645 |
// * 55 - Elseif (int) |
| 646 |
// 56 - Switch ({int|str|buf}) |
| 647 |
// 57 - Case ({int|str|buf|pkg}) |
| 648 |
// * 58 - While (int) |
| 649 |
// |
| 650 |
// (*) - conversion is expected. Operators which are expected |
| 651 |
// to have conversion of their operands. |
| 652 |
// |
| 653 |
// ////////////////////////////////////////////////////////////////////////// |
| 654 |
|
| 655 |
|
| 656 |
STRUCTURE OF TEST |
| 657 |
================= |
| 658 |
|
| 659 |
1. Sub-test for aspect 1, verifications for all operators. |
| 660 |
2. Sub-test for aspect 2, verifications for all operators. |
| 661 |
N. Sub-test for aspect N, verifications for all operators. |
| 662 |
|
| 663 |
The valid operand checkings and invalid operand checkings |
| 664 |
should be structurized as different runs - no exceptions |
| 665 |
should be exercised during the valid operand checkings |
| 666 |
execution. |
| 667 |
|
| 668 |
|
| 669 |
TABLE OF AVAILABLE MIX OF ASPECTS |
| 670 |
================================= |
| 671 |
|
| 672 |
1 2 3 4 5 6 7 8 |
| 673 |
im loc ref exp mth conv oper misc |
| 674 |
---------------------------------------------------------------------------- |
| 675 |
A | Images | | | | | | | | | |
| 676 |
B | Locations | | | | | | | | | |
| 677 |
C | References | | | | | | | | | |
| 678 |
D | Expressions | | | | | | | | | |
| 679 |
E | Methods | | | | | | | | | |
| 680 |
F | Conversion | | | | | | | | | |
| 681 |
G | Operators | | | | | | | | | |
| 682 |
H | Miscellaneous | | | | | | | | | |
| 683 |
---------------------------------------------------------------------------- |
| 684 |
|
| 685 |
Example: A1 means ... |
| 686 |
Note: you see, it is not ready. |
| 687 |
|
| 688 |
|
| 689 |
PARTICULAR INFORMATION |
| 690 |
====================== |
| 691 |
|
| 692 |
Buffer Field operators should be passed directly only because ASL |
| 693 |
doesn't allow to pass Buffer Field type objects without conversion |
| 694 |
(they are converted to either Integer or Buffer types). |
| 695 |
|
| 696 |
Allocate Buffer Fields for both operands from the same buffer |
| 697 |
(Buffer(20){}). Fill the entire Buffer with the zeros (units), |
| 698 |
then fill the fields with the units (zeros) and check the contents |
| 699 |
of the whole Buffer after Operator completion. |
| 700 |
|
| 701 |
Results should be written into LocalX, not to involve the |
| 702 |
"Implicit Result Object Conversion". |
| 703 |
|
| 704 |
Perhaps, groups of operators can have the same checkings which can |
| 705 |
be handled by the same methods (with different benchmark values) so |
| 706 |
simplifying the designing of tests. But the rest of checkings should |
| 707 |
be provided by the actions individual for the particular operators. |
| 708 |
|
| 709 |
|
| 710 |
BRIEF RECOMMENDATIONS (summary from above) |
| 711 |
===================== |
| 712 |
|
| 713 |
There should be the most important or usually forgotten things |
| 714 |
|
| 715 |
1. use all type immediate Images |
| 716 |
2. use all type Locations |
| 717 |
3. use all type References |
| 718 |
4. use all type Expressions |
| 719 |
5. use Methods in expressions and expressions as parameters to Methods |
| 720 |
6. initiate all kind of Implicit Source Operand Conversion |
| 721 |
7. exercise all Operators |
| 722 |
8. apply recommendations given in Miscellaneous section |
| 723 |
9. use full and reduced forms of operators (mean optional Results) |
| 724 |
10. use zero length Buffers |
| 725 |
11. use uninitialized elements of Packages |
| 726 |
12. use non-computational elements of Packages to (initiate/NOT initiate) |
| 727 |
exceptions during conversion (Match..) |
| 728 |
13. use Packages: uninitialized,...,uninitialized,<valid_value> |
| 729 |
14. use all operators - ObjectType, SizeOf and LEqual to verify results |
| 730 |
15. verify all the obtained results |
| 731 |
16. check that the source objects were not corrupted by execution |
| 732 |
(use all - ObjectType, SizeOf and LEqual) |
| 733 |
17. remember about the NULL symbols of strings |
| 734 |
18. mix different (all) aspects; the more you mix aspects |
| 735 |
the more comprehensive test you have |
| 736 |
19. add directives into Miscellaneous section and here while |
| 737 |
increasing your skill of building the test |
| 738 |
20. use the same object (and several such objects) |
| 739 |
(ArgX,LocalX,Name(X)) in different operands and |
| 740 |
Destination of the same operator |
| 741 |
21. use the same object (and several such objects) |
| 742 |
(ArgX,LocalX,Name(X)) in different operands of |
| 743 |
different operators of the same expression |
| 744 |
22. do the input control (ObjectType, SizeOf, LEqual) |
| 745 |
of passed values (where needed) |
| 746 |
23. check operators for unacceptable types of operands (exception occur) |
| 747 |
24. for the acceptable types of operands check particular unacceptable |
| 748 |
values (exception occur) |
| 749 |
25. check that the result is of the same type as the benchmark |
| 750 |
(use ObjectType, don't be satisfied with LEqual only) |
| 751 |
26. the second operands of Logical operators are converted |
| 752 |
to the type of the first ones; do the checkings which |
| 753 |
show and confirm that |
| 754 |
27. conversion of the second operands of Concatenate operator |
| 755 |
is performed according to the table; do the checkings which |
| 756 |
show and confirm that |
| 757 |
28. use immediate invocations of operators in place of operands |
| 758 |
of other operators |
| 759 |
29. each operand of several-operands oprerators should be verified |
| 760 |
30. before running the operation initialize the destination area |
| 761 |
with the contr-data (zero expected, take unit; unit expected, |
| 762 |
take zero); so you see that result does actual change |
| 763 |
31. ... |
| 764 |
<END>---------------------------------------------------------<END> |
| 765 |
|
| 766 |
|
| 767 |
/* |
| 768 |
Do the table (or section): |
| 769 |
========================== |
| 770 |
Constants |
| 771 |
Global named objects |
| 772 |
Dynamical named objects |
| 773 |
LocalX |
| 774 |
ArgX |
| 775 |
Element of Buffer |
| 776 |
Element of String |
| 777 |
Element of Package |
| 778 |
(DerefOf(Index())) |
| 779 |
Return of Method |
| 780 |
Object by reference |
| 781 |
... |
| 782 |
*/ |
| 783 |
|
| 784 |
/* |
| 785 |
SEE: update all concerning the Table 17-8 Object Conversion Rules |
| 786 |
(because specs where changed!): |
| 787 |
Table 1 |
| 788 |
file: conversion_table |
| 789 |
tests:... |
| 790 |
*/ |
| 791 |
|
| 792 |
/* |
| 793 |
See: LocalX/ArgX |
| 794 |
|
| 795 |
- different size of source operator |
| 796 |
Integer, 0xff, 0xffff, 0xffffff, ... |
| 797 |
- bit of sign of value |
| 798 |
- all the available symbols (in all positions of 0-9,a-f,A-F) |
| 799 |
- 32/64 |
| 800 |
- all unavailable symbols (all except 0-9,a-f,A-F) |
| 801 |
- combinations of all available/unavailable symbols |
| 802 |
- B(ArgX){...} |
| 803 |
- B(LocalX){...} |
| 804 |
- particular test: Store Buffer/Integer into String |
| 805 |
which (String) is far longer then Buffer/Integer. |
| 806 |
The String immage will be reduces. Then attempt to |
| 807 |
work with the rest of String outside of the new its |
| 808 |
contents (behind the null symbol of String). |
| 809 |
- reference as an element of Package |
| 810 |
- verify 64-bit values in 32-bit mode |
| 811 |
*/ |
| 812 |
|
| 813 |
/* |
| 814 |
SEE: pseudo accidental test |
| 815 |
*/ |
| 816 |
|
| 817 |
/* |
| 818 |
???????? what in practice are this mix of aspects ??????????? |
| 819 |
??????? see is that possible to use expressions in result ?????? |
| 820 |
????? uninitialized data of Package - use them ????? |
| 821 |
*/ |