(file) Return to PEP121_-_TestEnhancements-1.3.html CVS log (file) (dir) Up to [Pegasus] / pegasus / test / TestProviders

  1 s.soni 1.1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2            <html>
  3            <head>
  4                                               
  5              <meta content="en-us" http-equiv="Content-Language">
  6                                               
  7              <meta content="Microsoft FrontPage 5.0" name="GENERATOR">
  8                                               
  9              <meta content="FrontPage.Editor.Document" name="ProgId">
 10                                               
 11              <meta content="text/html; charset=windows-1252"
 12             http-equiv="Content-Type">
 13              <title>PEP</title>
 14                                                                          
 15              <link href="PEP000_PEPTemplate_files/info1.css" rel="stylesheet">
 16            </head>
 17              <body>
 18                             
 19            <hr>         
 20            <p align="center"><small><font face="Helvetica, Arial, sans-serif"><b><font
 21             size="4"><small>Pegasus Enhancement Proposal (PEP)</small></font></b></font></small></p>
 22 s.soni 1.1                  
 23            <p><small><font face="Helvetica, Arial, sans-serif"><b>PEP #:</b> 121</font></small></p>
 24                     <small><font face="Helvetica, Arial, sans-serif"><b>Title: </b>Test
 25              Enhancements   for Pegasus </font></small>         
 26            <p><small><font face="Helvetica, Arial, sans-serif" color="#0000ff"></font></small></p>
 27                             
 28            <p><small><font face="Helvetica, Arial, sans-serif"><b>Version: </b>1.3 </font></small></p>
 29                             
 30            <p><small><font face="Helvetica, Arial, sans-serif"><b>Created:</b> 18 Dec. 
 31                2003</font><font face="Helvetica, Arial, sans-serif" color="#0000ff"></font></small></p>
 32                             
 33            <p><small><font face="Helvetica, Arial, sans-serif"><b>Authors: Subodh Soni</b></font></small></p>
 34                             
 35            <p><small><font face="Helvetica, Arial, sans-serif"><b>Status:  </b>Final<br>
 36                     </font></small></p>
 37                             
 38            <p><small><font face="Helvetica, Arial, sans-serif"><br>
 39                     </font></small></p>
 40                             
 41            <p><small><font face="Helvetica, Arial, sans-serif"><b>Version History:</b></font></small></p>
 42                             
 43 s.soni 1.1 <table border="1" cellspacing="1" bordercolordark="#666666"
 44             bordercolorlight="#CCCCCC" width="100%" style="font-family: Arial;">
 45                       <tbody>
 46                         <tr>
 47                           <th bgcolor="#cae6ca"><small>Version</small></th>
 48                           <th bgcolor="#cae6ca"><small>Date</small></th>
 49                           <th bgcolor="#cae6ca"><small>Author</small></th>
 50                           <th bgcolor="#cae6ca"><small>Change Description</small></th>
 51                         </tr>
 52                         <tr>
 53                           <td align="center"><small>1.0</small></td>
 54                           <td align="center"><small>18 Dec 2003</small></td>
 55                           <td align="center"><small>Subodh Soni</small></td>
 56                           <td><small>Initial Submission</small></td>
 57                         </tr>
 58                         <tr>
 59                           <td align="center"><small>1.1</small></td>
 60                           <td align="center"><small>13 Jan 2004</small></td>
 61                           <td align="center"><small>Subodh Soni</small></td>
 62                           <td><small>Minor editorial changes based on comments by David
 63              Dillard</small> </td>
 64 s.soni 1.1              </tr>
 65                   <tr>
 66                     <td valign="top" align="center"><small>1.2</small><br>
 67                     </td>
 68                     <td valign="top" align="center"><small>02 Feb 2004</small><br>
 69                     </td>
 70                     <td valign="top" align="center"><small>Subodh Soni</small><br>
 71                     </td>
 72                     <td valign="top" align="left"><small>Priorities of the proposed
 73            test  enhancements added.</small><br>
 74                     </td>
 75                   </tr>
 76                <tr>
 77                  <td valign="top" align="center"><small>1.3</small><br>
 78                  </td>
 79                  <td valign="top" align="center"><small>05 Feb 2004</small><br>
 80                  </td>
 81                  <td valign="top" align="center"><small>Subodh Soni</small><br>
 82                  </td>
 83                  <td valign="top"><small>Final Version uploaded to "Recent Documents"</small><br>
 84                  </td>
 85 s.soni 1.1     </tr>
 86                                               
 87              </tbody>         
 88            </table>
 89                     <br>
 90                     <br>
 91                             
 92            <hr>         
 93            <p><small><font face="Helvetica, Arial, sans-serif"><b>Abstract:</b> This 
 94                PEP aims to deliver test enhancements for Pegasus CIMOM. These enhancements 
 95                introduce some specific conditions in the CIMOM and check its behavior. 
 96              These  conditions or test scenarios are the ones that are not tested in 
 97            the  current  implementation of Pegasus and consists of some of the real-life 
 98             issues faced  by the developers and users (working with various configurations 
 99             and machine setups) of Pegasus . The different test cases are present in 
