From: Daniel Vetter Subject: [PATCH] tests/pm_psr_sink_crc: Fix longjmp fun Date: Fri, 13 Jun 2014 15:21:04 +0200 Message-ID: <1402665664-14885-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f179.google.com (mail-we0-f179.google.com [74.125.82.179]) by gabe.freedesktop.org (Postfix) with ESMTP id EBFE86EA23 for ; Fri, 13 Jun 2014 06:21:15 -0700 (PDT) Received: by mail-we0-f179.google.com with SMTP id w62so2756670wes.38 for ; Fri, 13 Jun 2014 06:21:14 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Intel Graphics Development Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org igt_fixture and igt_subtests use longjmp/setjmp internally, which means local variables at the same stack frame are at risk. Best practice is to move them out right in front of the igt_main block. It would be awesome if someone could come up with a cocci patch to auto-fix this, but unfortunately my attempts failed. Signed-off-by: Daniel Vetter --- tests/kms_psr_sink_crc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/kms_psr_sink_crc.c b/tests/kms_psr_sink_crc.c index a36ae6c1800f..e2de5a754eb4 100644 --- a/tests/kms_psr_sink_crc.c +++ b/tests/kms_psr_sink_crc.c @@ -587,11 +587,11 @@ static void run_test(data_t *data) } } +data_t data = {}; +enum tests test; + igt_main { - data_t data = {}; - enum tests test; - igt_skip_on_simulation(); igt_fixture { -- 2.0.0