diff --git a/src/sysbench.c b/src/sysbench.c index c04f424..8fac030 100644 --- a/src/sysbench.c +++ b/src/sysbench.c @@ -925,6 +925,7 @@ static void *eventgen_thread_proc(void *arg) log_text(LOG_FATAL, "The event queue is full. This means the worker threads are " "unable to keep up with the specified event generation rate"); + sb_globals.error = 1; return NULL; } diff --git a/tests/t/opt_rate.t b/tests/t/opt_rate.t new file mode 100644 index 0000000..24448de --- /dev/null +++ b/tests/t/opt_rate.t @@ -0,0 +1,8 @@ +######################################################################## +Tests for the --rate option (aka the limited rate mode) +######################################################################## + +# Failing to deliver the requested rate should result in a non-zero exit code + $ sysbench --rate=2000000000 cpu run --verbosity=1 + FATAL: The event queue is full. This means the worker threads are unable to keep up with the specified event generation rate + [1]