]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test: ceph_test_rados_io_sequence - scripting enhancements
authorBill Scales <bill_scales@uk.ibm.com>
Wed, 11 Dec 2024 08:30:37 +0000 (08:30 +0000)
committerAlex Ainscow <aainscow@uk.ibm.com>
Wed, 5 Mar 2025 08:59:17 +0000 (08:59 +0000)
Scripting enhancements for interactive mode - ignore lines
begining with #, add a sleep command

Signed-off-by: Bill Scales <bill_scales@uk.ibm.com>
src/test/osd/ceph_test_rados_io_sequence.cc

index 0646ac0162cb1a13946d4cafbfdb1cb83ad2afe1..3212e399cca8b3b4269f2f3ad0a2da20597782cf 100644 (file)
@@ -677,6 +677,10 @@ std::string ceph::io_sequence::tester::TestRunner::get_token(bool allow_eof) {
       }
       throw std::runtime_error("End of input");
     }
+    if (line.starts_with('#')) {
+      dout(0) << line << dendl;
+      continue;
+    }
     split = ceph::split(line);
     tokens = split.begin();
   }
@@ -767,6 +771,10 @@ bool ceph::io_sequence::tester::TestRunner::run_interactive_test() {
     const std::string op = get_token(true);
     if (op == "done" || op == "q" || op == "quit") {
       ioop = ceph::io_exerciser::DoneOp::generate();
+    } else if (op == "sleep") {
+      uint64_t duration = get_numeric_token();
+      dout(0) << "Sleep " << duration << dendl;
+      sleep(duration);
     } else if (op == "create") {
       ioop = ceph::io_exerciser::CreateOp::generate(get_numeric_token());
     } else if (op == "remove" || op == "delete") {