From patchwork Tue Aug 20 18:43:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Vivi X-Patchwork-Id: 2847286 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 80AF3BF546 for ; Tue, 20 Aug 2013 19:12:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2231E204D2 for ; Tue, 20 Aug 2013 19:12:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 0AE14204AE for ; Tue, 20 Aug 2013 19:12:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E66E4E7265 for ; Tue, 20 Aug 2013 12:12:04 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ye0-f179.google.com (mail-ye0-f179.google.com [209.85.213.179]) by gabe.freedesktop.org (Postfix) with ESMTP id B87F6E7135 for ; Tue, 20 Aug 2013 11:43:12 -0700 (PDT) Received: by mail-ye0-f179.google.com with SMTP id l10so180468yen.24 for ; Tue, 20 Aug 2013 11:43:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=zzEnkiIgAqlcSXDhnfZVubKl2GNmnc2NFYzdj9uTPDA=; b=l+yzRWExdbnyq4nFpMQWkZYWOnJ5zoV964gNj/x+VePRxEeenclvQHbmDrr6/493o4 /9INDKicJ/GEZaYLy7AXAfcUk/y9BbW1ZEN5ZER5B+L/OiJUxoUl+21E38mYuNMG86RA MYoG0XgB4kAHqn3apEL+HbMu6/eQ93iMs+bOjcE3pFo3B/C/SdKvwmBbs/4tEO1TFyvS cpvAJkMzG192YuygiWsPtAXmkcLAU1VILkrVuy8TYsybjKE8Ddv1emIxhAmdEZJaYQuZ yFHDTVbFXGuhQVg1uWDIvMG22rruSD3IV0p1dNxhRjgEppq2mkg4adGOMJlEamxCcn9j bIFg== X-Received: by 10.236.77.34 with SMTP id c22mr354852yhe.156.1377024192175; Tue, 20 Aug 2013 11:43:12 -0700 (PDT) Received: from localhost.localdomain ([189.40.72.108]) by mx.google.com with ESMTPSA id u52sm3083975yhg.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 20 Aug 2013 11:43:11 -0700 (PDT) From: Rodrigo Vivi To: intel-gfx@lists.freedesktop.org Date: Tue, 20 Aug 2013 15:43:05 -0300 Message-Id: <1377024185-18380-1-git-send-email-rodrigo.vivi@gmail.com> X-Mailer: git-send-email 1.8.1.4 Subject: [Intel-gfx] [PATCH] tests: ddx_intel_after_fbdev loads intel ddx after fbdev was loaded. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Rodrigo Vivi --- tests/Makefile.am | 1 + tests/ddx_intel_after_fbdev | 73 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100755 tests/ddx_intel_after_fbdev diff --git a/tests/Makefile.am b/tests/Makefile.am index 9e46cac..cce75ee 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -127,6 +127,7 @@ TESTS_scripts = \ sysfs_l3_parity \ test_rte_check \ tools_test \ + ddx_intel_after_fbdev \ ZZ_hangman \ $(NULL) diff --git a/tests/ddx_intel_after_fbdev b/tests/ddx_intel_after_fbdev new file mode 100755 index 0000000..bcd2c29 --- /dev/null +++ b/tests/ddx_intel_after_fbdev @@ -0,0 +1,73 @@ +#!/bin/bash +# +# Testcase: Load Intel DDX after fbdev was loaded +# + +whoami | grep -q root || { + echo "ERROR: not running as root" + exit 1 +} + +# no other X session should be running +find /tmp/ -name .X*lock 2>/dev/null | grep -q X && { + echo "ERROR: X session already running" + exit 1 +} + +TMPDIR=$(mktemp -d /tmp/igt.XXXX) || { + echo "ERROR: Failed to create temp dir" + exit 1 +} + +cat > $TMPDIR/xorg.conf.fbdev << EOF +Section "Device" + Driver "fbdev" + Identifier "Device[fbdev]" +EndSection +EOF + +cat > $TMPDIR/xorg.conf.intel << EOF +Section "Device" + Driver "intel" + Identifier "Device[intel]" +EndSection +EOF + +# log before fbdev +dmesg -c > $TMPDIR/dmesg.1.before.fbdev +cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.1.before.fbdev + +# run fbdev +xinit -- /usr/bin/X -config $TMPDIR/xorg.conf.fbdev & +sleep 5 +if [ -f `which intel_reg_dumper` ]; then +`which intel_reg_dumper` > $TMPDIR/intel_reg_dumped.1.fbdev +fi +killall X + +# log after fbdev & before intel +dmesg -c > $TMPDIR/dmesg.2.after.fbdev.before.intel +cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.2.after.fbdev.before.intel + +sleep 5 + +# run intel +xinit -- /usr/bin/X -config $TMPDIR/xorg.conf.intel & +sleep 5 +if [ -f `which intel_reg_dumper` ]; then +`which intel_reg_dumper` > $TMPDIR/intel_reg_dumped.2.intel +fi +killall X + +# log after intel +dmesg -c > $TMPDIR/dmesg.3.after.intel +cp /var/log/Xorg.0.log $TMPDIR/Xorg.0.log.3.after.intel + +cp $0 $TMPDIR/ + +tar czf $TMPDIR.tar.gz $TMPDIR/* +if [ -f $TMPDIR.tar.gz ]; then + echo $TMPDIR.tar.gz contains this script, all configs and logs generated on this tests +fi + +exit 0