From patchwork Mon Aug 28 21:10:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Ekstrand X-Patchwork-Id: 9926173 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 9676960329 for ; Mon, 28 Aug 2017 21:11:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43DDB28803 for ; Mon, 28 Aug 2017 21:11:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DB0328801; Mon, 28 Aug 2017 21:11:09 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 68CED287C9 for ; Mon, 28 Aug 2017 21:11:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 850526E30E; Mon, 28 Aug 2017 21:10:26 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x22a.google.com (mail-pg0-x22a.google.com [IPv6:2607:f8b0:400e:c05::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF68D6E311 for ; Mon, 28 Aug 2017 21:10:23 +0000 (UTC) Received: by mail-pg0-x22a.google.com with SMTP id t3so4867813pgt.0 for ; Mon, 28 Aug 2017 14:10:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jlekstrand-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cEyIZs2TBGaya3TN5MgGNRxkzpVRskR2ze23yBpG0yQ=; b=arSHMJX8LPsZJzvyblqexBw4xBAXS7NOIP82z4JLMn/Qdi7h9wG4fJH/r/faYslUuu cM1H2ehChtYP70kkgjEQDJeZs9a9eG1ljaW+wTWSoCpTdALE/fWgOwd+0SWjjql1XEi1 /huTfMWiKPos4qskn4DrVkzv9U8t17IMTAZYqb+9qbAEiEL02f5If51WTEtsj2n0/ERZ nASU1sBt1cVCAOGIZQlweKP5bdEtgJAwUiqXZq7tE9Oqvj6MALvDjRJWhau/DHyRULoI GCVb1wl/9DDGFqBN1GfvZy54dj60ABrqZMewBRHbz/MVsSkArwT+4h2U6KTOKvmUgxmQ Ainw== 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=cEyIZs2TBGaya3TN5MgGNRxkzpVRskR2ze23yBpG0yQ=; b=m89AXAnG9yEBdZcPsB/Q2UtPwuPjyQVArFge3opZ7E9cJOWlJIJP2G+9JyLvzqs3zi SHTqQfyda4frfrgr6AEI3h6A0/IWCIMTcdqnjr7+8ZBMgXErHGx70XHluJJh//2dCM97 qh2ol/rrnHT86v+xvYQgZYTsLlMM9HB/oj5XAAFMd/71dhR7tlOQRU+UOCe/xDzLzcpz Wvy6QGhhtPvkScsLI96dZc5zcoalV64Px2WP9IrUX2ExVrFikbZAqdxfYl6MsbWIIUwk zZTb6mqVXHjT+97x/6qQ+ZXqD+FSJSvOD4Jy42+uQsiyrxre6MriNCksyGtC2PNO/M5Y M36A== X-Gm-Message-State: AHYfb5jUfUNDLbjSipTwLjnsd4+3s/G2fsGOlrpH364zPizax+5RIvOS DuXP/8y1WgDSOvPbpdjT1g== X-Received: by 10.98.69.206 with SMTP id n75mr1823305pfi.220.1503954622914; Mon, 28 Aug 2017 14:10:22 -0700 (PDT) Received: from omlet.ak.intel.com ([134.134.139.78]) by smtp.gmail.com with ESMTPSA id s74sm2155579pfi.32.2017.08.28.14.10.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Aug 2017 14:10:21 -0700 (PDT) From: Jason Ekstrand X-Google-Original-From: Jason Ekstrand To: intel-gfx@lists.freedesktop.org Date: Mon, 28 Aug 2017 14:10:15 -0700 Message-Id: <1503954615-26383-4-git-send-email-jason.ekstrand@intel.com> X-Mailer: git-send-email 2.5.0.400.gff86faf In-Reply-To: <1503954615-26383-1-git-send-email-jason.ekstrand@intel.com> References: <1503954615-26383-1-git-send-email-jason.ekstrand@intel.com> Cc: Jason Ekstrand Subject: [Intel-gfx] [PATCH i-g-t 4/4] syncobj: Add a test for SYNCOBJ_CREATE_SIGNALED X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP --- tests/syncobj_basic.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/syncobj_basic.c b/tests/syncobj_basic.c index 0a304f1..acc4a64 100644 --- a/tests/syncobj_basic.c +++ b/tests/syncobj_basic.c @@ -146,6 +146,16 @@ test_bad_create_flags(int fd) igt_assert(ret == -1 && errno == EINVAL); } +static void +test_create_signaled(int fd) +{ + uint32_t syncobj = syncobj_create(fd, LOCAL_SYNCOBJ_CREATE_SIGNALED); + + igt_assert_eq(syncobj_wait_err(fd, &syncobj, 1, 0, 0), 0); + + syncobj_destroy(fd, syncobj); +} + /* * currently don't do handle deduplication * test we get a different handle back. @@ -215,6 +225,9 @@ igt_main igt_subtest("bad-destroy-pad") test_bad_destroy_pad(fd); + igt_subtest("create-signaled") + test_create_signaled(fd); + igt_subtest("test-valid-cycle") test_valid_cycle(fd);