Source code of Windows XP (NT5)
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.

169 lines
6.2 KiB

  1. @echo off
  2. rem Test fs util messages/behavior
  3. rem
  4. rem test - run test, produce log, and compare with saved log
  5. rem
  6. if not "%1" == "" goto %1
  7. setlocal
  8. call test Run >test.log
  9. fcom test.good test.log
  10. endlocal
  11. goto :eof
  12. :Test
  13. shift
  14. set _test=%1
  15. shift
  16. %1 %2 %3 %4 %5 %6 %7 %8 %9
  17. set _result=%errorlevel%
  18. if "%_test%" == "success" if not %_result% == 0 echo Expected success: %1 %2 %3 %4 %5 %6 %7 %8 %9
  19. if "%_test%" == "fail" if %_result% == 0 echo Expected failure: %1 %2 %3 %4 %5 %6 %7 %8 %9
  20. goto :eof
  21. :Run
  22. prompt []
  23. call test test success obj\i386\fsutil.exe
  24. obj\i386\fsutil.exe x
  25. call test test success obj\i386\fsutil.exe behavior
  26. obj\i386\fsutil.exe behavior x
  27. call test test success obj\i386\fsutil.exe behavior query
  28. call test test fail obj\i386\fsutil.exe behavior query x
  29. call test test success obj\i386\fsutil.exe behavior query disable8dot3
  30. call test test success obj\i386\fsutil.exe behavior query allowextchar
  31. call test test success obj\i386\fsutil.exe behavior query disablelastaccess
  32. call test test success obj\i386\fsutil.exe behavior query quotanotify
  33. call test test success obj\i386\fsutil.exe behavior query mftzone
  34. call test test success obj\i386\fsutil.exe behavior set
  35. call test test fail obj\i386\fsutil.exe behavior set x
  36. call test test success obj\i386\fsutil.exe dirty
  37. call test test fail obj\i386\fsutil.exe dirty x
  38. call test test success obj\i386\fsutil.exe dirty query
  39. call test test success obj\i386\fsutil.exe dirty set
  40. call test test success obj\i386\fsutil.exe file
  41. call test test fail obj\i386\fsutil.exe file x
  42. call test test success obj\i386\fsutil.exe file findbysid
  43. call test test success obj\i386\fsutil.exe file queryallocranges
  44. call test test success obj\i386\fsutil.exe file setshortname
  45. call test test success obj\i386\fsutil.exe file setvaliddata
  46. call test test success obj\i386\fsutil.exe file setzerodata
  47. call test test success obj\i386\fsutil.exe fsinfo
  48. call test test fail obj\i386\fsutil.exe fsinfo x
  49. call test test success obj\i386\fsutil.exe fsinfo drives
  50. call test test success obj\i386\fsutil.exe fsinfo drivetype
  51. call test test success obj\i386\fsutil.exe fsinfo volumeinfo
  52. call test test success obj\i386\fsutil.exe fsinfo ntfsinfo
  53. call test test success obj\i386\fsutil.exe fsinfo statistics
  54. call test test success obj\i386\fsutil.exe hardlink
  55. call test test fail obj\i386\fsutil.exe hardlink x
  56. call test test success obj\i386\fsutil.exe hardlink create
  57. call test test success obj\i386\fsutil.exe objectid
  58. call test test fail obj\i386\fsutil.exe objectid x
  59. call test test success obj\i386\fsutil.exe objectid query
  60. call test test success obj\i386\fsutil.exe objectid set
  61. call test test success obj\i386\fsutil.exe objectid delete
  62. call test test success obj\i386\fsutil.exe objectid create
  63. call test test success obj\i386\fsutil.exe quota
  64. call test test fail obj\i386\fsutil.exe quota x
  65. call test test success obj\i386\fsutil.exe quota disable
  66. call test test success obj\i386\fsutil.exe quota track
  67. call test test success obj\i386\fsutil.exe quota enforce
  68. call test test success obj\i386\fsutil.exe quota violations
  69. call test test success obj\i386\fsutil.exe quota modify
  70. call test test success obj\i386\fsutil.exe quota query
  71. call test test success obj\i386\fsutil.exe reparsepoint
  72. call test test fail obj\i386\fsutil.exe reparsepoint x
  73. call test test success obj\i386\fsutil.exe reparsepoint query
  74. call test test success obj\i386\fsutil.exe reparsepoint delete
  75. call test test success obj\i386\fsutil.exe sparse
  76. call test test fail obj\i386\fsutil.exe sparse x
  77. call test test success obj\i386\fsutil.exe sparse setflag
  78. call test test success obj\i386\fsutil.exe sparse queryflag
  79. call test test success obj\i386\fsutil.exe sparse queryrange
  80. call test test success obj\i386\fsutil.exe sparse setrange
  81. call test test success obj\i386\fsutil.exe usn
  82. call test test fail obj\i386\fsutil.exe usn x
  83. call test test success obj\i386\fsutil.exe usn createjournal
  84. call test test success obj\i386\fsutil.exe usn deletejournal
  85. call test test success obj\i386\fsutil.exe usn enumdata
  86. call test test success obj\i386\fsutil.exe usn queryjournal
  87. call test test success obj\i386\fsutil.exe usn readdata
  88. call test test success obj\i386\fsutil.exe usn readjournal
  89. call test test success obj\i386\fsutil.exe volume
  90. call test test fail obj\i386\fsutil.exe volume x
  91. call test test success obj\i386\fsutil.exe volume dismount
  92. call test test success obj\i386\fsutil.exe volume extend
  93. call test test success obj\i386\fsutil.exe volume diskfree
  94. rem ---------------
  95. rem specific tests
  96. rem ---------------
  97. del sparse
  98. call test test success obj\i386\fsutil file createnew sparse 16000000
  99. call test test success obj\i386\fsutil sparse setflag sparse
  100. obj\i386\fsutil.exe file setzerodata offset=65536 length=131072 sparse
  101. obj\i386\fsutil.exe file queryallocranges offset=0 length=20000000 sparse
  102. rem test it in hex
  103. del sparse
  104. call test test success obj\i386\fsutil file createnew sparse 0x1000000
  105. call test test success obj\i386\fsutil sparse setflag sparse
  106. obj\i386\fsutil.exe file setzerodata offset=0x10000 length=0x20000 sparse
  107. obj\i386\fsutil.exe file queryallocranges offset=0x0 length=0x2000000 sparse
  108. rem ---------------
  109. rem 167977
  110. rem ---------------
  111. call test test success obj\i386\fsutil behavior set quotanotify 4294967295
  112. call test test success obj\i386\fsutil behavior query quotanotify
  113. obj\i386\fsutil behavior set quotanotify 4,294,967,295
  114. call test test fail obj\i386\fsutil behavior set quotanotify xxx
  115. call test test fail obj\i386\fsutil behavior set quotanotify 0
  116. call test test fail obj\i386\fsutil behavior set quotanotify 5555555555
  117. call test test fail obj\i386\fsutil behavior set quotanotify -879868574663545
  118. call test test fail obj\i386\fsutil behavior set quotanotify -65765
  119. rem ---------------
  120. rem 202191
  121. rem ---------------
  122. del xxx
  123. call test test success obj\i386\fsutil file createnew xxx 100
  124. call test test fail obj\i386\fsutil file createnew xxx 100
  125. del xxx
  126. rem ---------------
  127. rem 203140
  128. rem ---------------
  129. call test test success obj\i386\fsutil quota track c:
  130. echo Sleeping for 60 seconds >&2
  131. sleep 60
  132. call test test success obj\i386\fsutil quota query c:
  133. call test test success obj\i386\fsutil quota disable c: