From patchwork Tue Aug 7 16:58:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 10558939 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2786F139A for ; Tue, 7 Aug 2018 16:58:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 143DF2A5B7 for ; Tue, 7 Aug 2018 16:58:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08C8E2A5EF; Tue, 7 Aug 2018 16:58:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B57552A5B7 for ; Tue, 7 Aug 2018 16:58:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9C1A6E40E; Tue, 7 Aug 2018 16:58:29 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id B359E89DC5; Tue, 7 Aug 2018 16:58:27 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from haswell.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 12687109-1500050 for multiple; Tue, 07 Aug 2018 17:58:22 +0100 From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Tue, 7 Aug 2018 17:58:21 +0100 Message-Id: <20180807165821.24254-1-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180807074358.4439-1-chris@chris-wilson.co.uk> References: <20180807074358.4439-1-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [PATCH i-g-t] igt/pm_rpm: Test incomplete(debug) suspends vs rpm X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Check that we restore runtime pm around debug suspends and hibernates. v2: Differentiate between external test setup failure and one of interest Signed-off-by: Chris Wilson --- tests/pm_rpm.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/pm_rpm.c b/tests/pm_rpm.c index 4268bb19a..1fbdda4ed 100644 --- a/tests/pm_rpm.c +++ b/tests/pm_rpm.c @@ -707,8 +707,10 @@ static void setup_environment(void) igt_info("Runtime PM support: %d\n", has_runtime_pm); igt_info("PC8 residency support: %d\n", has_pc8); - igt_require(has_runtime_pm); + + disable_all_screens(&ms_data); + igt_require(wait_for_suspended()); } static void restore_environment(void) @@ -1372,10 +1374,11 @@ static void __attribute__((noreturn)) stay_subtest(void) sleep(600); } -static void system_suspend_subtest(void) +static void system_suspend_subtest(int state, int debug) { disable_all_screens_and_wait(&ms_data); - igt_system_suspend_autoresume(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE); + + igt_system_suspend_autoresume(state, debug); igt_assert(wait_for_suspended()); } @@ -1992,12 +1995,19 @@ int main(int argc, char *argv[]) WAIT_STATUS | WAIT_EXTRA); /* System suspend */ + igt_subtest("system-suspend-devices") + system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_DEVICES); igt_subtest("system-suspend") - system_suspend_subtest(); + system_suspend_subtest(SUSPEND_STATE_MEM, SUSPEND_TEST_NONE); igt_subtest("system-suspend-execbuf") system_suspend_execbuf_subtest(); igt_subtest("system-suspend-modeset") system_suspend_modeset_subtest(); + igt_subtest("system-hibernate-devices") + system_suspend_subtest(SUSPEND_STATE_DISK, + SUSPEND_TEST_DEVICES); + igt_subtest("system-hibernate") + system_suspend_subtest(SUSPEND_STATE_DISK, SUSPEND_TEST_NONE); /* GEM stress */ igt_subtest("gem-execbuf-stress")