From patchwork Sat Jul 7 23:24:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10512981 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 977DF600CA for ; Sat, 7 Jul 2018 23:24:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8851E288E1 for ; Sat, 7 Jul 2018 23:24:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B9CC288EA; Sat, 7 Jul 2018 23:24:45 +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 393F5288E1 for ; Sat, 7 Jul 2018 23:24:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ADF376E365; Sat, 7 Jul 2018 23:24:44 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A5526E365; Sat, 7 Jul 2018 23:24:43 +0000 (UTC) Received: by mail-qk0-x232.google.com with SMTP id u62-v6so8086911qkf.9; Sat, 07 Jul 2018 16:24:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FVOoTVsWAivfAEeM2PUrfg8VuIxRGdxVehqMtjFfOws=; b=LAa4RK33+vThR/MffO73wbGeyEA9wquWUrLehq9fd2AvLCYWgWhr8VKT/D1+HNpojG 7HGbgZVHc7fjeDDUznXdX7yQmg2RHnS7mEu+j4SJiF3nSaMlirYg42mabqWZCa76+tuN S3/TZ8DglXb5qiUad40oi5aU9QgyrdOXfLkZ4KNRSO7f+D1Id9N74Bo9mEGCdIVQN4aB bFMUKlCKMig8SlE0WorPmzl6KJPoY6/rzomnvJpOKo/H+1VSfd0QTFIPE3DsihS6kZbT wKMgoT3pgxX0oNbhLRdjpJInfrUr1TVf0FOKQYQRhO38AhTSQzkD4nzd7O63odlf7sty FSDg== X-Gm-Message-State: APt69E35HBwFCZGWvEuVDV1Ts2T7nFj1sCaWs4LhvhKmg1G0vqlpUTW7 jSHf6PwakDSJ3gk12VLp5z0= X-Google-Smtp-Source: AAOMgpfAxU3YMWNAH3dTAtqZIaCgEz7CUQ0x93AbEKJbqwc9Y0O6EGeJuOx23DibJaClEn6lxVca5g== X-Received: by 2002:a37:d93:: with SMTP id 141-v6mr12846262qkn.159.1531005882602; Sat, 07 Jul 2018 16:24:42 -0700 (PDT) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id x6-v6sm361757qkd.91.2018.07.07.16.24.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 07 Jul 2018 16:24:42 -0700 (PDT) Date: Sat, 7 Jul 2018 20:24:39 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180622 Subject: [Intel-gfx] [PATCH i-g-t 1/2] Increase the string size for a module name 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, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Some modules name are larger than 5 characters, this can be a problem to add support for other modules. This patch, increase the maximum size in order to enable other modules to use IGT. Signed-off-by: Rodrigo Siqueira --- lib/drmtest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/drmtest.c b/lib/drmtest.c index fae6f86f..eee733eb 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -60,6 +60,8 @@ #include "ioctl_wrappers.h" #include "igt_dummyload.h" +#define NAME_LEN 32 + /** * SECTION:drmtest * @short_description: Base library for drm tests and tools @@ -82,7 +84,7 @@ static int __get_drm_device_name(int fd, char *name) drm_version_t version; memset(&version, 0, sizeof(version)); - version.name_len = 4; + version.name_len = NAME_LEN; version.name = name; if (!drmIoctl(fd, DRM_IOCTL_VERSION, &version)){ @@ -94,7 +96,7 @@ static int __get_drm_device_name(int fd, char *name) static bool __is_device(int fd, const char *expect) { - char name[5] = ""; + char name[NAME_LEN] = ""; if (__get_drm_device_name(fd, name)) return false;