Permalink
Browse files

I have added cli_root script which require to execute other script.

  • Loading branch information...
1 parent 1d6c72b commit 5b71eaa1bc2a001c9daf9f0fdebea2a2b7271125 @vikramjadhav vikramjadhav committed Dec 7, 2010
Showing with 19,773 additions and 0 deletions.
  1. +72 −0 ZFS-Test_Suite/tests/functional/cli_root/Makefile
  2. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/cleanup.ksh
  3. +53 −0 ZFS-Test_Suite/tests/functional/cli_root/cli.cfg
  4. +88 −0 ZFS-Test_Suite/tests/functional/cli_root/cli_common.kshlib
  5. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/setup.ksh
  6. +46 −0 ZFS-Test_Suite/tests/functional/cli_root/zdb/Makefile
  7. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zdb/cleanup.ksh
  8. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zdb/setup.ksh
  9. +29 −0 ZFS-Test_Suite/tests/functional/cli_root/zdb/zdb.cfg
  10. +84 −0 ZFS-Test_Suite/tests/functional/cli_root/zdb/zdb_001_neg.ksh
  11. +46 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs/Makefile
  12. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs/cleanup.ksh
  13. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs/setup.ksh
  14. +88 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs/zfs_001_neg.ksh
  15. +125 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs/zfs_002_pos.ksh
  16. +75 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs/zfs_003_neg.ksh
  17. +29 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs/zfs_malformed.cfg
  18. +50 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/Makefile
  19. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/cleanup.ksh
  20. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/setup.ksh
  21. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone.cfg
  22. +141 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_001_neg.ksh
  23. +104 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_002_pos.ksh
  24. +97 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_003_pos.ksh
  25. +105 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_004_pos.ksh
  26. +97 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_005_pos.ksh
  27. +103 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_006_pos.ksh
  28. +104 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_007_pos.ksh
  29. +95 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_008_neg.ksh
  30. +95 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_009_neg.ksh
  31. +48 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/Makefile
  32. +46 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/cleanup.ksh
  33. +37 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/setup.ksh
  34. +37 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/zfs_copies.cfg
  35. +143 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/zfs_copies.kshlib
  36. +124 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/zfs_copies_001_pos.ksh
  37. +115 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/zfs_copies_002_pos.ksh
  38. +80 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/zfs_copies_003_pos.ksh
  39. +69 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/zfs_copies_004_neg.ksh
  40. +87 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/zfs_copies_005_neg.ksh
  41. +89 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_copies/zfs_copies_006_pos.ksh
  42. +52 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/Makefile
  43. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/cleanup.ksh
  44. +81 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/properties.kshlib
  45. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/setup.ksh
  46. +53 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create.cfg
  47. +82 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_001_pos.ksh
  48. +94 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_002_pos.ksh
  49. +79 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_003_pos.ksh
  50. +90 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_004_pos.ksh
  51. +99 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_005_pos.ksh
  52. +101 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_006_pos.ksh
  53. +104 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_007_pos.ksh
  54. +111 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_008_neg.ksh
  55. +137 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_009_neg.ksh
  56. +159 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_010_neg.ksh
  57. +85 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_011_pos.ksh
  58. +90 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_012_pos.ksh
  59. +94 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_013_pos.ksh
  60. +53 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_create/zfs_create_common.kshlib
  61. +48 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/Makefile
  62. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/cleanup.ksh
  63. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/setup.ksh
  64. +41 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/zfs_destroy.cfg
  65. +207 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/zfs_destroy_001_pos.ksh
  66. +106 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/zfs_destroy_002_pos.ksh
  67. +166 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/zfs_destroy_003_pos.ksh
  68. +130 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/zfs_destroy_004_pos.ksh
  69. +208 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/zfs_destroy_005_neg.ksh
  70. +77 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/zfs_destroy_006_neg.ksh
  71. +87 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/zfs_destroy_007_neg.ksh
  72. +143 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_destroy/zfs_destroy_common.kshlib
  73. +51 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/Makefile
  74. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/cleanup.ksh
  75. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/setup.ksh
  76. +31 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get.cfg
  77. +158 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_001_pos.ksh
  78. +114 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_002_pos.ksh
  79. +77 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_003_pos.ksh
  80. +244 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_004_pos.ksh
  81. +138 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_005_neg.ksh
  82. +76 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_006_neg.ksh
  83. +76 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_007_neg.ksh
  84. +111 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_008_pos.ksh
  85. +103 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_009_pos.ksh
  86. +75 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_010_neg.ksh
  87. +99 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_common.kshlib
  88. +90 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_get/zfs_get_list_d.kshlib
  89. +47 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_inherit/Makefile
  90. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_inherit/cleanup.ksh
  91. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_inherit/setup.ksh
  92. +94 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_inherit/zfs_inherit_001_neg.ksh
  93. +112 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_inherit/zfs_inherit_002_neg.ksh
  94. +102 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_inherit/zfs_inherit_003_pos.ksh
  95. +51 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/Makefile
  96. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/cleanup.ksh
  97. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/setup.ksh
  98. +39 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount.cfg
  99. +132 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount.kshlib
  100. +79 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_001_pos.ksh
  101. +90 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_002_pos.ksh
  102. +102 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_003_pos.ksh
  103. +95 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_004_pos.ksh
  104. +98 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_005_pos.ksh
  105. +136 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_006_pos.ksh
  106. +158 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_007_pos.ksh
  107. +108 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_008_pos.ksh
  108. +124 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_009_neg.ksh
  109. +83 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_010_neg.ksh
  110. +93 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_011_neg.ksh
  111. +195 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_mount/zfs_mount_all_001_pos.ksh
  112. +49 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/Makefile
  113. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/cleanup.ksh
  114. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/setup.ksh
  115. +43 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote.cfg
  116. +137 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote_001_pos.ksh
  117. +112 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote_002_pos.ksh
  118. +144 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote_003_pos.ksh
  119. +150 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote_004_pos.ksh
  120. +85 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote_005_pos.ksh
  121. +96 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote_006_neg.ksh
  122. +88 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote_007_neg.ksh
  123. +95 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote_008_pos.ksh
  124. +45 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_promote/zfs_promote_common.kshlib
  125. +46 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_property/Makefile
  126. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_property/cleanup.ksh
  127. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_property/setup.ksh
  128. +29 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_property/zfs_property.cfg
  129. +86 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_property/zfs_set_property_001_pos.ksh
  130. +51 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/Makefile
  131. +35 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/cleanup.ksh
  132. +37 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/setup.ksh
  133. +33 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive.cfg
  134. +188 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive_001_pos.ksh
  135. +120 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive_002_pos.ksh
  136. +105 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive_003_pos.ksh
  137. +121 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive_004_neg.ksh
  138. +111 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive_005_neg.ksh
  139. +120 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive_006_pos.ksh
  140. +96 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive_007_neg.ksh
  141. +160 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive_008_pos.ksh
  142. +130 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_receive/zfs_receive_009_neg.ksh
  143. +51 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/Makefile
  144. +41 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/cleanup.ksh
  145. +46 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/setup.ksh
  146. +38 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename.cfg
  147. +119 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename.kshlib
  148. +119 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_001_pos.ksh
  149. +102 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_002_pos.ksh
  150. +80 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_003_pos.ksh
  151. +123 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_004_neg.ksh
  152. +103 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_005_neg.ksh
  153. +90 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_006_pos.ksh
  154. +168 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_007_pos.ksh
  155. +106 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_008_pos.ksh
  156. +119 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_009_neg.ksh
  157. +91 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_010_neg.ksh
  158. +93 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_011_pos.ksh
  159. +79 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_012_neg.ksh
  160. +103 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rename/zfs_rename_013_pos.ksh
  161. +47 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_reservation/Makefile
  162. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_reservation/cleanup.ksh
  163. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_reservation/setup.ksh
  164. +29 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_reservation/zfs_reservation.cfg
  165. +75 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_reservation/zfs_reservation_001_pos.ksh
  166. +99 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_reservation/zfs_reservation_002_pos.ksh
  167. +47 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rollback/Makefile
  168. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rollback/cleanup.ksh
  169. +33 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rollback/setup.ksh
  170. +50 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rollback/zfs_rollback.cfg
  171. +179 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rollback/zfs_rollback_001_pos.ksh
  172. +80 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rollback/zfs_rollback_002_pos.ksh
  173. +96 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rollback/zfs_rollback_003_neg.ksh
  174. +98 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rollback/zfs_rollback_004_neg.ksh
  175. +302 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_rollback/zfs_rollback_common.kshlib
  176. +47 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_send/Makefile
  177. +35 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_send/cleanup.ksh
  178. +34 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_send/setup.ksh
  179. +33 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_send/zfs_send.cfg
  180. +138 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_send/zfs_send_001_pos.ksh
  181. +150 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_send/zfs_send_002_pos.ksh
  182. +81 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_send/zfs_send_003_pos.ksh
  183. +121 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_send/zfs_send_004_neg.ksh
  184. +57 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/Makefile
  185. +79 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/cache_001_pos.ksh
  186. +79 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/cache_002_neg.ksh
  187. +135 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/canmount_001_pos.ksh
  188. +168 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/canmount_002_pos.ksh
  189. +129 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/canmount_003_pos.ksh
  190. +111 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/canmount_004_pos.ksh
  191. +83 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/checksum_001_pos.ksh
  192. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/cleanup.ksh
  193. +79 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/compression_001_pos.ksh
  194. +110 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/mountpoint_001_pos.ksh
  195. +108 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/mountpoint_002_pos.ksh
  196. +114 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/mountpoint_003_pos.ksh
  197. +115 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/onoffs_001_pos.ksh
  198. +156 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/property_alias_001_pos.ksh
  199. +170 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/readonly_001_pos.ksh
  200. +114 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/reservation_001_neg.ksh
  201. +129 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/ro_props_001_pos.ksh
  202. +33 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/setup.ksh
  203. +76 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/share_mount_001_neg.ksh
  204. +124 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/snapdir_001_pos.ksh
  205. +81 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/user_property_001_pos.ksh
  206. +134 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/user_property_002_pos.ksh
  207. +79 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/user_property_003_neg.ksh
  208. +113 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/user_property_004_pos.ksh
  209. +107 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/version_001_neg.ksh
  210. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/zfs_set.cfg
  211. +91 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/zfs_set_001_neg.ksh
  212. +74 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/zfs_set_002_neg.ksh
  213. +89 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/zfs_set_003_neg.ksh
  214. +263 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_set/zfs_set_common.kshlib
  215. +50 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/Makefile
  216. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/cleanup.ksh
  217. +36 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/setup.ksh
  218. +32 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/zfs_share.cfg
  219. +161 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/zfs_share_001_pos.ksh
  220. +84 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/zfs_share_002_pos.ksh
  221. +122 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/zfs_share_003_pos.ksh
  222. +107 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/zfs_share_004_pos.ksh
  223. +95 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/zfs_share_005_pos.ksh
  224. +117 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/zfs_share_006_pos.ksh
  225. +97 −0 ZFS-Test_Suite/tests/functional/cli_root/zfs_share/zfs_share_007_neg.ksh
