From: Alison Schofield <alison.schofi...@intel.com> monitor.sh runs for 50 seconds and spends 48 of those seconds sleeping. Removing the sleeps entirely has no effect on the test in this users environment. It passes and produces the same test log.
Experiments replacing sleeps with polling for monitor ready and log file updates proved that both are always available following the sync so there is no need to replace the sleeps with a more precise or reliable polling method. Simply remove the sleeps. Run time is now < 3s. I'd especially like to get Tested-by tags on this one to confirm that my environment isn't special and that this succeeds elsewhere. Signed-off-by: Alison Schofield <alison.schofi...@intel.com> --- test/monitor.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/monitor.sh b/test/monitor.sh index be8e24d6f3aa..88e253e5df00 100755 --- a/test/monitor.sh +++ b/test/monitor.sh @@ -26,7 +26,7 @@ start_monitor() logfile=$(mktemp) $NDCTL monitor -c "$monitor_conf" -l "$logfile" $1 & monitor_pid=$! - sync; sleep 3 + sync truncate --size 0 "$logfile" #remove startup log } @@ -49,13 +49,13 @@ get_monitor_dimm() call_notify() { "$TEST_PATH"/smart-notify "$smart_supported_bus" - sync; sleep 3 + sync } inject_smart() { $NDCTL inject-smart "$monitor_dimms" $1 - sync; sleep 3 + sync } check_result() -- 2.37.3