From patchwork Mon Jun 25 17:36:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10487099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 73ED960230 for ; Mon, 25 Jun 2018 17:39:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5D910285B9 for ; Mon, 25 Jun 2018 17:39:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F0AF285C5; Mon, 25 Jun 2018 17:39:12 +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, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM, 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 03C92285B9 for ; Mon, 25 Jun 2018 17:39:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9BDDC6E090; Mon, 25 Jun 2018 17:38:56 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3120A6E36E for ; Mon, 25 Jun 2018 17:38:37 +0000 (UTC) Received: by mail-wr0-x234.google.com with SMTP id o9-v6so292881wrs.12 for ; Mon, 25 Jun 2018 10:38:37 -0700 (PDT) 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:in-reply-to :references; bh=r2wmfRaddZoXSQHmJqD2mmu+UP9iX1w72v5+N8eqLaM=; b=EkesJAxp7PJ3e3Kk2pIwcgki+2/Lrjw12zFeETUbENeyRQid8vGn4LLAtlFSet2WW2 dZSeDpZrf84pLMVsHAqczpMCSafQjNYciI2O4k5evUkoKNHphJQMRIcGZmKcUd71CoGw mxUsVUb9t7dT+OoYFl3kuCHWIuqLhZZiMVjsQtEqmy/KSVyiGCzuWs6ei5topZKELYwY FQ1MknJKdm2T7bMvQR4YyBUQ6P9qiUwpDtbC/aG/I8ENV9R6R2UTa/JAYwqNXzmQ3IFl e2AZSzro4whgQYBL+e0pIDxtwoI92sM2USzUxzqKyUsslNupRp4BN1xf2eJUzH56Wzg3 kDDg== X-Gm-Message-State: APt69E2Msj7neSdZTL7ghrVpkfKNkLZRG+IaMczlxFnkCVkRvc3KscLM YnUNvr/ujiMW6EMihleNHA//qg== X-Google-Smtp-Source: AAOMgpdOHU9rWTjiy/AE0DTIQMwNZK5XHK7hGcyOfI1sr//XTMZOgG//vZWC7i3SMtkGfZVRcJ181w== X-Received: by 2002:adf:b445:: with SMTP id v5-v6mr10599441wrd.67.1529948315650; Mon, 25 Jun 2018 10:38:35 -0700 (PDT) Received: from arch-x1c3.cbg.collabora.co.uk ([2a00:5f00:102:0:9665:9cff:feee:aa4d]) by smtp.gmail.com with ESMTPSA id p8-v6sm6581019wrq.70.2018.06.25.10.38.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 10:38:34 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 08/10] tests/drmdevice: add a couple of printf headers Date: Mon, 25 Jun 2018 18:36:24 +0100 Message-Id: <20180625173626.8046-8-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180625173626.8046-1-emil.l.velikov@gmail.com> References: <20180625173626.8046-1-emil.l.velikov@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emil.l.velikov@gmail.com MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov Add a few printf statements, which should make the output easier to parse. Signed-off-by: Emil Velikov --- tests/drmdevice.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/drmdevice.c b/tests/drmdevice.c index 9dd5098a..0d75836f 100644 --- a/tests/drmdevice.c +++ b/tests/drmdevice.c @@ -112,12 +112,15 @@ main(void) drmDevicePtr device; int fd, ret, max_devices; + printf("--- Checking the number of DRM device available ---\n"); max_devices = drmGetDevices2(0, NULL, 0); if (max_devices <= 0) { printf("drmGetDevices2() has returned %d\n", max_devices); return -1; } + printf("--- Devices reported %d ---\n", max_devices); + devices = calloc(max_devices, sizeof(drmDevicePtr)); if (devices == NULL) { @@ -125,6 +128,7 @@ main(void) return -1; } + printf("--- Retrieving devices information (PCI device revision is ignored) ---\n"); ret = drmGetDevices2(0, devices, max_devices); if (ret < 0) { printf("drmGetDevices2() returned an error %d\n", ret); @@ -137,13 +141,14 @@ main(void) for (int j = 0; j < DRM_NODE_MAX; j++) { if (devices[i]->available_nodes & 1 << j) { - printf("Opening device %d node %s\n", i, devices[i]->nodes[j]); + printf("--- Opening device node %s ---\n", devices[i]->nodes[j]); fd = open(devices[i]->nodes[j], O_RDONLY | O_CLOEXEC, 0); if (fd < 0) { printf("Failed - %s (%d)\n", strerror(errno), errno); continue; } + printf("--- Retrieving device info, for node %s ---\n", devices[i]->nodes[j]); if (drmGetDevice2(fd, DRM_DEVICE_GET_PCI_REVISION, &device) == 0) { print_device_info(device, i, true); drmFreeDevice(&device);