From patchwork Mon Jan 7 23:50:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 1021669 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="saPWJhpV"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43YXFp5TXnz9sD9 for ; Tue, 8 Jan 2019 10:50:37 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7DBAE84F76; Mon, 7 Jan 2019 23:50:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qner6a3t1qA8; Mon, 7 Jan 2019 23:50:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 4552586565; Mon, 7 Jan 2019 23:50:33 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C197C1C0C88 for ; Mon, 7 Jan 2019 23:50:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C049184AD8 for ; Mon, 7 Jan 2019 23:50:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rfBwXp-YKOpl for ; Mon, 7 Jan 2019 23:50:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by whitealder.osuosl.org (Postfix) with ESMTPS id F019684AFB for ; Mon, 7 Jan 2019 23:50:29 +0000 (UTC) Received: by mail-ed1-f43.google.com with SMTP id h50so2532630ede.5 for ; Mon, 07 Jan 2019 15:50:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=NexG2M3IX91zKW2TvuRRneuj84/14KJlvuDTBDkAgcM=; b=saPWJhpVkbgB42NgAxXSZlDAhp1THJ94n7S/J378Hni9NYRhcx+xXyyWWlhAJ9Qax4 qxleyBOvRos8cbkn0z+bgYtACuROp9K/NdBLMXnJSSgfdkP5e4tHvQfcxeV1PfFJjtn4 c4fTuu/BBqDGg5GtkDJMX5pF0uxrJ44g5+IjIESLk/SUmCCUFsgoxw0qZYWG3SHJi3WG 6/LQJYBYxLrdYlc1yIyZdKaceTtPUgTVnMOlTZbO9xxV33BJREUlrnZxDBncwBzxMxsN gLU6tBbxuJN5bDVx0CKbif9UDek1fE1n3wmXfKr1prxznt7w8k38Pde1g0R4fL5gcceV x4KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=NexG2M3IX91zKW2TvuRRneuj84/14KJlvuDTBDkAgcM=; b=OHv7237d+PMxOixOozvEVsM9ieRTRp02wcKZ339zi/bE+5A3tua0z1YPkqNBQuyCwC biQq2WiEn7/vdhiJCpg+ewZyfQ4ch8CHdaYL+5TyEAnBhY8AYLCvHoSgkOf68/IQhT1X IxXj9sDXEL5wH6mdfD5B+dXQO6fHHMNikRq9BvomK7Sow3txAgmZ7oSHGIEWblXR9WMw qAcWROLEtDC6U+bWP3Poy0aR0tb3JLwV474GbHeHFKFZIDdiJWPyiI0RwxeKeJNkQ6tq 1TfUfVRtEEVVG+y7BIl+mqam3GllZ1Jsofk4ClLYp98/nQVC0uPdk9+dfdBy6Cj1rrxb wc7A== X-Gm-Message-State: AJcUukfcYpN584nmLhTQ4wTs0gNopFWxRYnAASHNQA3zV2piOylKqyBV Jh+w+HGOAEWRIPX9/9jnDL8Gj4cD X-Google-Smtp-Source: ALg8bN7+tIh3uBCBTm5wqcY2LW375YPj6PBCpndIznMxyxqCBFhat2H+VaITljuafiHi1EeRxFle2Q== X-Received: by 2002:a50:ac81:: with SMTP id x1mr40767372edc.71.1546905027995; Mon, 07 Jan 2019 15:50:27 -0800 (PST) Received: from adeos.home (2a01cb000577e4007362e7db4e8430b1.ipv6.abo.wanadoo.fr. [2a01:cb00:577:e400:7362:e7db:4e84:30b1]) by smtp.gmail.com with ESMTPSA id u7-v6sm18330788ejb.65.2019.01.07.15.50.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 07 Jan 2019 15:50:27 -0800 (PST) From: Romain Naour To: buildroot@buildroot.org Date: Tue, 8 Jan 2019 00:50:24 +0100 Message-Id: <20190107235024.6819-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.14.5 Subject: [Buildroot] [WIP] support/testing: add xserver + Mesa OpenGL (GLX) + glxinfo X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , "Yann E. MORIN" , Thomas Petazzoni MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This test allow to check if the xserver with GLX is working properly. This is a basic test but it allow to trigger the current bug reported by [1]. [1] https://bugs.buildroot.org/show_bug.cgi?id=11591 Signed-off-by: Romain Naour Cc: "Yann E. MORIN" Cc: Thomas Petazzoni --- support/testing/tests/package/test_glxinfo.py | 57 +++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 support/testing/tests/package/test_glxinfo.py diff --git a/support/testing/tests/package/test_glxinfo.py b/support/testing/tests/package/test_glxinfo.py new file mode 100644 index 0000000000..d5d08f7a47 --- /dev/null +++ b/support/testing/tests/package/test_glxinfo.py @@ -0,0 +1,57 @@ +import os + +import infra.basetest + +GLXINFO_TIMEOUT = 120 + +class TestGlxinfo(infra.basetest.BRTest): + config = \ + """ + BR2_x86_core2=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y + BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y + BR2_TOOLCHAIN_EXTERNAL_URL="http://toolchains.bootlin.com/downloads/releases/toolchains/x86-core2/tarballs/x86-core2--glibc--bleeding-edge-2018.11-1.tar.bz2" + BR2_TOOLCHAIN_EXTERNAL_GCC_8=y + BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y + # BR2_TOOLCHAIN_EXTERNAL_LOCALE is not set + BR2_TOOLCHAIN_EXTERNAL_CXX=y + BR2_TOOLCHAIN_EXTERNAL_HAS_SSP=y + BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG=y + BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS=y + BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL=y + BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y + BR2_LINUX_KERNEL=y + BR2_LINUX_KERNEL_CUSTOM_VERSION=y + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.16.7" + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86/linux.config" + BR2_PACKAGE_MESA3D_DEMOS=y + BR2_PACKAGE_MESA3D=y + BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y + BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y + BR2_PACKAGE_XORG7=y + BR2_PACKAGE_XSERVER_XORG_SERVER=y + BR2_TARGET_GENERIC_GETTY_PORT="ttyS0" + BR2_TARGET_ROOTFS_EXT2=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def login(self): + img = os.path.join(self.builddir, "images", "rootfs.ext2") + kern = os.path.join(self.builddir, "images", "bzImage") + # glxinfo overallocate memory and the minimum that seemed to work was 512MB + self.emulator.boot(arch="i386", + kernel=kern, + kernel_cmdline=["root=/dev/vda console=ttyS0"], + options=["-M", "pc", "-m", "512", "-drive", "file={},if=virtio,format=raw".format(img)]) + self.emulator.login() + + def test_run(self): + self.login() + + # The test case verifies that the xserver with GLX is working + cmd = "glxinfo -display :0 2>&1 >/dev/null | grep Error" + # Error case: "Error: couldn't find RGB GLX visual or fbconfig" + _, exit_code = self.emulator.run(cmd, GLXINFO_TIMEOUT) + self.assertEqual(exit_code, 1)