1Some information can be obsolete. 2 3It was useful when we started designing the tests to 4attempt to gather ideas about the subject of testing 5and approach of testing. 6================================ 7 8 9 10 11 Source Operand Complex test specification 12 (guideline of designing the test) 13 14Collection of remarks not intended to constitute the facile 15joined statement. These considerations should be taken into 16account while designing the Source Operand Complex test. 17Some of them are applicable in general while designing the 18ASL tests. 19 20All the ASL declarartions allowed by the ASL compiler have to 21work in compliance with the ACPI specification, in a predictable 22and convenient for users manner (so, ACPI could be changed as well). 23 24Outlined are the subject of testing, the main aspects of it, 25the main points to be concentrated on while designing the test 26and the practical steps which should be performed to achieve the 27worthy coverage of the test. Also the objective difficulties 28which are on that way are explained. 29 30This text is for ourselves in the first order. 31Allow, some statements to be abstract, non-strict and questionable. 32Bilieve, the abstraction will be useful. 33 34Writing the Operand Complex test is quite complicated 35(it is not a functional test were you simply verify each 36feature separately), so after implementing some its part you 37see some ASL functionality is involved by test repeatedly though 38you thought about different things. This text is in particular 39intended to enumerate all the aspects to be verified, and don't 40further hesitate if all them are applied. 41 42The intention of the test is to verify all the grammar rules 43of specifying and delivering operands to operators. 44 45This is a wide range of issues which are simpler to understand and 46embrace given together as a separate particular topic, as a separate 47approach. Each the particular relevant aspect should be given separately, 48the approach of how to test it should be designed and then applied to all 49the ASL operators. Then the next aspect should be taken separately and 50also verified for all the operators. This would allow to concentrate 51deeply on each aspect and to observe the coverage provided by the test 52which would be impossible to do in the contrary case when the 53per-operator tests each contains all the aspects checkings. 54 55All the relevant aspects should be verified for each particular operator 56(or at least for one member of each group of operators divided according 57to the considered aspects of delivering operands to operators if only you 58can found such division to groups). While building the tests we have 59observed many confirmations of the idea that aspects of delivering 60operands to operators can work differently for different operators, 61while being proper for some of them it fails for other. 62 63Minimum functionality of operators should be involved there to prove 64only the fact that operands are delivered to operators correctly. 65To check functionality of operators is up to other tests. 66 67The test should also check that the source values which were 68referred to as parameters were not corrupted by the execution 69of the particular operator, which are the situations being in 70practice revealed by our other tests many times. 71 72The test verifies processing of both the valid operands and 73invalid operands. Building the invalid operand checkings is a simple 74task - pass operator with the inappropriate type operand and check that 75the exception occurs. So, below are mostly about the valid operand checkings. 76 77The valid operand checkings verify all the legal ways of specifying and 78delivering operands to ASL operators. The following section describes the 79essential aspects of that process. 80 81Note: some particularities are obsolete due to the change of ACPI 82 specification since that. 83 84 85 ESSENTIAL ASPECTS OF OPERAND DELIVERING 86 ======================================= 87 88IMAGES 89 90 All the vatiety of ways specifying the immediate images of ASL objects 91of all types should be represented. All the types are given in the table 9217-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 117LOCATIONS 118 119 The location of the object in the name space relating 120to 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 136REFERENCES 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 192EXPRESSIONS 193 194 The way how the object is specified 195for 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 215METHODS 216 217- use Methods as elements of expressions 218- use all kind expressions as parameters to Methods 219 220 221CONVERSION 222 223 The Implicit Source Operand Conversion functionality 224(17.2.5.7 Data Type Conversion Rules) should be verified also. 225 226The table # 1 below proposes the particular values for to initiate 227all the variety of Implicit Source Operand Conversion rules. 228 229 230OPERATORS 231 232 As it was mentioned above, the particular target operator 233can impact delivering operands to it. Thus, we can't build the test 234for only one particular operator but should be bent on building the 235checkings for many (to all is the best) of them or for one member of 236each group (if manage found division). An aspect can work correctly 237while delivering operand to one operator but fail while delivering 238to other. 239 240Pay attention to both: 241 242 - the complete and the reduced forms of operators 243 - the target operators and operators used in expressions 244 245 246MISCELLANEOUS 247 248 Additional miscellaneous features, particular situations 249which should be verified. They are descended from the aspects 250above (as the particular elements of an absolute test (see below)). 251These notes allow to keep additional attention to them. They look 252to be a complicated modes for ACPICA. 253 254Note: add this aspect with more new complicated checkings. 255 256 1. Use the same object more than one time in expressions of 257operands 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 271statically by ArgX of sequence of calling methods (operand1) and 272specify the same object as another operand immediately by its NameX 273(operand2) and use them both in turn (operand1/operand2) as locations 274for 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 283and 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 295have. 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 297comprehensive test we have to build and verify all the possible 298combinations of these input states. 299 300In this case we will miss nothing and the total coverage of testing 301the operand delivering will be achieved. 302 303To build the test as a simple enumeration and verification 304of all possible combinations of given above parameters would be 305the simplest way. Though it would be usually much redundant we 306would be happy and assured that the total coverage would be 307actually 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 316such simplest and the total coverage assured approach (absolute 317test) impossible, because they prevent automated processing. 318About all that below. In consequence of all that, it is remained 319only to rely on the human factor, intuition and skill to achieve 320the worthy coverage of the test. 321 322 Elements of ASL Package could be only Integer, String, Buffer 323and Package type objects. Other type objects could not be represented 324immediately in Package. So, it is impossible to collect all the 325desirable different type objects in Package and then refer them 326in cycle. 327 328 We can't pass Method with the Uninitialized object, so these 329conditions should be also provided by the test as the immediate 330references to the Uninitialized objects which prevents automated 331processing as well. 332 333 One more inconvenience for testing arises from the type conversion 334functionality. Due to that some type objects could not be represented 335not 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 337or Buffer types in the latter case. As a result, these conditions should 338be 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 343particularities of Implicit Source Operand Conversion functionality 344which 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 348limitations don't allow to achieve uniformity of the test building. 349It is impossible to build the test which simply enumerates all 350combinations and so achieve the total coverage. One more, such the 351test will go during the huge boundless time. 352 353 Thus, it is up to the skill of the designer of the test to choose 354the main points to be verified in order to build the test which would 355achieve the worthy coverage for the acceptable time of execution. 356 357 So, maybe, attempt to divide operators on groups according to 358the specific of their operands and one operator of each group verify 359comprehensively, while other members of groups verify in a simplified 360manner. 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 363the comprehencive test, which would be proven to approximate to the absolute 364test on coverage. But this specification and the tests adhered to it would 365allow us to feel ourselves to be on the firm way to achieve the worthy coverage 366and consider that we have done all needed from our side to achieve the 367comprehencive tests. 368 369 So, due to the limitations of ASL above, we refuse attempts to write the 370common engine which would simplify our work and ensure the high coverage of 371test. Nevertheless, write and apply where possible the common use methods. 372 373 374Bugs of product revealed must be fixed in real time! Very, very much important! 375Basing on the proper functionality provided by the target product you achieve 376more and more deep testing. Once again, it is very much important. Otherwise, 377the testing turns sour. 378 379 380 381 COMPUTATIONAL DATA IMMEDIATE IMAGES 382 =================================== 383 384 The table below contains the recommended variety of immediate images 385for computational types: Integer, String, Buffer, Buffer Field, Field Unit, 386Package. The table pretends to enumerate all the variety of them. 387 388(the Implicit Source Operand Conversion Rules are marked in the table #x 389with (*). They are ... in this table. For example 8,32:b4,b25,b28 means ...) 390 391 392Table 1. Computational data, immediate images 393 394Features of source Operands Features of target Operands 395 396 | Integer | String | Buffer | 397================================================================================== 398 | i1| 0321 | | 25 | 17 | 399 | i2| 9876543210 | | | | 400I | i3| 0xc179b3fe | | 25,32:i3 | 17,32:i3 | 401n | i4| 0xfe7cb391d650a284 | | 25,64:i4 | 17,64:i4 | 402t | i5| 0 | | | | 403e | i6| 0xffffffff | | | | 404g | i7| 0xffffffffffffffff | | | | 405e | i8| 0xabcdef | | | | 406r | 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 | 416S | s7| "ffffffffffffffff" | 64:s8(exc) | | | 417t | s8| "fe7cb391d650a2841" | 32:s11(exc) | | | 418r | s9| "9876543210" | 64:s11(exc) | | | 419i | s10| "0xfe7cb3" | 32:s12(exc) | | | 420n | s11| "1234q" | 64:s12(exc) | | | 421g | 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){=} | | | | 445B | b15| B(ArgX){<} | | | | 446u | b16| B(ArgX){>} | | | | 447f | b17| B(LocalX){=} | | | | 448f | b18| B(LocalX){<} | | | | 449e | b19| B(LocalX){>} | | | | 450r | 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---------------------------------------------------------------------------------- 469B | bf1| CF(:31) | 10 | | 11 | 470u | bf2| CF(:32) | | | | 471f | bf3| CF(:33) | 10,32:bf1,bf2 | | 11,32:bf3 | 472f | bf4| CF(:63) | 10,64:bf4,bf5 | | 11,32:bf6 | 473e | bf5| CF(:64) | | | | 474r | bf6| CF(:65) | | 32:bf10(exc) | | 475 | bf7| CF(:0) | | 64:bf10(exc) | | 476F | bf9| CF(:67*8) | | | | 477i |bf10| CF(:68*8) | | | | 478e |bf11| CF(:257*8) | | | | 479l |bf12| BfField,3bytes+{0-16}| | | | 480d |bf13| BfField,7bytes+{0-16}| | | | 481---------------------------------------------------------------------------------- 482 | fu1| F(:31) | 14 | | 15 | 483F | fu2| F(:32) | | | | 484i | fu3| F(:33) | 14,32:fu1,fu2 | | 15,32:fu3 | 485e | fu4| F(:63) | 14,64:fu4,fu5 | | 15,32:fu6 | 486l | fu5| F(:64) | | | | 487d | fu6| F(:65) | | 32:fu10(exc) | | 488 | fu7| F(:0) | | 64:fu10(exc) | | 489U | fu9| F(:67*8) | | | | 490n |fu10| F(:68*8) | | | | 491i |fu11| F(:257*8) | | | | 492t |fu12| Field,3bytes+{0-16} | | | | 493 |fu13| Field,7bytes+{0-16} | | | | 494---------------------------------------------------------------------------------- 495Package 496================================================================================== 497 498Note: 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 505This is a list of operators which are recommended 506to be implemented in the first turn. 507 508List of operators which should be verified completely (all the 509aspects of delivering operands to them should be verified). 510 511One-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 526Two-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 541Three-parameters operators: 542 543 - Mid 544 545Six-parameters operators: 546 547 - Match 548 549The tests of operands for the following operators 550may be implemented separately in their per-operator tests: 551 552 - If,Elseif 553 - While 554 555The positive (not exceptions) tests of operands for the 556following 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 565with 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 572Table 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 6591. Sub-test for aspect 1, verifications for all operators. 6602. Sub-test for aspect 2, verifications for all operators. 661N. Sub-test for aspect N, verifications for all operators. 662 663The valid operand checkings and invalid operand checkings 664should be structurized as different runs - no exceptions 665should be exercised during the valid operand checkings 666execution. 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 692Buffer Field operators should be passed directly only because ASL 693doesn't allow to pass Buffer Field type objects without conversion 694(they are converted to either Integer or Buffer types). 695 696Allocate Buffer Fields for both operands from the same buffer 697(Buffer(20){}). Fill the entire Buffer with the zeros (units), 698then fill the fields with the units (zeros) and check the contents 699of the whole Buffer after Operator completion. 700 701Results should be written into LocalX, not to involve the 702"Implicit Result Object Conversion". 703 704Perhaps, groups of operators can have the same checkings which can 705be handled by the same methods (with different benchmark values) so 706simplifying the designing of tests. But the rest of checkings should 707be 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) 72410. use zero length Buffers 72511. use uninitialized elements of Packages 72612. use non-computational elements of Packages to (initiate/NOT initiate) 727 exceptions during conversion (Match..) 72813. use Packages: uninitialized,...,uninitialized,<valid_value> 72914. use all operators - ObjectType, SizeOf and LEqual to verify results 73015. verify all the obtained results 73116. check that the source objects were not corrupted by execution 732 (use all - ObjectType, SizeOf and LEqual) 73317. remember about the NULL symbols of strings 73418. mix different (all) aspects; the more you mix aspects 735 the more comprehensive test you have 73619. add directives into Miscellaneous section and here while 737 increasing your skill of building the test 73820. use the same object (and several such objects) 739 (ArgX,LocalX,Name(X)) in different operands and 740 Destination of the same operator 74121. use the same object (and several such objects) 742 (ArgX,LocalX,Name(X)) in different operands of 743 different operators of the same expression 74422. do the input control (ObjectType, SizeOf, LEqual) 745 of passed values (where needed) 74623. check operators for unacceptable types of operands (exception occur) 74724. for the acceptable types of operands check particular unacceptable 748 values (exception occur) 74925. check that the result is of the same type as the benchmark 750 (use ObjectType, don't be satisfied with LEqual only) 75126. 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 75427. conversion of the second operands of Concatenate operator 755 is performed according to the table; do the checkings which 756 show and confirm that 75728. use immediate invocations of operators in place of operands 758 of other operators 75929. each operand of several-operands oprerators should be verified 76030. 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 76331. ... 764<END>---------------------------------------------------------<END> 765 766 767/* 768Do the table (or section): 769========================== 770Constants 771Global named objects 772Dynamical named objects 773LocalX 774ArgX 775Element of Buffer 776Element of String 777Element of Package 778 (DerefOf(Index())) 779Return of Method 780Object by reference 781... 782*/ 783 784/* 785SEE: 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/* 793See: 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/* 814SEE: 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*/ 822