From patchwork Mon Aug 5 22:49:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Gruenbacher X-Patchwork-Id: 11077845 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 8224415AC for ; Mon, 5 Aug 2019 22:49:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7027F28970 for ; Mon, 5 Aug 2019 22:49:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6192028988; Mon, 5 Aug 2019 22:49:33 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 011E028970 for ; Mon, 5 Aug 2019 22:49:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728483AbfHEWtc (ORCPT ); Mon, 5 Aug 2019 18:49:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55740 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727928AbfHEWtc (ORCPT ); Mon, 5 Aug 2019 18:49:32 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6601181F11 for ; Mon, 5 Aug 2019 22:49:32 +0000 (UTC) Received: from max.com (unknown [10.40.205.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9B95E52F2; Mon, 5 Aug 2019 22:49:31 +0000 (UTC) From: Andreas Gruenbacher To: fstests@vger.kernel.org Cc: Andreas Gruenbacher Subject: [PATCH] aio-dio-regress: code clarification Date: Tue, 6 Aug 2019 00:49:29 +0200 Message-Id: <20190805224929.25005-1-agruenba@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 05 Aug 2019 22:49:32 +0000 (UTC) Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In this test, FILE_SIZE is defined as 300 but that definition isn't used consistently. Make the code more obvious. (Used by generic/210.) Signed-off-by: Andreas Gruenbacher --- src/aio-dio-regress/aio-dio-subblock-eof-read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aio-dio-regress/aio-dio-subblock-eof-read.c b/src/aio-dio-regress/aio-dio-subblock-eof-read.c index 6f35b0e8..894965ea 100644 --- a/src/aio-dio-regress/aio-dio-subblock-eof-read.c +++ b/src/aio-dio-regress/aio-dio-subblock-eof-read.c @@ -63,7 +63,7 @@ main(int argc, char **argv) /* <1> use normal disk read, this should be ok */ ret = read(fd, buffer, 4096); if (ret != FILE_SIZE) - fail("buffered read returned %d, should be 300\n", ret); + fail("buffered read returned %d, should be %d\n", ret, FILE_SIZE); /* <2> use AIO disk read, it sees error. */ memset(&myiocb, 0, sizeof(myiocb)); @@ -89,7 +89,7 @@ main(int argc, char **argv) fail("io_getevents returned %d\n", ret); /* - * If all goes well, we should see 300 bytes read. If things + * If all goes well, we should see FILE_SIZE bytes read. If things * are broken, we may very well see a result of 4k. */ if (ie.res != FILE_SIZE)