@@ -36,7 +36,7 @@
#define FWTS_RESUME "FWTS_RESUME"
static int s3_multiple = 1; /* number of s3 multiple tests to run */
-static int s3_min_delay = 0; /* min time between resume and next suspend */
+static int s3_min_delay = 10; /* min time between resume and next suspend */
static int s3_max_delay = 30; /* max time between resume and next suspend */
static float s3_delay_delta = 0.5; /* amount to add to delay between each S3 tests */
static int s3_sleep_delay = 30; /* time between start of suspend and wakeup */
@@ -117,6 +117,7 @@ static int s3_do_suspend_resume(fwts_framework *fw,
if (s3_sleep_key) {
(void)fwts_exec(acpi_fakekey_sleep, &status);
+ sleep(s3_min_delay);
}
else
(void)fwts_exec(command, &status);
Unlike `pm-suspend` only returns to fwts when the suspending is completed, acpi_fakekey returns immediately after sending the keycode while the system is still in middle of suspending. So let fwts sleep for seconds of s3_min_delay after sending the keycode. Also increase s3_min_delay to 10 seconds. Signed-off-by: Keng-Yu Lin <kengyu@canonical.com> --- src/acpi/s3/s3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)