Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

175 lines
5.0 KiB

  1. @echo off
  2. rem
  3. rem Name : RunUM.cmd
  4. rem Author: Jen-Lung Chiu
  5. rem Date : August 5th 1999
  6. rem
  7. rem CMD script file to test UM event tracing.
  8. rem All the variations are very trivial and test for basic functionality.
  9. rem
  10. rem Variation 1 - single UM provider - start, query, and stop tested
  11. rem Variation 2 - three providers - intermingled start and stop tested
  12. rem Variation 3 - tests circular buffer modifications
  13. rem
  14. if exist evntrace.log del evntrace.log
  15. if exist provider.log del provider.log
  16. echo !
  17. echo ! The tests start now
  18. :VARIATION1
  19. echo !
  20. echo !=========================================================================
  21. echo ! Variation 1 - single UM provider - trivial tests
  22. echo !
  23. echo ! Starting provider 1 ...
  24. start "Variation 1 - provider 1" provider.exe 100000 d58c126f-b309-11d1-969e-0000f875a5bc 50 TraecEvent GuidPtrMofPtr MultiReg
  25. echo ! Starting provider 1 finished
  26. echo !
  27. echo ! Sleeping for 1 second...
  28. sleep 1
  29. echo ! Starting Logger with corresponding Control GUID
  30. tracelog.exe -start du1 -guid #d58c126f-b309-11d1-969e-0000f875a5bc -um -f du1.log
  31. echo ! Starting logger du1 finished
  32. echo !
  33. echo ! Sleeping for 5 seconds...
  34. sleep 5
  35. echo ! Querying logger du1...
  36. tracelog -q du1 -guid #d58c126f-b309-11d1-969e-0000f875a5bc -um -f du1.log
  37. echo ! Querying logger du1 finished
  38. echo ! Sleeping for 5 seconds...
  39. sleep 5
  40. echo ! Stopping logger du1 (provider 1 should quit automatically) ...
  41. tracelog -stop du1 -guid #d58c126f-b309-11d1-969e-0000f875a5bc -um -f du1.log
  42. echo ! Stopping logger du1 finished
  43. :VARIATION2
  44. echo !
  45. echo !=========================================================================
  46. echo ! Variation 2 - three providers - intermingled start and stop tested
  47. echo !
  48. echo ! Starting provider 2 ...
  49. start "Variation 2 - provider 2" provider.exe 50000 dcb8c570-2c70-11d2-90ba-00805f8a4d63 50 TraceInstance MofPtr
  50. echo ! Starting provider 2 finished
  51. echo !
  52. echo ! Starting provider 3 ...
  53. start "Variation 2 - provider 3" provider.exe 50000 f5b6d380-2c70-11d2-90ba-00805f8a4d63 50 TraceEvent GuidPtr
  54. echo ! Starting provider 3 finished
  55. echo !
  56. rem echo ! Sleeping for 1 seconds...
  57. rem sleep 1
  58. echo ! Starting Logger du2 for provider 2
  59. tracelog.exe -start du2 -guid #dcb8c570-2c70-11d2-90ba-00805f8a4d63 -um -ft 2 -f du2.log
  60. echo ! Starting logger du2 finished
  61. echo !
  62. echo ! Starting provider 4 ...
  63. start "Variation 2 - provider 4" provider.exe 50000 054b1ae0-2c71-11d2-90ba-00805f8a4d63 50 TraceEvent MofPtr
  64. echo ! Starting provider 4 finished
  65. echo !
  66. rem echo ! Sleeping for 1 seconds...
  67. rem sleep 1
  68. echo ! Starting Logger du3 for provider 3
  69. tracelog.exe -start du3 -guid #f5b6d380-2c70-11d2-90ba-00805f8a4d63 -um -f du3.log
  70. echo ! Starting logger dp3 finished
  71. echo !
  72. rem echo ! Sleeping for 5 seconds...
  73. rem sleep 5
  74. echo ! List all logger sessions, should contain du2 and du3
  75. tracelog.exe -l
  76. echo ! Done
  77. rem echo "Sleeping for 1 seconds..."
  78. rem sleep 1
  79. echo ! Starting Logger du4 for provider 4
  80. tracelog.exe -start du4 -guid #054b1ae0-2c71-11d2-90ba-00805f8a4d63 -um -cir 1 -f du4.log
  81. echo ! Starting logger du4 finished
  82. echo !
  83. rem echo "Sleeping for 1 seconds..."
  84. rem sleep 1
  85. echo ! List all logger sessions, should contain du2, du3, and du4
  86. tracelog.exe -l
  87. echo ! Done
  88. echo ! Stopping logger du2 (provider 2 should terminate now) ...
  89. tracelog.exe -stop du2 -guid #dcb8c570-2c70-11d2-90ba-00805f8a4d63 -um
  90. echo ! Stopping logger du2 finished
  91. echo !
  92. echo "Sleeping for 3 seconds..."
  93. sleep 3
  94. echo ! List all logger sessions, should contain du3 and du4
  95. tracelog.exe -l
  96. echo ! Done
  97. echo ! Stopping logger du4 (provider 4 should terminate now) ...
  98. tracelog.exe -stop du4 -guid #054b1ae0-2c71-11d2-90ba-00805f8a4d63 -um
  99. echo ! Stopping logger du4 finished
  100. echo !
  101. echo "Sleeping for 1 seconds..."
  102. sleep 1
  103. echo ! Stopping logger du3 (provider 3 should terminate now) ...
  104. tracelog.exe -stop du3 -guid #f5b6d380-2c70-11d2-90ba-00805f8a4d63 -um
  105. echo ! Stopping logger du3 finished
  106. echo !
  107. :VARIATION3
  108. echo !
  109. echo !=========================================================================
  110. echo ! Variation 3 - tests UM circular buffer modifications
  111. echo !
  112. echo ! Starting provider 5 ...
  113. start "Variation 3 - provider 5" provider.exe 100000 68799948-2c7f-11d2-90bb-00805f8a4d63 10
  114. echo ! Starting provider 5 finished
  115. echo !
  116. echo ! Sleeping for 1 seconds...
  117. sleep 1
  118. echo ! Starting Logger du5 for provider 5
  119. tracelog.exe -start du5 -guid #68799948-2c7f-11d2-90bb-00805f8a4d63 -um -cir 1 -f du5.log
  120. echo ! Starting Logger du5 finished
  121. echo !
  122. echo ! Sleeping for 5 seconds...
  123. sleep 5
  124. echo ! Querying logger du5...
  125. tracelog.exe -q du5 -guid #68799948-2c7f-11d2-90bb-00805f8a4d63 -um -cir 1 -f du5.log
  126. echo ! Querying logger du5 finished
  127. echo !
  128. echo ! Sleeping for 5 seconds...
  129. sleep 5
  130. echo ! Stopping logger du5 (provider 5 should terminate now) ...
  131. tracelog.exe -stop du5 -guid #68799948-2c7f-11d2-90bb-00805f8a4d63 -um -cir 1 -f du5.log
  132. echo ! Stopping logger du5 finished
  133. echo !
  134. :Cleanup
  135. del du*.log