From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C7D1C433DB for ; Thu, 18 Mar 2021 09:32:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3A00564E20 for ; Thu, 18 Mar 2021 09:32:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3A00564E20 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=nouveau-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D75D96E8B6; Thu, 18 Mar 2021 09:32:19 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFFD26E8B6; Thu, 18 Mar 2021 09:32:18 +0000 (UTC) IronPort-SDR: jhGVQG9IimXlDdiWKZMZxEbEdwA4v0MQ1ZwxxNmjn6xxQ9xGECLIdZVOiUHr8C6bcU5dPE+05g A3psOGL5nb0Q== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="253651100" X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="253651100" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:32:18 -0700 IronPort-SDR: 5wOw0vHhyD07ij9hRqAUMaqD30S2wRdhY34ffLIumte3DIeEtQab4F9ll29my9aBuV0H2H4nmO YLwJXd+y81hg== X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="450419673" Received: from thrakatuluk.fi.intel.com (HELO thrakatuluk) ([10.237.68.154]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 02:32:16 -0700 Received: from platvala by thrakatuluk with local (Exim 4.94) (envelope-from ) id 1lMp1S-0001qy-0b; Thu, 18 Mar 2021 11:32:54 +0200 Date: Thu, 18 Mar 2021 11:32:54 +0200 From: Petri Latvala To: Lyude Message-ID: References: <20210317224949.448284-1-lyude@redhat.com> <20210317224949.448284-2-lyude@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210317224949.448284-2-lyude@redhat.com> X-Patchwork-Hint: comment Subject: Re: [Nouveau] [igt-dev] [PATCH i-g-t 1/7] lib/drmtest: Use igt_assert_eq() for do_or_die() X-BeenThere: nouveau@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Nouveau development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, nouveau@lists.freedesktop.org, Ben Skeggs Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: nouveau-bounces@lists.freedesktop.org Sender: "Nouveau" On Wed, Mar 17, 2021 at 06:49:43PM -0400, Lyude wrote: > From: Lyude Paul > > Noticed this while working on some nouveau tests, if we use igt_assert_eq() > here we'll output both the expected and returned value instead of just the > expected value. igt_assert_eq stuffs x into an int so there's one difference. Hmm, but generally do_or_die is used with ioctl() or something that wraps it and it will be an int. > > Signed-off-by: Lyude Paul > Cc: Martin Peres > Cc: Ben Skeggs > Cc: Jeremy Cline > --- > lib/drmtest.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/drmtest.h b/lib/drmtest.h > index d393dbf1..789452ea 100644 > --- a/lib/drmtest.h > +++ b/lib/drmtest.h > @@ -113,7 +113,7 @@ bool is_vc4_device(int fd); > * that in any failure case the return value is non-zero and a precise error is > * logged into errno. Uses igt_assert() internally. A minor cosmetic change to this comment (igt_assert usage) is welcome. Reviewed-by: Petri Latvala > */ > -#define do_or_die(x) igt_assert((x) == 0) > +#define do_or_die(x) igt_assert_eq((x), 0) > > /** > * do_ioctl: > -- > 2.29.2 > > _______________________________________________ > igt-dev mailing list > igt-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/igt-dev _______________________________________________ Nouveau mailing list Nouveau@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/nouveau