From patchwork Fri Aug 25 18:00:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Ekstrand X-Patchwork-Id: 9922649 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 2F462602BD for ; Fri, 25 Aug 2017 18:00:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E9E528414 for ; Fri, 25 Aug 2017 18:00:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 13B8128438; Fri, 25 Aug 2017 18:00:53 +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 B43F528414 for ; Fri, 25 Aug 2017 18:00:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 44BE96E8E5; Fri, 25 Aug 2017 18:00:52 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg0-x235.google.com (mail-pg0-x235.google.com [IPv6:2607:f8b0:400e:c05::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD0DE6E8DF for ; Fri, 25 Aug 2017 18:00:48 +0000 (UTC) Received: by mail-pg0-x235.google.com with SMTP id 83so2692619pgb.4 for ; Fri, 25 Aug 2017 11:00:48 -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=n1NE6Uv1ravfgJh06tj/zVTgZky8GxWpZ9Kc+uGO03j4K9itwfoXzxxB1MJ078lp3m OabQuuUA5yldRd8pFMbpRmQ2RfGybMBCreIzy8I8lCey4VgxiEyIEMMwDd6rVIvaCEq/ i7KSIZfNLb9eoy/tCB+7x7aOtK3zCYIe8ci5hPJy9QulLzreWO5iMw3EZLH42NKucQ9B T9Kg7ERZwoC8gQuUvAp2kmHdPVwFokOTW1ZaxTmTXzTdraPxEKBUz+Xk8wYMScLtq6Cx IrnygNx/XD7FIaAjnJFZJc6ipo3cyXXmScTkWqtuDKAbywh82nRwGcpSgYk4ljpY2ATX MfLQ== 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=IWzWLU8PrqVHUDDwZzGbG24eb8WI6x2er7wmaFes0HIBmXLFSDJFduIko4AyoRPlAK dtV5XKGszXizBXO+RrbYPIZSe1EOnp+krW849X/di2tbqm7zcAEWPtEvcfMT9r4IhtL+ Q1FMI/SQlcRPOsGjNbLYyl/Rs5Si21ZGYYdA9Q5pU0zfxc6+BiNqhRFU+L4JKpzaiBWT G2xWDlYzwDZMgtKuZceULd3l3TulIwEn5vfabEaGc6lv2ne7ZXn+P5jS60rKOs20wfdW iVXY3PVDwXSZyB5W59G5joKakvBuqMch3DP4VOhx2UnKUgajMRGkiKmYL5Hb3bBND0lB fGpQ== X-Gm-Message-State: AHYfb5hZiKbm8Bx2UNE3R/JVbIbxpojK46fMMCqO/l1+jCWuAVRDiAy0 pt25DfpKVg36tcXOb8ukpA== X-Received: by 10.99.180.78 with SMTP id n14mr10342110pgu.3.1503684048009; Fri, 25 Aug 2017 11:00:48 -0700 (PDT) Received: from omlet.jlekstrand.net (static-50-43-41-117.bvtn.or.frontiernet.net. [50.43.41.117]) by smtp.gmail.com with ESMTPSA id l22sm12517474pfj.138.2017.08.25.11.00.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Aug 2017 11:00:46 -0700 (PDT) From: Jason Ekstrand X-Google-Original-From: Jason Ekstrand To: intel-gfx@lists.freedesktop.org Date: Fri, 25 Aug 2017 11:00:37 -0700 Message-Id: <1503684037-32006-4-git-send-email-jason.ekstrand@intel.com> X-Mailer: git-send-email 2.5.0.400.gff86faf In-Reply-To: <1503684037-32006-1-git-send-email-jason.ekstrand@intel.com> References: <1503684037-32006-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);