]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/workunits/cephtool/test.sh
import ceph quincy 17.2.1
[ceph.git] / ceph / qa / workunits / cephtool / test.sh
index 1b4af176693b6c9d419b0324df616b5e70e2eceb..bac102c089307b097fa16a6f92207fa65ed549cc 100755 (executable)
@@ -1426,11 +1426,20 @@ function test_mon_osd()
   ceph osd blocklist ls | grep $bl
   ceph osd blocklist rm $bl
   ceph osd blocklist ls | expect_false grep $bl
-  expect_false "ceph osd blocklist $bl/-1"
-  expect_false "ceph osd blocklist $bl/foo"
+  expect_false "ceph osd blocklist add $bl/-1"
+  expect_false "ceph osd blocklist add $bl/foo"
 
-  # test with wrong address
-  expect_false "ceph osd blocklist 1234.56.78.90/100"
+  # test with invalid address
+  expect_false "ceph osd blocklist add 1234.56.78.90/100"
+
+  # test range blocklisting
+  bl=192.168.0.1:0/24
+  ceph osd blocklist range add $bl
+  ceph osd blocklist ls | grep $bl
+  ceph osd blocklist range rm $bl
+  ceph osd blocklist ls | expect_false grep $bl
+  bad_bl=192.168.0.1/33
+  expect_false ceph osd blocklist range add $bad_bl
 
   # Test `clear`
   ceph osd blocklist add $bl