Skip to content

Commit 146e4d7

Browse files
bill-scalesaainscow
authored andcommitted
test: ceph_test_rados_io_sequence - scripting enhancements
Scripting enhancements for interactive mode - ignore lines begining with #, add a sleep command Signed-off-by: Bill Scales <[email protected]>
1 parent ae012cc commit 146e4d7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/osd/ceph_test_rados_io_sequence.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,10 @@ std::string ceph::io_sequence::tester::TestRunner::get_token(bool allow_eof) {
677677
}
678678
throw std::runtime_error("End of input");
679679
}
680+
if (line.starts_with('#')) {
681+
dout(0) << line << dendl;
682+
continue;
683+
}
680684
split = ceph::split(line);
681685
tokens = split.begin();
682686
}
@@ -767,6 +771,10 @@ bool ceph::io_sequence::tester::TestRunner::run_interactive_test() {
767771
const std::string op = get_token(true);
768772
if (op == "done" || op == "q" || op == "quit") {
769773
ioop = ceph::io_exerciser::DoneOp::generate();
774+
} else if (op == "sleep") {
775+
uint64_t duration = get_numeric_token();
776+
dout(0) << "Sleep " << duration << dendl;
777+
sleep(duration);
770778
} else if (op == "create") {
771779
ioop = ceph::io_exerciser::CreateOp::generate(get_numeric_token());
772780
} else if (op == "remove" || op == "delete") {

0 commit comments

Comments
 (0)