Sorry, we could not display the entire diff because too many files (507) changed.
View
72 ZFS-Test_Suite/tests/functional/cli_root/Makefile
@@ -0,0 +1,72 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)Makefile 1.6 09/06/22 SMI"
+#
+
+STF_ROOT_CONFIGURE=
+STF_USER_CONFIGURE=
+
+STF_ROOT_SETUP=
+STF_USER_SETUP=
+
+STF_ROOT_CLEANUP=
+STF_USER_CLEANUP=
+
+STF_ROOT_TESTCASES=
+STF_USER_TESTCASES=
+
+#
+# STF_BUILD_SUBDIRS and STF_EXECUTE_SUBDIRS should be
+# listed in the order returned by ls(1m)
+#
+STF_BUILD_SUBDIRS=zdb \
+ zfs zfs_send zfs_clone zfs_create zfs_copies zfs_destroy zfs_get \
+ zfs_inherit zfs_mount zfs_rename zfs_reservation \
+ zfs_receive zfs_rollback zfs_set zfs_share zfs_snapshot \
+ zfs_unmount zfs_unshare zfs_promote zfs_upgrade \
+ zpool zpool_add zpool_attach zpool_create zpool_clear \
+ zpool_destroy zpool_detach zpool_export zpool_import \
+ zpool_history zpool_offline zpool_online zpool_replace \
+ zpool_scrub zpool_status zpool_upgrade zpool_set zpool_get \
+ zpool_remove zpool_expand
+
+STF_EXECUTE_SUBDIRS=zdb \
+ zfs zfs_send zfs_clone zfs_create zfs_copies zfs_destroy zfs_get \
+ zfs_inherit zfs_mount zfs_rename zfs_reservation \
+ zfs_receive zfs_rollback zfs_set zfs_share zfs_snapshot \
+ zfs_unmount zfs_unshare zfs_promote zfs_upgrade \
+ zpool zpool_add zpool_attach zpool_create zpool_clear \
+ zpool_destroy zpool_detach zpool_export zpool_import \
+ zpool_history zpool_offline zpool_online zpool_replace \
+ zpool_scrub zpool_status zpool_upgrade zpool_set zpool_get \
+ zpool_remove zpool_expand
+
+STF_ENVFILES=cli.cfg
+STF_INCLUDES=cli_common.kshlib
+
+STF_DONTBUILDMODES=true
+
+include ${STF_TOOLS}/Makefiles/Makefile.master
View
32 ZFS-Test_Suite/tests/functional/cli_root/cleanup.ksh
@@ -0,0 +1,32 @@
+#!/usr/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)cleanup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+default_cleanup
View
53 ZFS-Test_Suite/tests/functional/cli_root/cli.cfg
@@ -0,0 +1,53 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)cli.cfg 1.3 08/08/15 SMI"
+#
+. $STF_SUITE/include/libtest.kshlib
+
+export ZFSROOT=
+
+export TESTSNAP=testsnap$$
+export TESTSNAP1=testsnap1$$
+export TESTSNAP2=testsnap2$$
+export TESTCLONE=testclone$$
+export TESTCLONE1=testclone1$$
+export TESTCLONE2=testclone2$$
+export TESTCLCT=testclct$$
+export TESTCTR=testctr$$
+export TESTCTR1=testctr1$$
+export TESTCTR2=testctr2$$
+export TESTVOL=testvol$$
+export TESTVOL1=testvol1$$
+export TESTVOL2=testvol2$$
+export TESTFILE0=testfile0.$$
+export TESTFILE1=testfile1.$$
+export TESTFILE2=testfile2.$$
+
+export LONGPNAME="poolname50charslong_012345678901234567890123456789"
+export LONGFSNAME="fsysname50charslong_012345678901234567890123456789"
+
+export VOLSIZE=150m
+export BIGVOLSIZE=1eb
View
88 ZFS-Test_Suite/tests/functional/cli_root/cli_common.kshlib
@@ -0,0 +1,88 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)cli_common.kshlib 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+#
+# Get the checksum and size of the file.
+#
+function get_cksum # <file path>
+{
+ return $($CKSUM $1 | $AWK '{print $1 $2}')
+}
+
+#
+# Compare the check sum of target files with the original file
+#
+
+function compare_cksum #<orig_data> <target_data1>...<target_datan>
+{
+ typeset orig_data=$1
+ typeset orig_sum=$(get_cksum $orig_data)
+ typeset target_sum=""
+ typeset bad_data_list=""
+ typeset -i bad_count=0
+
+ shift
+ for data in $@; do
+ if [[ ! -e $data ]]; then
+ bad_data_list="$bad_data_list $data"
+ (( bad_count +=1 ))
+ continue
+ fi
+
+ target_sum=$(get_cksum $data)
+ if [[ $target_sum != $orig_sum ]]; then
+ bad_data_list="$bad_data_list $data"
+ (( bad_count +=1 ))
+ fi
+ done
+
+ [[ $bad_data_list != "" ]] && \
+ log_fail "Data corruptions appear during send->receive." \
+ "There are total $bad_count corruptions. They are:\n"\
+ "$bad_data_list"
+}
+
+#
+# Check the received dataset exists or not
+#
+function receive_check #<dataset1>...<datasetn>
+{
+ typeset bad_rst_tgts=""
+
+ for dataset in $@; do
+ ! datasetexists $dataset && \
+ bad_rst_tgts="$bad_rst_tgts $dataset"
+ done
+
+ if [[ $bad_rst_tgts != "" ]]; then
+ log_fail "Restoring fails. The specified datasets"\
+ "$bad_rst_tgts are not being received."
+ fi
+}
View
34 ZFS-Test_Suite/tests/functional/cli_root/setup.ksh
@@ -0,0 +1,34 @@
+#!/usr/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)setup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+DISK=${DISKS%% *}
+
+default_setup $DISK
View
46 ZFS-Test_Suite/tests/functional/cli_root/zdb/Makefile
@@ -0,0 +1,46 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)Makefile 1.2 07/01/09 SMI"
+#
+
+STF_ROOT_CONFIGURE=
+STF_USER_CONFIGURE=
+
+STF_ROOT_SETUP=setup
+STF_USER_SETUP=
+
+STF_ROOT_CLEANUP=cleanup
+STF_USER_CLEANUP=
+
+STF_ROOT_TESTCASES=zdb_001_neg
+STF_USER_TESTCASES=
+
+STF_ENVFILES=zdb.cfg
+STF_INCLUDES=
+
+STF_DONTBUILDMODES=true
+
+include ${STF_TOOLS}/Makefiles/Makefile.master
View
32 ZFS-Test_Suite/tests/functional/cli_root/zdb/cleanup.ksh
@@ -0,0 +1,32 @@
+#!/usr/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)cleanup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+default_cleanup
View
34 ZFS-Test_Suite/tests/functional/cli_root/zdb/setup.ksh
@@ -0,0 +1,34 @@
+#!/usr/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)setup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+DISK=${DISKS%% *}
+
+default_setup $DISK
View
29 ZFS-Test_Suite/tests/functional/cli_root/zdb/zdb.cfg
@@ -0,0 +1,29 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zdb.cfg 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/tests/functional/cli_root/cli.cfg
View
84 ZFS-Test_Suite/tests/functional/cli_root/zdb/zdb_001_neg.ksh
@@ -0,0 +1,84 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zdb_001_neg.ksh 1.4 08/02/27 SMI"
+#
+. $STF_SUITE/include/libtest.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zdb_001_neg
+#
+# DESCRIPTION:
+# A badly formed parameter passed to zdb(1) should
+# return an error.
+#
+# STRATEGY:
+# 1. Create an array containg bad zdb parameters.
+# 2. For each element, execute the sub-command.
+# 3. Verify it returns an error.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2005-09-28)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+set -A args "create" "add" "destroy" "import fakepool" \
+ "export fakepool" "create fakepool" "add fakepool" \
+ "create mirror" "create raidz" \
+ "create mirror fakepool" "create raidz fakepool" \
+ "create raidz1 fakepool" "create raidz2 fakepool" \
+ "create fakepool mirror" "create fakepool raidz" \
+ "create fakepool raidz1" "create fakepool raidz2" \
+ "add fakepool mirror" "add fakepool raidz" \
+ "add fakepool raidz1" "add fakepool raidz2" \
+ "add mirror fakepool" "add raidz fakepool" \
+ "add raidz1 fakepool" "add raidz2 fakepool" \
+ "setvprop" "blah blah" "-%" "--?" "-*" "-=" \
+ "-a" "-f" "-g" "-h" "-j" "-k" "-m" "-n" "-o" "-p" "-p /tmp" \
+ "-q" "-r" "-t" "-w" "-x" "-y" "-z" \
+ "-A" "-D" "-E" "-F" "-G" "-H" "-I" "-J" "-K" "-M" \
+ "-N" "-P" "-Q" "-R" "-S" "-T" "-V" "-W" "-X" "-Y" "-Z"
+
+log_assert "Execute zdb using invalid parameters."
+
+typeset -i i=0
+while [[ $i -lt ${#args[*]} ]]; do
+ log_mustnot $ZDB ${args[i]}
+
+ ((i = i + 1))
+done
+
+log_pass "Badly formed zdb parameters fail as expected."
View
46 ZFS-Test_Suite/tests/functional/cli_root/zfs/Makefile
@@ -0,0 +1,46 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)Makefile 1.3 07/10/09 SMI"
+#
+
+STF_ROOT_CONFIGURE=
+STF_USER_CONFIGURE=
+
+STF_ROOT_SETUP=setup
+STF_USER_SETUP=
+
+STF_ROOT_CLEANUP=cleanup
+STF_USER_CLEANUP=
+
+STF_ROOT_TESTCASES=zfs_001_neg zfs_002_pos zfs_003_neg
+STF_USER_TESTCASES=
+
+STF_ENVFILES=zfs_malformed.cfg
+STF_INCLUDES=
+
+STF_DONTBUILDMODES=true
+
+include ${STF_TOOLS}/Makefiles/Makefile.master
View
32 ZFS-Test_Suite/tests/functional/cli_root/zfs/cleanup.ksh
@@ -0,0 +1,32 @@
+#!/usr/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)cleanup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+default_cleanup
View
34 ZFS-Test_Suite/tests/functional/cli_root/zfs/setup.ksh
@@ -0,0 +1,34 @@
+#!/usr/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)setup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+DISK=${DISKS%% *}
+
+default_setup $DISK
View
88 ZFS-Test_Suite/tests/functional/cli_root/zfs/zfs_001_neg.ksh
@@ -0,0 +1,88 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_001_neg.ksh 1.4 08/02/27 SMI"
+#
+. $STF_SUITE/include/libtest.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_001_neg
+#
+# DESCRIPTION:
+# Try each zfs(1) sub-command without parameters to make sure
+# it returns an error.
+#
+# STRATEGY:
+# 1. Create an array of parameters
+# 2. For each parameter in the array, execute the sub-command
+# 3. Verify an error is returned.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2005-07-04)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "both"
+
+
+set -A args "" "create" "create -s" "create -V" "create -s -V" \
+ "destroy" "destroy -f" "destroy -r" "destroy -R" "destroy -rRf" \
+ "snapshot" "snapshot -r" \
+ "rollback" "rollback -r" "rollback -R" "rollback -f" "rollback -rRf" \
+ "clone" "clone -p" "promote" "rename" "rename -p" "rename -r" "list blah" \
+ "set" "get" "get -rHp" "get -o" "get -s" \
+ "inherit" "inherit -r" "quota=" \
+ "set reservation=" "set atime=" "set checksum=" "set compression=" \
+ "set type=" "set creation=" "set used=" "set available=" "set referenced=" \
+ "set compressratio=" "set mounted=" "set origin=" "set quota=" \
+ "set reservation=" "set volsize=" " set volblocksize=" "set recordsize=" \
+ "set mountpoint=" "set devices=" "set exec=" "set setuid=" "set readonly=" \
+ "set zoned=" "set snapdir=" "set aclmode=" "set aclinherit=" \
+ "set quota=blah" "set reservation=blah" "set atime=blah" "set checksum=blah" \
+ "set compression=blah" \
+ "upgrade blah" "mount blah" "mount -o" \
+ "umount blah" "unmount" "unmount blah" "unmount -f" \
+ "share" "unshare" "send" "send -i" "receive" "receive -d" "receive -vnF" \
+ "recv" "recv -d" "recv -vnF" "allow" "unallow" \
+ "blah blah" "-%" "--" "--?" "-*" "-="
+
+log_assert "Badly-formed zfs sub-command should return an error."
+
+typeset -i i=0
+while (( $i < ${#args[*]} )); do
+ log_mustnot $ZFS ${args[i]}
+ ((i = i + 1))
+done
+
+log_pass "Badly formed zfs sub-commands fail as expected."
View
125 ZFS-Test_Suite/tests/functional/cli_root/zfs/zfs_002_pos.ksh
@@ -0,0 +1,125 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_002_pos.ksh 1.3 09/06/22 SMI"
+#
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/tests/functional/userquota/userquota_common.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_002_pos
+#
+# DESCRIPTION:
+# With ZFS_ABORT set, all zfs commands should be able to abort and generate a core file.
+#
+# STRATEGY:
+# 1. Create an array of zfs command
+# 2. Execute each command in the array
+# 3. Verify the command aborts and generate a core file
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2007-06-29)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "both"
+
+function cleanup
+{
+ unset ZFS_ABORT
+
+ if [[ -d $corepath ]]; then
+ $RM -rf $corepath
+ fi
+ for ds in $fs1 $fs $ctr; do
+ if datasetexists $ds; then
+ log_must $ZFS destroy -rRf $ds
+ fi
+ done
+}
+
+log_assert "With ZFS_ABORT set, all zfs commands can abort and generate a core file."
+log_onexit cleanup
+
+#preparation work for testing
+corepath=$TESTDIR/core
+if [[ -d $corepath ]]; then
+ $RM -rf $corepath
+fi
+log_must $MKDIR $corepath
+
+ctr=$TESTPOOL/$TESTCTR
+log_must $ZFS create $ctr
+
+fs=$ctr/$TESTFS
+fs1=$ctr/$TESTFS1
+snap=$fs@$TESTSNAP
+clone=$ctr/$TESTCLONE
+streamf=$corepath/s.$$
+
+set -A cmds "create $fs" "list $fs" "snapshot $snap" "set snapdir=hidden $fs" \
+ "get snapdir $fs" "rollback $snap" "inherit snapdir $fs" \
+ "rename $fs $fs-new" "rename $fs-new $fs" "unmount $fs" \
+ "mount $fs" "share $fs" "unshare $fs" "send $snap \>$streamf" \
+ "receive $fs1 \<$streamf" "clone $snap $clone" "promote $clone" \
+ "promote $fs" "destroy -rRf $fs"
+
+set -A badparams "" "create" "destroy" "snapshot" "rollback" "clone" "promote" "rename" \
+ "list -*" "set" "get -*" "inherit" "mount -A" "unmount" "share" \
+ "unshare" "send" "receive"
+
+if ! is_userquota_supported; then
+ typeset -i i=${cmds[#]}
+ cmds[i]="allow everyone snapshot $fs"
+ cmds[((i+1))]="unallow everyone snapshot $fs"
+
+ i=${badparams[#]}
+ badparams[i]="allow"
+ badparams[((i+1))]="unallow"
+fi
+
+
+log_must $COREADM -p ${corepath}/core.%f
+log_must export ZFS_ABORT=yes
+
+for subcmd in "${cmds[@]}" "${badparams[@]}"; do
+ log_mustnot $ZFS $subcmd
+ corefile=${corepath}/core.zfs
+ if [[ ! -e $corefile ]]; then
+ log_fail "$ZFS $subcmd cannot generate core file with ZFS_ABORT set."
+ fi
+ log_must $RM -f $corefile
+done
+
+log_pass "With ZFS_ABORT set, zfs command can abort and generate core file as expected."
View
75 ZFS-Test_Suite/tests/functional/cli_root/zfs/zfs_003_neg.ksh
@@ -0,0 +1,75 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_003_neg.ksh 1.1 07/10/09 SMI"
+#
+. $STF_SUITE/include/libtest.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_003_neg
+#
+# DESCRIPTION:
+# zfs command will failed with unexpected scenarios:
+# (1) ZFS_DEV cannot be opened
+# (2) MNTTAB cannot be opened
+#
+# STRATEGY:
+# 1. Create an array of zfs command
+# 2. Execute each command in the array
+# 3. Verify the command aborts and generate a core file
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2007-06-29)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+log_assert "zfs fails with unexpected scenarios."
+
+#verify zfs failed if ZFS_DEV cannot be opened
+ZFS_DEV=/dev/zfs
+MNTTAB=/etc/mnttab
+
+for file in $ZFS_DEV $MNTTAB; do
+ if [[ -e $file ]]; then
+ $MV $file ${file}.bak
+ fi
+ for cmd in "" "list" "get all" "mount"; do
+ log_mustnot eval "$ZFS $cmd >/dev/null 2>&1"
+ done
+ $MV ${file}.bak $file
+done
+
+log_pass "zfs fails with unexpected scenarios as expected."
View
29 ZFS-Test_Suite/tests/functional/cli_root/zfs/zfs_malformed.cfg
@@ -0,0 +1,29 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_malformed.cfg 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/tests/functional/cli_root/cli.cfg
View
50 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/Makefile
@@ -0,0 +1,50 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)Makefile 1.4 09/01/13 SMI"
+#
+
+STF_ROOT_CONFIGURE=
+STF_USER_CONFIGURE=
+
+STF_ROOT_SETUP=setup
+STF_USER_SETUP=
+
+STF_ROOT_CLEANUP=cleanup
+STF_USER_CLEANUP=
+
+STF_ROOT_TESTCASES=zfs_clone_001_neg zfs_clone_002_pos \
+ zfs_clone_003_pos zfs_clone_004_pos \
+ zfs_clone_005_pos zfs_clone_006_pos \
+ zfs_clone_007_pos zfs_clone_008_neg \
+ zfs_clone_009_neg
+
+STF_USER_TESTCASES=
+
+STF_ENVFILES=zfs_clone.cfg
+
+STF_DONTBUILDMODES=true
+
+include $(STF_TOOLS)/Makefiles/Makefile.master
View
32 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/cleanup.ksh
@@ -0,0 +1,32 @@
+#!/usr/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)cleanup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+default_container_cleanup
View
34 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/setup.ksh
@@ -0,0 +1,34 @@
+#!/usr/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)setup.ksh 1.2 07/01/09 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+
+DISK=${DISKS%% *}
+
+default_container_volume_setup ${DISK}
View
32 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone.cfg
@@ -0,0 +1,32 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_clone.cfg 1.3 07/07/31 SMI"
+#
+
+. $STF_SUITE/tests/functional/cli_root/cli.cfg
+
+export SNAPFS="$TESTPOOL/$TESTFS@$TESTSNAP"
+export SNAPFS1="$TESTPOOL/$TESTVOL@$TESTSNAP"
View
141 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_001_neg.ksh
@@ -0,0 +1,141 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_clone_001_neg.ksh 1.4 09/01/13 SMI"
+#
+. $STF_SUITE/include/libtest.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_clone_001_neg
+#
+# DESCRIPTION:
+# 'zfs clone' should fail with inapplicable scenarios, including:
+# * Null arguments
+# * non-existant snapshots.
+# * invalid characters in ZFS namesapec
+# * Leading slash in the target clone name
+# * The argument contains an empty component.
+# * The pool specified in the target doesn't exist.
+# * The parent dataset of the target doesn't exist.
+# * The argument refer to a pool, not dataset.
+# * The target clone already exists.
+# * Null target clone argument.
+# * Too many arguments.
+#
+# STRATEGY:
+# 1. Create an array of parameters
+# 2. For each parameter in the array, execute the sub-command
+# 3. Verify an error is returned.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2005-07-25)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "both"
+
+typeset target1=$TESTPOOL/$TESTFS1
+typeset target2=$TESTPOOL/$TESTCTR1/$TESTFS1
+typeset targets="$target1 $target2 $NONEXISTPOOLNAME/$TESTFS"
+
+set -A args "" \
+ "$TESTPOOL/$TESTFS@blah $target1" "$TESTPOOL/$TESTVOL@blah $target1" \
+ "$TESTPOOL/$TESTFS@blah* $target1" "$TESTPOOL/$TESTVOL@blah* $target1" \
+ "$SNAPFS $target1*" "$SNAPFS1 $target1*" \
+ "$SNAPFS /$target1" "$SNAPFS1 /$target1" \
+ "$SNAPFS $TESTPOOL//$TESTFS1" "$SNAPFS1 $TESTPOOL//$TESTFS1" \
+ "$SNAPFS $NONEXISTPOOLNAME/$TESTFS" "$SNAPFS1 $NONEXISTPOOLNAME/$TESTFS" \
+ "$SNAPFS" "$SNAPFS1" \
+ "$SNAPFS $target1 $target2" "$SNAPFS1 $target1 $target2"
+typeset -i argsnum=${#args[*]}
+typeset -i j=0
+while (( j < argsnum )); do
+ args[((argsnum+j))]="-p ${args[j]}"
+ ((j = j + 1))
+done
+
+set -A moreargs "$SNAPFS $target2" "$SNAPFS1 $target2" \
+ "$SNAPFS $TESTPOOL" "$SNAPFS1 $TESTPOOL" \
+ "$SNAPFS $TESTPOOL/$TESTCTR" "$SNAPFS $TESTPOOL/$TESTFS" \
+ "$SNAPFS1 $TESTPOOL/$TESTCTR" "$SNAPFS1 $TESTPOOL/$TESTFS"
+
+set -A args ${args[*]} ${moreargs[*]}
+
+function setup_all
+{
+ log_note "Create snapshots and mount them..."
+
+ for snap in $SNAPFS $SNAPFS1 ; do
+ if ! snapexists $snap ; then
+ log_must $ZFS snapshot $snap
+ fi
+ done
+
+ return 0
+}
+
+function cleanup_all
+{
+ typeset -i i=0
+
+ for fs in $targets; do
+
+ datasetexists $fs && \
+ log_must $ZFS destroy -f $fs
+
+ (( i = i + 1 ))
+ done
+
+ for snap in $SNAPFS $SNAPFS1 ; do
+ snapexists $snap && \
+ log_must $ZFS destroy -Rf $snap
+ done
+
+ return 0
+}
+
+log_assert "Badly-formed 'zfs clone' with inapplicable scenarios" \
+ "should return an error."
+log_onexit cleanup_all
+
+setup_all
+
+typeset -i i=0
+while (( i < ${#args[*]} )); do
+ log_mustnot $ZFS clone ${args[i]}
+ ((i = i + 1))
+done
+
+log_pass "Badly formed 'zfs clone' with inapplicable scenarios" \
+ "fail as expected."
View
104 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_002_pos.ksh
@@ -0,0 +1,104 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_clone_002_pos.ksh 1.2 09/01/13 SMI"
+#
+. $STF_SUITE/include/libtest.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_clone_002_pos
+#
+# DESCRIPTION:
+# 'zfs clone -p' should work as expected
+#
+# STRATEGY:
+# 1. prepare snapshots
+# 2. make sure without -p option, 'zfs clone' will fail
+# 3. with -p option, the clone can be created
+# 4. run 'zfs clone -p' again, the exit code should be zero
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2007-06-05)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+if ! $(check_opt_support "clone" "-p") ; then
+ log_unsupported "'zfs clone -p' is not supported yet."
+fi
+
+verify_runnable "both"
+
+function setup_all
+{
+ log_note "Create snapshots and mount them..."
+
+ for snap in $SNAPFS $SNAPFS1 ; do
+ if ! snapexists $snap ; then
+ log_must $ZFS snapshot $snap
+ fi
+ done
+
+ return 0
+}
+
+function cleanup_all
+{
+
+ if datasetexists $TESTPOOL/notexist ; then
+ log_must $ZFS destroy -rRf $TESTPOOL/notexist
+ fi
+
+ for snap in $SNAPFS $SNAPFS1 ; do
+ if snapexists $snap ; then
+ log_must $ZFS destroy -Rf $snap
+ fi
+ done
+
+ return 0
+}
+
+log_assert "clone -p should work as expected."
+log_onexit cleanup_all
+
+setup_all
+
+log_must verify_opt_p_ops "clone" "fs" $SNAPFS \
+ $TESTPOOL/notexist/new/clonefs$$
+
+if is_global_zone ; then
+ log_must verify_opt_p_ops "clone" "vol" $SNAPFS1 \
+ $TESTPOOL/notexist/new/clonevol$$
+fi
+
+log_pass "clone -p should work as expected."
View
97 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_003_pos.ksh
@@ -0,0 +1,97 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_clone_003_pos.ksh 1.1 09/01/13 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_create/zfs_create_common.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_create/properties.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_clone_003_pos
+#
+# DESCRIPTION:
+# 'zfs clone -o property=value filesystem' can successfully create a ZFS
+# clone filesystem with correct property set.
+#
+# STRATEGY:
+# 1. Create a ZFS clone filesystem in the storage pool with -o option
+# 2. Verify the filesystem created successfully
+# 3. Verify the property is correctly set
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2008-12-16)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "both"
+
+function cleanup
+{
+ if snapexists $SNAPFS ; then
+ log_must $ZFS destroy -Rf $SNAPFS
+ fi
+}
+
+if ! $(check_opt_support "clone" "-o") ; then
+ log_unsupported "'zfs clone -o' unsupported."
+fi
+
+log_onexit cleanup
+
+
+log_assert "'zfs clone -o property=value filesystem' can successfully create" \
+ "a ZFS clone filesystem with correct property set."
+
+log_must $ZFS snapshot $SNAPFS
+
+typeset -i i=0
+while (( $i < ${#RW_FS_PROP[*]} )); do
+ if [[ $WRAPPER == *"crypto"* ]] && \
+ [[ ${RW_FS_PROP[$i]} == *"checksum"* ]]; then
+ (( i = i + 1 ))
+ continue
+ fi
+ log_must $ZFS clone -o ${RW_FS_PROP[$i]} $SNAPFS $TESTPOOL/$TESTCLONE
+ datasetexists $TESTPOOL/$TESTCLONE || \
+ log_fail "zfs clone $TESTPOOL/$TESTCLONE fail."
+ propertycheck $TESTPOOL/$TESTCLONE ${RW_FS_PROP[i]} || \
+ log_fail "${RW_FS_PROP[i]} is failed to set."
+ log_must $ZFS destroy -f $TESTPOOL/$TESTCLONE
+ (( i = i + 1 ))
+done
+
+log_pass "'zfs clone -o property=value filesystem' can successfully create" \
+ "a ZFS clone filesystem with correct property set."
View
105 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_004_pos.ksh
@@ -0,0 +1,105 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_clone_004_pos.ksh 1.1 09/01/13 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_create/zfs_create_common.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_create/properties.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_clone_004_pos
+#
+# DESCRIPTION:
+# 'zfs clone -o property=value filesystem' can successfully create a ZFS
+# clone filesystem with multiple properties set.
+#
+# STRATEGY:
+# 1. Create a ZFS clone filesystem in the storage pool with multiple -o options
+# 2. Verify the filesystem created successfully
+# 3. Verify the properties are correctly set
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2008-12-16)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "both"
+
+function cleanup
+{
+ if snapexists $SNAPFS ; then
+ log_must $ZFS destroy -Rf $SNAPFS
+ fi
+}
+
+if ! $(check_opt_support "clone" "-o") ; then
+ log_unsupported "'zfs clone -o' unsupported."
+fi
+
+log_onexit cleanup
+
+log_assert "'zfs clone -o property=value filesystem' can successfully create" \
+ "a ZFS clone filesystem with multiple properties set."
+
+typeset -i i=0
+typeset opts=""
+
+log_must $ZFS snapshot $SNAPFS
+
+while (( $i < ${#RW_FS_PROP[*]} )); do
+ if [[ $WRAPPER != *"crypto"* ]] || \
+ [[ ${RW_FS_PROP[$i]} != *"checksum"* ]]; then
+ opts="$opts -o ${RW_FS_PROP[$i]}"
+ fi
+ (( i = i + 1 ))
+done
+
+log_must $ZFS clone $opts $SNAPFS $TESTPOOL/$TESTCLONE
+datasetexists $TESTPOOL/$TESTCLONE || \
+ log_fail "zfs create $TESTPOOL/$TESTCLONE fail."
+
+i=0
+while (( $i < ${#RW_FS_PROP[*]} )); do
+ if [[ $WRAPPER != *"crypto"* ]] || \
+ [[ ${RW_FS_PROP[$i]} != *"checksum"* ]]; then
+ propertycheck $TESTPOOL/$TESTCLONE ${RW_FS_PROP[i]} || \
+ log_fail "${RW_FS_PROP[i]} is failed to set."
+ fi
+ (( i = i + 1 ))
+done
+
+log_pass "'zfs clone -o property=value filesystem' can successfully create" \
+ "a ZFS clone filesystem with multiple properties set."
View
97 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_005_pos.ksh
@@ -0,0 +1,97 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_clone_005_pos.ksh 1.1 09/01/13 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_create/zfs_create_common.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_create/properties.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_clone_005_pos
+#
+# DESCRIPTION:
+# 'zfs clone -o property=value -V size volume' can successfully create a ZFS
+# clone volume with correct property set.
+#
+# STRATEGY:
+# 1. Create a ZFS clone volume in the storage pool with -o option
+# 2. Verify the volume created successfully
+# 3. Verify the property is correctly set
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2008-12-16)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+function cleanup
+{
+ if snapexists $SNAPFS1 ; then
+ log_must $ZFS destroy -Rf $SNAPFS1
+ fi
+}
+
+if ! $(check_opt_support "clone" "-o") ; then
+ log_unsupported "'zfs clone -o' unsupported."
+fi
+
+log_onexit cleanup
+
+log_assert "'zfs clone -o property=value -V size volume' can successfully" \
+ "create a ZFS clone volume with correct property set."
+
+log_must $ZFS snapshot $SNAPFS1
+typeset -i i=0
+while (( $i < ${#RW_VOL_CLONE_PROP[*]} )); do
+ if [[ $WRAPPER == *"crypto"* ]] && \
+ [[ ${RW_VOL_CLONE_PROP[$i]} == *"checksum"* ]]; then
+ (( i = i + 1 ))
+ continue
+ fi
+
+ log_must $ZFS clone -o ${RW_VOL_CLONE_PROP[$i]} $SNAPFS1 $TESTPOOL/$TESTCLONE
+ datasetexists $TESTPOOL/$TESTCLONE || \
+ log_fail "zfs clone $TESTPOOL/$TESTCLONE fail."
+ propertycheck $TESTPOOL/$TESTCLONE ${RW_VOL_CLONE_PROP[i]} || \
+ log_fail "${RW_VOL_CLONE_PROP[i]} is failed to set."
+ log_must $ZFS destroy -f $TESTPOOL/$TESTCLONE
+
+ (( i = i + 1 ))
+done
+
+log_pass "'zfs clone -o property=value volume' can successfully" \
+ "create a ZFS clone volume with correct property set."
View
103 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_006_pos.ksh
@@ -0,0 +1,103 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_clone_006_pos.ksh 1.1 09/01/13 SMI"
+#
+
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_create/zfs_create_common.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_create/properties.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_clone_006_pos
+#
+# DESCRIPTION:
+# 'zfs clone -o property=value volume' can successfully create a ZFS
+# clone volume with multiple properties set.
+#
+# STRATEGY:
+# 1. Create a ZFS clone volume in the storage pool with -o option
+# 2. Verify the volume created successfully
+# 3. Verify the properties are correctly set
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2008-12-16)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+verify_runnable "global"
+
+function cleanup
+{
+ if snapexists $SNAPFS1 ; then
+ log_must $ZFS destroy -Rf $SNAPFS1
+ fi
+}
+
+if ! $(check_opt_support "clone" "-o") ; then
+ log_unsupported "'zfs clone -o' unsupported."
+fi
+
+log_onexit cleanup
+
+log_assert "'zfs clone -o property=value volume' can successfully" \
+ "create a ZFS clone volume with multiple correct properties set."
+
+typeset -i i=0
+typeset opts=""
+
+log_must $ZFS snapshot $SNAPFS1
+
+while (( $i < ${#RW_VOL_CLONE_PROP[*]} )); do
+ if [[ $WRAPPER != *"crypto"* ]] || \
+ [[ ${RW_VOL_CLONE_PROP[$i]} != *"checksum"* ]]; then
+ opts="$opts -o ${RW_VOL_CLONE_PROP[$i]}"
+ fi
+ (( i = i + 1 ))
+done
+
+log_must $ZFS clone $opts $SNAPFS1 $TESTPOOL/$TESTCLONE
+
+i=0
+while (( $i < ${#RW_VOL_CLONE_PROP[*]} )); do
+ if [[ $WRAPPER != *"crypto"* ]] || \
+ [[ ${RW_VOL_CLONE_PROP[$i]} != *"checksum"* ]]; then
+ propertycheck $TESTPOOL/$TESTCLONE ${RW_VOL_CLONE_PROP[i]} || \
+ log_fail "${RW_VOL_CLONE_PROP[i]} is failed to set."
+ fi
+ (( i = i + 1 ))
+done
+
+log_pass "'zfs clone -o property=value volume' can successfully" \
+ "create a ZFS clone volume with multiple correct properties set."
View
104 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_007_pos.ksh
@@ -0,0 +1,104 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_clone_007_pos.ksh 1.1 09/01/13 SMI"
+#
+. $STF_SUITE/include/libtest.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_clone_007_pos
+#
+# DESCRIPTION:
+# 'zfs clone -o version=' could upgrade version, but downgrade is denied.
+#
+# STRATEGY:
+# 1. Create clone with "-o version=" specified
+# 2. Verify it succeed while upgrade, but fails while the version downgraded.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated
+#
+# CODING_STATUS: COMPLETED (2008-12-16)
+#
+# __stc_assertion_end
+#
+################################################################################
+
+if ! $(check_opt_support "upgrade") ; then
+ log_unsupported "'zfs upgrade' unsupported."
+fi
+
+if ! $(check_opt_support "clone" "-o") ; then
+ log_unsupported "'zfs clone -o' unsupported."
+fi
+
+ZFS_VERSION=$($ZFS upgrade | $HEAD -1 | $AWK '{print $NF}' \
+ | $SED -e 's/\.//g')
+
+verify_runnable "both"
+
+function cleanup
+{
+ if snapexists $SNAPFS ; then
+ log_must $ZFS destroy -Rf $SNAPFS
+ fi
+}
+
+log_onexit cleanup
+
+log_assert "'zfs clone -o version=' could upgrade version," \
+ "but downgrade is denied."
+
+log_must $ZFS snapshot $SNAPFS
+
+typeset -i ver
+
+if (( ZFS_TEST_VERSION == 0 )) ; then
+ (( ZFS_TEST_VERSION = ZFS_VERSION ))
+fi
+
+(( ver = ZFS_TEST_VERSION ))
+while (( ver <= ZFS_VERSION )); do
+ log_must $ZFS clone -o version=$ver $SNAPFS $TESTPOOL/$TESTCLONE
+ cleanup
+ (( ver = ver + 1 ))
+done
+
+(( ver = 0 ))
+while (( ver < ZFS_TEST_VERSION )); do
+ log_mustnot $ZFS clone -o version=$ver \
+ $SNAPFS $TESTPOOL/$TESTCLONE
+ log_mustnot datasetexists $TESTPOOL/$TESTCLONE
+ cleanup
+ (( ver = ver + 1 ))
+done
+
+log_pass "'zfs clone -o version=' could upgrade version," \
+ "but downgrade is denied."
View
95 ZFS-Test_Suite/tests/functional/cli_root/zfs_clone/zfs_clone_008_neg.ksh
@@ -0,0 +1,95 @@
+#!/bin/ksh -p
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)zfs_clone_008_neg.ksh 1.1 09/01/13 SMI"
+#
+. $STF_SUITE/include/libtest.kshlib
+. $STF_SUITE/tests/functional/cli_root/zfs_create/properties.kshlib
+
+################################################################################
+#
+# __stc_assertion_start
+#
+# ID: zfs_clone_008_neg
+#
+# DESCRIPTION:
+# 'zfs clone -o <filesystem>' fails with bad <filesystem> arguments, including:
+# *Same property set multiple times via '-o property=value'
+# *Volume's property set on filesystem
+#
+# STRATEGY:
+# 1. Create an array of <filesystem> arguments
+# 2. Execute 'zfs clone -o <filesystem>' with each argument
+# 3. Verify an error is returned.
+#
+# TESTABILITY: explicit
+#
+# TEST_AUTOMATION_LEVEL: automated