From patchwork Mon Mar 4 15:30:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10837963 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6FB3A1515 for ; Mon, 4 Mar 2019 15:31:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5B2CE2A829 for ; Mon, 4 Mar 2019 15:31:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 598C62A7E8; Mon, 4 Mar 2019 15:31:02 +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 E9C102A7E8 for ; Mon, 4 Mar 2019 15:31:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1128689D39; Mon, 4 Mar 2019 15:31:01 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id 65CE589CF2; Mon, 4 Mar 2019 15:30:59 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id z39so5549418qtz.0; Mon, 04 Mar 2019 07:30:59 -0800 (PST) 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=ZkdpnZVYNfAgQAMKHbRqhoBfLwsCLPyfS6cPCpX/1KM=; b=trxJM3EawocjKaC5qXDuV3wwM8HPccjbt0Fi1Cvd9FnAb7aUhUIDUPkUe5PrQDb6Bl L5M9DfX7/qyA/tsgOHElfrIEOylErsLsjjRY0cgM8mbBq2fdUwTjxN4jLJcvbxR5X/hK uENnhcWrbeTP5DuSPX8rhzlT7ekHUudo4tbN3XFw49CwWWSaHHazIoIJP+qGJv1iCMKA l9cNHdTCnrFxK2mb+6q3GFI25Stqi8LzIyjNwrh2WuOoTjsuXipFE0G8sizmUNMTFuwd +q1tSQswT7HETtPFHAwhk3P7C4lBTdIcpiVbDQy9CSmeodm74ftIDcypudx74bvNFgpN 7U9A== X-Gm-Message-State: APjAAAWR01Nstnhk/28VI2RvvtfjiKNaHhrX0RwlB8/gdDr9pJpGVnDG 3qe0c5o7Su4RRvuME/UX4Kr2Y1yE X-Google-Smtp-Source: APXvYqz82/AJJ2yfiYi2HzThyaoADeeRrx+S+wisHyZF9zt+KNAYni1DZQbHjaq28zhT4Yn8aACTlw== X-Received: by 2002:a0c:b48a:: with SMTP id c10mr14247005qve.232.1551713458540; Mon, 04 Mar 2019 07:30:58 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id d63sm6270854qka.22.2019.03.04.07.30.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 04 Mar 2019 07:30:58 -0800 (PST) Date: Mon, 4 Mar 2019 12:30:55 -0300 From: Rodrigo Siqueira To: Petri Latvala , Arkadiusz Hiler Message-ID: <55bbf175b5fc0bee6927cb8de2853be2b4a9cd18.1551712108.git.rodrigosiqueiramelo@gmail.com> References: MIME-Version: 1.0 In-Reply-To: User-Agent: NeoMutt/20180716 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ZkdpnZVYNfAgQAMKHbRqhoBfLwsCLPyfS6cPCpX/1KM=; b=V53t1fBtyKV9MpmdEOmWrJGM/MRLnLS7+41oQ4jEIFzfEDfnF2Sp3KuVpfXAJfOuWo czOVY/ze5doE2g4dv4tEkbxnvYYZO0VvzkZOQn+v5VI15/eBvNRHC2LZlJdQfE1DvULQ c6LFYRS2IdZTwZbMdAVbJj9irntk6n0nBCmLUInRjHQsjcHCaQ8Pnz4Ypg6iW2OiBtPZ clWYE47gUBP8nNRKzDmG9T99XfB5rIIdECU59yFAZ5MIEpJB/p8TS3T5chd5lzsLHV4I J1OTIyuMzcSCSPViHxf5JtarKvI77a9t171aInrKNKbPCh4mltFwffa9HuAP7ZSMd+AM FNoA== Subject: [Intel-gfx] [PATCH i-g-t 4/7] kms_flip: Remove unreachable condition in wait_for_events 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 In the function wait_for_events() has a double check in the select() function return as described below: igt_assert_f(ret >= 0, "select error (errno %i)\n", errno); igt_assert_f(ret > 0, "select timed out or error (ret %d)\n", ret); Note that the second assert condition will not be reached because of the first assertion. This commit removes the code duplication and update the error message. Signed-off-by: Rodrigo Siqueira --- tests/kms_flip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 57138ec1..9ef77de9 100755 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1014,9 +1014,7 @@ static unsigned int wait_for_events(struct test_output *o) } while (ret < 0 && errno == EINTR); igt_assert_f(ret >= 0, - "select error (errno %i)\n", errno); - igt_assert_f(ret > 0, - "select timed out or error (ret %d)\n", ret); + "select error: %s (%d))\n", strerror(errno), ret); igt_assert_f(!FD_ISSET(0, &fds), "no fds active, breaking\n");