100            the form of either sample providers or shell scripts and are independent of
101            the existing test programs present in the Pegasus CVS tree.The complete package
102            containing these test cases can be easily integrated with the existing source
103            tree and no special knowledge is required to execute these tests.</font></small></p>
104                             
105            <hr>         
106 s.soni 1.1 <h2><small><font face="Helvetica, Arial, sans-serif" color="#000000">Definition 
107                of the Problem</font></small></h2>
108                             
109            <p><small><font face="Helvetica, Arial, sans-serif">There are many scenarios 
110                where the cimom behavior is not known as of the current pegasus stable 
111             source   tree. This PEP is an attempt to identify some of these scenarios 
112             and develop   test programs to check the behavior exhibited by pegasus when 
113             subjected to  these conditions.<br>
114                     </font></small></p>
115                             
116            <p><small><font face="Helvetica, Arial, sans-serif"> The problems are defined 
117                below: [These are various situations in which the cimserver behavior is
118              not  known/ or inconsistent]<br>
119                     </font></small></p>
120                             
121            <p><small><font face="Helvetica, Arial, sans-serif">1. Single provider responsible 
122                for loading multiple classes and running multiple clients simultaneously 
123               using the classes loaded by this provider.<br>
124                     </font><font face="Helvetica, Arial, sans-serif"
125             color="#ff6666"></font><font face="Helvetica, Arial, sans-serif"><br>
126                     2. Behavior of Pegasus is different depending on whether the exception 
127 s.soni 1.1    thrown is a CIMException, Pegasus::Exception, or "unknown" exception such 
128               as int.  exceptions on initialize, after processing(), etc.</font></small></p>
129                             
130            <p><small><font face="Helvetica, Arial, sans-serif">3. What happens if the 
131                provider method does a fork() and creates subprocess from within itself. 
132               What are the handles  (or file descriptors) it inherits from the parent. 
133              These conditions occur frequently when an actual provider interacts with 
134             the system through various system calls.<br>
135                     </font></small></p>
136                             
137            <p><small><font face="Helvetica, Arial, sans-serif">4. What is the behavior 
138                on linux when providers manipulate signals from within their methods. 
139            How    is threading and signal handling taken care by pegasus ?<br>
140                     </font></small></p>
141                             
142            <p><small><font face="Helvetica, Arial, sans-serif">5. Checking for timing-related 
143                issues in the Pegasus common code. Memory testing involving significant 
144              exercising  of multiple providers with strange timings, and clients timed 
145              to both stress  provider subsystems and pause long enough to exercise the 
146              provider unload  logic.<br>
147                     </font></small></p>
148 s.soni 1.1                  
149            <p><small><font face="Helvetica, Arial, sans-serif">6. The provider calling 
150                the CIMOMHandle sets a UserIdentity into the OperationContext. It is possible
151                for a provider to call the CIMOMHandle with a user name that is different
152                than the end-user on the client who sent in the original request. For
153            example,    a provider could set "root" into the UserIdentity, effectively
154            promoting   itself to root authority when calling the CIMOMHandle.<br>
155                     </font></small></p>
156                             
157            <p><small><font face="Helvetica, Arial, sans-serif">7. Testing the behavior 
158                of Pegasus when the classes it has implemented return a large amount of
159              data.   (</font><font face="Helvetica, Arial, sans-serif"
160             color="#000000">For example:   a sample provider in which the enumInstances 
161               returns 10000 instances of  the class implemented by the provider.<br>
162               </font></small></p>
163                 
164            <p><small><font face="Helvetica, Arial, sans-serif" color="#000000">8. </font></small><small><font
165             face="Helvetica, Arial, sans-serif">Checking the XML parser    and generator 
166             programs when malformed strings are passed through the providers</font></small><br>
167               </p>
168                 
169 s.soni 1.1 <h2><b><small><small><font face="Helvetica, Arial, sans-serif"
170             color="#000000">Priority</font></small></small></b></h2>
171                 
172            <p><small><font face="Helvetica, Arial, sans-serif">The priorities of the 
173             above mentioned test enhancements can be assigned based on the areas in the
174             pegasus code that require more testing. <br>
175               Based on the above serial nos. the order of the tests can be: <small>2</small>, 
176             <small>1, 5, 7,  3, 4, 8, 6</small></font><font
177             face="Helvetica, Arial, sans-serif"><small></small></font></small><br>
178               </p>
179                             
180            <h2><small><font face="Helvetica, Arial, sans-serif" color="#000000">Proposed 
181                Solution</font></small></h2>
182                     <small><font face="Helvetica, Arial, sans-serif">An attempt is made
183              to  address  the issues/problems/scenarios described in the problem definition 
184               above by  writing sample providers, test client programs and various shell 
185               scripts.  The sample providers follow the same structure in all the test 
186              programs. <br>
187                     Each sample provider is made atleast of the following files :<br>
188                     <br>
189                     </font></small>         
190 s.soni 1.1 <table border="1" width="100%" cellpadding="2" cellspacing="2">
191                       <tbody>
192                         <tr>
193                           <td><font face="Helvetica, Arial, sans-serif"><small>&lt;ProviderName&gt;.cpp</small></font> 
194                      </td>
195                           <td><font face="Helvetica, Arial, sans-serif"><small> Implementing 
196                the provider methods</small></font></td>
197                         </tr>
198                         <tr>
199                           <td><small><font face="Helvetica, Arial, sans-serif">&lt;ProviderName&gt;.h</font> 
200                      </small></td>
201                           <td><font face="Helvetica, Arial, sans-serif"><small> Header 
202             for   the  provider implemented</small></font></td>
203                         </tr>
204                         <tr>
205                           <td><small><font face="Helvetica, Arial, sans-serif">&lt;ProviderNameMain.cpp&gt;</font> 
206                      </small></td>
207                           <td><font face="Helvetica, Arial, sans-serif"><small> The
208            main()    function  calling the PegasusCreateProvider API</small></font></td>
209                         </tr>
210                         <tr>
211 s.soni 1.1                <td><font face="Helvetica, Arial, sans-serif"><small>&lt;Provider.mof&gt;</small></font> 
212                      </td>
213                           <td><font face="Helvetica, Arial, sans-serif"><small> The
214            Sample    Class  MOF</small></font></td>
215                         </tr>
216                         <tr>
217                           <td><font face="Helvetica, Arial, sans-serif"><small>&lt;ProviderR.mof&gt;</small></font> 
218                      </td>
219                           <td><font face="Helvetica, Arial, sans-serif"><small> Provider 
220              Registration   MOF.</small></font></td>
221                         </tr>
222                                               
223              </tbody>         
224            </table>
225                     <small><font face="Helvetica, Arial, sans-serif"><br>
226                     The solution consists of test providers and test programs for the
227             following    specific conditions: [some parts of the actual code developed
228             are also provided   with the proposed solution for each of the specific
229            scenarios]</font></small>            
230            <h3><small><font face="Helvetica, Arial, sans-serif">a.) Single Provider implementing
231            Multiple Classes<br>
232 s.soni 1.1          </font></small></h3>
233                     <small><font face="Helvetica, Arial, sans-serif"
234             color="#000000">This    test  program containing a sample provider is used
235            to test the provider  for  loading  multiple classes with various combinations
236            of the test client  to  fetch the  classes.</font><font
237             face="Helvetica, Arial, sans-serif"> Various  complex  client loading scenarios
238            are introduced in order to achieve this.<br>
239                     The following source programs are implemented for this test case:<br>
240                     1. TestProvider.mof defines 3 sample classes that implement the
241            TestProvider.cpp     source program. <br>
242                     2. The registration mof TestProviderR.mof registers the TestProvider 
243              in  the  root/SampleProvider namespace.<br>
244                     3. TestProvider.cpp is the actual provider module code.<br>
245                     4. TestProviderMain.cpp is the main program calling the TestProvider 
246              through   PegasusCreateProvider call.<br>
247                     5. A client script containing the commands for running CLI with
248            the   possible   CIM operations for the classes implemented by the provider.<br>
249                     6. Scripts for deleting provider module and restarting the cimserver 
250              are   also written for simplifying the test execution.<br>
251                     <br>
252                     A TestProvider is implemented for handling multiple classes. This
253 s.soni 1.1  provider    also contains the code for testing the exception handling explained
254             in the   solution b) below. This exception handling test is present inside
255             conditional    macros to enable/disable it.</font></small>         
256            <h3><small><font face="Helvetica, Arial, sans-serif">b) Exception handling 
257                by Providers<br>
258                     </font></small></h3>
259                     <small><font face="Helvetica, Arial, sans-serif"
260             color="#000000">Exception     handling by the cimom when all types of exceptions
261            are thrown from within     the provider methods. A sample provider will be
262            used to throw exceptions     at different points in the execution of its
263            methods (like enumInstances,    enumInstNames  etc.)<br>
264                     <br>
265                     The provider contains the following code macro for enabling and
266            disabling     the exception handling tests in the provider<br>
267                     <br>
268                     </font><font face="Helvetica, Arial, sans-serif">// The following
269             macro   is  enabled/ disabled by setting TEST_EXCEPTIONS in the Makefile.<br>
270                     </font><font face="Helvetica, Arial, sans-serif" size="-1"><small><br>
271                     <big><b>TestProvider.cpp</b></big></small></font><big><font
272             face="Helvetica, Arial, sans-serif" size="-1"><big><br>
273                     ....<br>
274 s.soni 1.1          </big></font><font face="Helvetica, Arial, sans-serif"
275             size="-1">#ifdef     TEST_EXCEPTIONS<br>
276                     #define PEGASUS_EXCEPTION    PEGASUS_CIM_EXCEPTION(CIM_ERR_FAILED,   
277              "TestProvider   Exception")<br>
278                     #define CIM_EXCEPTION               CIMException(CIM_ERR_FAILED, 
279            "Test    Provider")<br>
280                     #else<br>
281                     #define PEGASUS_EXCEPTION // These can be defined at the compilation 
282              time   in the Makefile.<br>
283                     #define CIM_EXCEPTION<br>
284                     #endif<br>
285                     <br>
286                     // Update the value of the following macro for enabling/ disabling 
287             exceptions.<br>
288                     //<br>
289                     #define EXCEPTION_TYPE      0<br>
290                     <br>
291                     #define CheckExceptionType(X)                  {                   
292             \<br>
293                                     if (X == 1) throw PEGASUS_EXCEPTION;    \<br>
294                                     if (X == 2) throw CIM_EXCEPTION;               \<br>
295 s.soni 1.1                          }<br>
296                  <br>
297                     </font></big><font face="Helvetica, Arial, sans-serif">The normal
298             working    of the provider is unaffected if the TEST_EXCEPTIONS flag is
299            not  set during    the compilation.<br>
300                     </font></small>         
301            <h3><small><font face="Helvetica, Arial, sans-serif">c) Provider load/unload 
302                and Timing<br>
303                     </font></small></h3>
304                     <small><font face="Helvetica, Arial, sans-serif">Written a sample
305             provider    in which multiple sleep points are introduced at various points
306             in the provider   method execution. The sleep durations can be different
307            for the different  provider methods.<br>
308                     Its an attempt to find out any inconsistencies in the provider load/unload 
309                (if any) logic.The ideal test case requires that a provider unloads when 
310               another client is invoking enumerate instances for a provider class and 
311             vice  versa. It is quite difficult to create this kind of situation with 
312            this set  of test programs. By running these tests for long hours we might 
313            hit some  problem.</font></small>         
314            <ul>
315                       <li><small><font face="Helvetica, Arial, sans-serif">The provider
316 s.soni 1.1   (TimingProvider.cpp)   implements the base class TimingSampleClass with
317            3  derived classes TimeOne,   TimeTwo, TimeThree.</font></small></li>
318                       <li><small><font face="Helvetica, Arial, sans-serif">The instances 
319              of  the  TimeOne and TimeTwo classes are created inside the TimingProvider:initialize 
320                method in the provider.</font></small></li>
321                       <li><small><font face="Helvetica, Arial, sans-serif">Scripts are 
322             provided    to build, load and execute the provider programs as well running 
323             the client    programs and scripts.</font></small></li>
324                             
325            </ul>
326                     <small><font face="Helvetica, Arial, sans-serif">The client programs 
327              include:<br>
328                     </font></small>         
329            <ul>
330                       <li><small><font face="Helvetica, Arial, sans-serif">Makefile.Client 
331               -  A separate Makefile to execute the client program.</font></small></li>
332                       <li><small><font face="Helvetica, Arial, sans-serif">TimingClient.cpp 
333               -  This program tests the TimingProvider implemented by running multiple 
334              threads  performing different CIM operations.</font> <font
335             face="Helvetica, Arial, sans-serif">main() forks and child calls EnumerateInstances 
336                for one class. The parent make calls to EnumerateInstances and EnumerateClass. 
337 s.soni 1.1     Long sleeps are inserted between the calls to enumerateinstances and enumerateClasses.</font></small></li>
338                       <li><small><font face="Helvetica, Arial, sans-serif">Client script 
339              -  This  script contains the combination of TimingClient and CLI client 
340            programs   with  random sleeps inserted between them.CLI is used to enumerate 
341            instances/   instancenames  and enumerate classes for the root/SampleProvider 
342            namespace   created by the  test provider.</font></small></li>
343                             
344            </ul>
345                     <font size="-1"><font face="Helvetica, Arial, sans-serif">From <b>TimingClient.cpp</b><br>
346                     .....<br>
347                     int main(int argc, char** argv)<br>
348                     {<br>
349                         pid_t pid;<br>
350                         try<br>
351                         {<br>
352                             CIMClient client;<br>
353                     <br>
354                             client.connect("localhost", 5988, "", "");<br>
355                     <br>
356                             if ((pid = fork()) &lt; 0)<br>
357                             {<br>
358 s.soni 1.1                          cout &lt;&lt; "Fork Error\n" &lt;&lt; endl;<br>
359                                     exit(0);<br>
360                             }<br>
361                             else if (pid == 0)<br>
362                             {   // child<br>
363                                 sleep(10);<br>
364                                 EnumerateInstancesTiming(client, CLASSONE);<br>
365                                 _exit(0);<br>
366                             }<br>
367                             // parent<br>
368                             sleep(10);<br>
369                             EnumerateInstancesTiming(client, CLASSTWO);<br>
370                             sleep(5);<br>
371                             EnumerateClassesTiming(client, "TimingSampleClass");<br>
372                         }<br>
373                         catch(Exception&amp; e)<br>
374                         {<br>
375                             PEGASUS_STD(cerr) &lt;&lt; "Error: " &lt;&lt; e.getMessage() 
376              &lt;&lt;<br>
377                                 PEGASUS_STD(endl);<br>
378                             exit(1);<br>
379 s.soni 1.1              }<br>
380                     }<br>
381                     </font></font>         
382            <h3><small><font face="Helvetica, Arial, sans-serif">d) Resource sharing, 
383                multithreading and Inheritance in provider methods.<br>
384                     </font></small></h3>
385                     <small><font face="Helvetica, Arial, sans-serif">Doing a fork()
386            from   inside   the provider methods and examining the file descriptors inherited 
387              by the  sub-processes. To handle Linux threading cleanly, the sample provider 
388              thread  spawn a reaper thread whose sole purpose is to wait for the subprocess 
389              to  terminate.<br>
390                     <br>
391                     The implementation is done by creating a sample provider in the
392            following     manner:</font></small>         
393            <ol>
394                       <li><small><font face="Helvetica, Arial, sans-serif">MultithreadingSampleProviderMain.cpp 
395                is the source file which contains the provider entry point routine.</font></small></li>
396                       <li><small><font face="Helvetica, Arial, sans-serif">MultithreadingSampleProvider.cpp 
397                [h] are the main provider sources that implement the MultithreadingSampleClass.</font></small></li>
398                       <li><small><font face="Helvetica, Arial, sans-serif">The Base
399            class    has  3 derived classes called ThreadSampleOne, ThreadSampleTwo and
400 s.soni 1.1 ThreadSampleThree.</font></small></li>
401                       <li><small><font face="Helvetica, Arial, sans-serif">ThreadSampleOne 
402               class  instances are created inside the enumerateInstances method of the 
403              provider.  After the instances creation this method calls explicitly the 
404             CreateThread  function, which spawns a new sub-process and executes the command
405             line cim  client CLI.</font></small></li>
406                       <li><small><font face="Helvetica, Arial, sans-serif">The additional
407               functions  added in the provider source program other than the standard
408             provider  methods  are:</font></small></li>
409                                               
410              <ol>
411                         <li><small><font face="Helvetica, Arial, sans-serif">CreateThread() 
412               -  Function creating the sub-process (by using fork())</font></small></li>
413                         <li><small><font face="Helvetica, Arial, sans-serif">reader()
414             -  child   process reads from the input stream</font></small></li>
415                         <li><small><font face="Helvetica, Arial, sans-serif">writer()
416             -  Parent   process writing to the output stream<br>
417                           </font></small></li>
418                                               
419              </ol>
420                       <li><small><font face="Helvetica, Arial, sans-serif">The parent
421 s.soni 1.1  process    after writing to the output stream sleeps in the function writer()
422             which   makes the CLI command give a timeout error.</font></small></li>
423                       <li><small><font face="Helvetica, Arial, sans-serif">Scripts are 
424             created    for building the source and repository and for registering  the 
425             provider.</font></small></li>
426                             
427            </ol>
428                     <font face="Helvetica, Arial, sans-serif"><small>From <b>MultithreadingSampleProvider.cpp 
429                </b>[ CreateThreads() function is illustrated below]:<br>
430                     </small></font><small><font face="Helvetica, Arial, sans-serif">....<br>
431                     <br>
432                   <font size="-1">  int CreateThreads()<br>
433                     {<br>
434                         char* arg_list[] = {<br>
435                                 "CLI",<br>
436                                 "niall",<br>
437                                 "-n",<br>
438                                 "root/SampleProvider",<br>
439                                 NULL<br>
440                         };<br>
441                         int fds[2];<br>
442 s.soni 1.1              pid_t cpid;<br>
443                   <br>
444                         pipe(fds);<br>
445                   <br>
446                         cpid = fork();<br>
447                         if (cpid == (pid_t)0)<br>
448                         {<br>
449                             FILE* stream;<br>
450                             // This is the child process. Close our copy of the write
451             end<br>
452                             // of the file descriptor.<br>
453                             close(fds[1]);<br>
454                             // Connect the read end of the pipe to standard input.<br>
455                             dup2(fds[0], STDIN_FILENO);<br>
456                             // Convert the read file descriptor to a FILE object, and
457             read   from  it<br>
458                             stream = fdopen(fds[0],"r" );<br>
459                             reader(stream);<br>
460                             close(fds[0]);<br>
461                             // Replace the child process with the CLI program<br>
462                             execvp ("CLI", arg_list);<br>
463 s.soni 1.1              }<br>
464                         else<br>
465                         {<br>
466                             FILE* stream;<br>
467                             // Close our copy of the read end of the file descriptor.<br>
468                             close (fds[0]);<br>
469                             // Convert the write file descriptor to a FILE object,and
470             write    to it.<br>
471                             stream = fdopen(fds[1],"w" );<br>
472                   <br>
473                             writer("Test Writer from Parent process\n", 2, stream);<br>
474                   </font>        </font><font face="Helvetica, Arial, sans-serif"
475             size="-1">        close (fds[1]);<br>
476                             // Wait for child process to finish<br>
477                             waitpid(cpid, NULL, 0);</font></small><font size="-1"><br>
478                       </font><small><font face="Helvetica, Arial, sans-serif"><font
479             size="-1">  }<br>
480                         return 0;<br>
481                     }<br>
482                     ....<br>
483                     ....</font><br>
484 s.soni 1.1          </font></small>         
485            <h3><small><font face="Helvetica, Arial, sans-serif">e) CIMOMHandle and OperationContext</font></small></h3>
486                     <small><font face="Helvetica, Arial, sans-serif">A sample provider 
487             exercising    the CIMOMHandle that sets the UserIdentity into OperationContext. 
488             The provider    method modifies the user identity in the OperationContext 
489             to check the cimom   behavior.<br>
490                     <br>
491                     The CIMOMSample provider modifies the user identity in its methods.
492              Then   a client is executed with different combinations of the user/ password 
493              information   for checking provider behavior.<br>
494                     <br>
495                     Client scripts are written for <br>
496                         1) Adding users to be authorised for accessing a particular
497            namespace     [using "cimauth"]  <br>
498                         2) Trying to access the namespace with valid/invalid user/passwd 
499              information   ["cimuser" is used to verify the users present]<br>
500                     <br>
501                     </font></small>         
502            <h3><small><font face="Helvetica, Arial, sans-serif">f) XML Parser/ Generator 
503                verification for Malformed property strings<br>
504                     </font></small></h3>
505 s.soni 1.1          <small><font face="Helvetica, Arial, sans-serif">Checking the XML
506             parser    and generator programs when malformed strings are passed through
507             the providers.    The malformed property strings can be anything from trailing
508             NULs to any   special characters and angle brackets. A sample provider is
509             written which   introduces bad strings while creating the instances of the
510             sample class.  These property strings are verified from inside the provider
511             methods to verify  if the provider receives the proper XML encoded string
512             and not any junk characters.<br>
513                     <br>
514                     The test provider is written for testing the following 3 cases regarding 
515                data handling:</font></small><small><font
516             face="Helvetica, Arial, sans-serif"><br>
517                     </font></small>         
518            <ul>
519                       <li><small><font face="Helvetica, Arial, sans-serif">Trailing
520            nul,   did   you verify that the provider actually saw the nul character
521            rather  than the  URL escape sequence?  For example, the provider should
522            see {'a',  ..., \0'},  not {'a', ..., '\\', '0', '0', '0'}.</font></small></li>
523                       <li><small><font face="Helvetica, Arial, sans-serif">Trailing
524            angle    brackets  '&lt;', '&gt;'</font></small></li>
525                       <li><small><font face="Helvetica, Arial, sans-serif">Trailing
526 s.soni 1.1 spaces    and  special characters.</font></small></li>
527                             
528            </ul>
529                             
530            <h3><small><font face="Helvetica, Arial, sans-serif">g) Large Data Handling 
531                by the provider<br>
532                     </font></small></h3>
533                     <small><font face="Helvetica, Arial, sans-serif">A sample provider 
534             implementing    a class with large number of instances. The number of instances 
535             can be controlled   through a compilation time configuration variable. Changing 
536             the number of   instances the provider can be tested for large data handling.<br>
537                     <br>
538                     There is a const macro NO_OF_INSTANCES which decides the number
539            of  instances    to be created. This can be modified for testing huge amount 
540            of data in 2  places. Either in the source file LargeDataProvider.cpp Or in
541            the Makefile   by defining the NO_OF_INSTANCES locally (LOCAL_DEFINES=-DNO_OF_INSTANCES=&lt;number&gt;). 
542                If it is defined inside the Makefile, the value present in the cpp source 
543                is overwritten.<br>
544                     </font><font face="Helvetica, Arial, sans-serif" size="-1"><small><br>
545                  </small></font></small><font face="Helvetica, Arial, sans-serif"
546             size="-1">   from <b>LargeDataProvider.cpp<br>
547 s.soni 1.1          </b>......<b><br>
548                     </b>#ifndef NO_OF_INSTANCES<br>
549                         #define NO_OF_INSTANCES 100<br>
550                     #endif<br>
551                     </font><font face="Helvetica, Arial, sans-serif" size="-1">......</font><font
552             face="Helvetica, Arial, sans-serif" size="-1"><br>
553                     <br>
554                     </font><font face="Helvetica, Arial, sans-serif" size="-1">from
555            <b>Makefile</b></font><font face="Helvetica, Arial, sans-serif"
556             size="-1"><br>
557                     </font><font face="Helvetica, Arial, sans-serif" size="-1">NO_OF_INSTANCES 
558                = 100 # The number of instances can be changed here<br>
559                     </font><font face="Helvetica, Arial, sans-serif" size="-1">......</font><font
560             face="Helvetica, Arial, sans-serif" size="-1"><br>
561                  <br>
562                     </font><small><font face="Helvetica, Arial, sans-serif">   The creation
563               of Instances is done when the enumerateInstances method of the  provider
564              is called.If a client requests for enumerateInstanceNames it will  fail
565            if  enumerateInstances wouldn't have been executed. </font></small>     
566               
567            <h3> </h3>
568 s.soni 1.1                  
569            <h3><small><font face="Helvetica, Arial, sans-serif">f) Load MOFs</font></small></h3>
570                     <small><font face="Helvetica, Arial, sans-serif">The MOF files for 
571             all   the  sample providers developed above are present in a common directory 
572             LoadMOF/.   The directory structure is taken from the $PEGASUS_HOME/src/Providers/sample 
573               directory  inside the pegasus source tree. Makefile in LoadMOF is responsible 
574               for compiling  all the classes and registering the sample providers. Unregistering 
575               of providers  is also supported by introducing a "unregister" target in 
576             the  LoadMOF/Makefile.  This unregister and deletes the provider loaded by
577             it.  <br>
578                   The user has to run  "make repository" again in order to compile the 
579             provider   classes and to re-register  the provider.</font></small>     
580               
581            <h2><small><font face="Helvetica, Arial, sans-serif" color="#000000">Rationale</font></small></h2>
582                    <small><font face="Helvetica, Arial, sans-serif"> Improved test coverage
583                for Pegasus</font></small><br>
584                             
585            <h2><small><font face="Helvetica, Arial, sans-serif" color="#000000">Schedule</font></small></h2>
586                             
587            <p><small><font face="Helvetica, Arial, sans-serif">The goal is to get this
588                functionality in 2.3.2 or very early in the 2.4 main branch. [The first
589 s.soni 1.1   code  drop for the test programs mentioned in this PEP is available now
590            and  can  be committed anytime].<br>
591                    </font></small></p>
592                           
593            <table cellpadding="2" cellspacing="2" border="1"
594             style="text-align: left; width: 100%;">
595                       <tbody>
596                         <tr>
597                           <td style="vertical-align: top;" bgcolor="#cccccc"><font
598             face="Helvetica, Arial, sans-serif"><small>action<br>
599                           </small></font></td>
600                           <td style="vertical-align: top;" bgcolor="#cccccc"><font
601             face="Helvetica, Arial, sans-serif"><small>planned<br>
602                           </small></font></td>
603                           <td style="vertical-align: top;" bgcolor="#cccccc"><font
604             face="Helvetica, Arial, sans-serif"><small>actual<br>
605                           </small></font></td>
606                           <td style="vertical-align: top;" bgcolor="#cccccc"><font
607             face="Helvetica, Arial, sans-serif"><small>comment<br>
608                           </small></font></td>
609                         </tr>
610 s.soni 1.1               <tr>
611                           <td style="vertical-align: top;"><font
612             face="Helvetica, Arial, sans-serif"><small>PEP submitted<br>
613                           </small></font></td>
614                           <td style="vertical-align: top;"><font
615             face="Helvetica, Arial, sans-serif"><small>12/24/2003<br>
616                           </small></font></td>
617                           <td style="vertical-align: top;"><font
618             face="Helvetica, Arial, sans-serif"><small>12/24/2003<br>
619                           </small></font></td>
620                           <td style="vertical-align: top;"><font
621             face="Helvetica, Arial, sans-serif"><small><br>
622                           </small></font></td>
623                         </tr>
624                         <tr>
625                           <td style="vertical-align: top;"><font
626             face="Helvetica, Arial, sans-serif"><small>PEP reviewed<br>
627                           </small></font></td>
628                           <td style="vertical-align: top;"><font
629             face="Helvetica, Arial, sans-serif"><small>02/03/2004</small></font></td>
630                   <td style="vertical-align: top;"><font
631 s.soni 1.1  face="Helvetica, Arial, sans-serif"><small>02/03/2004<br>
632                           </small></font></td>
633                           <td style="vertical-align: top;"><font
634             face="Helvetica, Arial, sans-serif"><small><br>
635                           </small></font></td>
636                         </tr>
637                         <tr>
638                           <td style="vertical-align: top;"><font
639             face="Helvetica, Arial, sans-serif"><small>PEP approved<br>
640                           </small></font></td>
641                           <td style="vertical-align: top;"><font
642             face="Helvetica, Arial, sans-serif"><small>02/03/2004<br>
643                           </small></font></td>
644                           <td style="vertical-align: top;"><font
645             face="Helvetica, Arial, sans-serif"><small>02/03/2004<br>
646                           </small></font></td>
647                           <td style="vertical-align: top;"><font
648             face="Helvetica, Arial, sans-serif"><small><br>
649                           </small></font></td>
650                         </tr>
651                         <tr>
652 s.soni 1.1                <td style="vertical-align: top;"><font
653             face="Helvetica, Arial, sans-serif"><small>Code committed<br>
654                           </small></font></td>
655                           <td style="vertical-align: top;"><font
656             face="Helvetica, Arial, sans-serif"><small><br>
657                           </small></font></td>
658                           <td style="vertical-align: top;"><font
659             face="Helvetica, Arial, sans-serif"><small><br>
660                           </small></font></td>
661                           <td style="vertical-align: top;"><font
662             face="Helvetica, Arial, sans-serif"><small>The changes can be committed in
663            a day after the PEP is approved.<br>
664                           </small></font></td>
665                         </tr>
666                                               
667              </tbody>         
668            </table>
669                             
670            <h2><small><font face="Helvetica, Arial, sans-serif" color="#000000">Discussion</font></small></h2>
671            <small><font face="Helvetica, Arial, sans-serif">The PEP was not balloted,
672            as per the agreement of the Pegasus Architecture team.</font></small>   
673 s.soni 1.1              
674            <p><small><font face="Helvetica, Arial, sans-serif" color="#0000ff"></font></small></p>
675                             
676            <hr><br>
677            <br>
678                     
679            <p><small><font face="Helvetica, Arial, sans-serif"><i><font size="2"><small>Copyright 
680                (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; IBM 
681            Corp.;   The Open Group</small></font><br>
682                     <br>
683                     <font size="1"><small>Permission is hereby granted, free of charge,
684              to  any person obtaining a copy  of this software and associated documentation 
685               files (the "Software"), to deal in the Software without restriction, including 
686               without limitation the rights to use, copy, modify, merge, publish, distribute, 
687               sublicense, and/or sell copies of the Software, and to permit persons to
688              whom the Software is furnished to do so, subject to the following conditions:</small></font><br>
689                     <font size="2"><small><br>
690                     </small></font> <font size="1"><small>THE ABOVE COPYRIGHT NOTICE 
691            AND   THIS   PERMISSION NOTICE SHALL BE INCLUDED IN ALL COPIES OR SUBSTANTIAL 
692            PORTIONS    OF THE SOFTWARE. THE SOFTWARE IS PROVIDED  "AS IS", WITHOUT WARRANTY 
693            OF  ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
694 s.soni 1.1   OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
695              IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
696              DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
697              ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
698              DEALINGS IN THE SOFTWARE.</small></font></i></font></small></p>
699                             
700            <p><small><font face="Helvetica, Arial, sans-serif"> </font></small></p>
701                     <small><font face="Helvetica, Arial, sans-serif"><br>
702                     <br>
703                     <br>
704                     </font></small> <br>
705                    <br>
706                   <br>
707                  <br>
708                 <br>
709                <br>
710               <br>
711              <br>
712             <br>
713            </body>
714            </html>

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2