From owner-svn-src-stable@freebsd.org Fri Jun 2 14:37:36 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29204BF8E50; Fri, 2 Jun 2017 14:37:36 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-yb0-x22a.google.com (mail-yb0-x22a.google.com [IPv6:2607:f8b0:4002:c09::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DA19B64680; Fri, 2 Jun 2017 14:37:35 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-yb0-x22a.google.com with SMTP id 132so18313563ybq.1; Fri, 02 Jun 2017 07:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=yYc+zVIKowHh+A3pYZ231sOz6oyR9yzegvaHkAGny0o=; b=Nq+vGhcd/IzOco5gAoGCm7EP8HTy8+xLNm4qWDZAaI5IVlY2WnKd+8V0vNDec1/zei bhkmUVrHjAZbdGd2zrKHAARNjoe11lcNbhopn9IDcperq+rWqn3+9nvIkTwgzMs7WLk6 3978k9evwIfMjmo54EDvnM1a9hRWyc+v50Z5A0BQ4gPLM5rrsDSWYOooCRQGIPKtbKqm c98PgeUMoVn0Ca/JJIO5yzJXAapsdLxuNccrzCoYDy4GBMt6+xyH/5KXidQeZKBEn3vz Dj4/f2ndzZ+W4YUhb4fGmmth8BrCnDOGC0tdzrGb1Xc22kfGX09vuUHGqdanKS9+/inM /Y3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=yYc+zVIKowHh+A3pYZ231sOz6oyR9yzegvaHkAGny0o=; b=XyfpVCfPBqvc/w4KMpUyxnM+Sk4MQFZxRRIGKLKN+K8mxzW/MoqMbRKGb5nFuAWYrD J4RuI4pCtNdHYB7O5xddQoumm/n7LV1Oy9itQWmReOgnPvPnIuCLPxX2fEpp8s9pN71R 98ISdz10vMPDX3zDeYOSeLGOGo1nCADsBQ0xodY7A4keJpSrMtv670LNA2odCSwOoiWX BPIXlni6RATNiMvFsOfPulO2ugxI02MX3vROP6Mst6UZrX9JerSiV9PDS9/tH20XaQqT +3fHFkocefwhcWutO9BUvfVsE9guTmwm9JOO9cKs6PTrvWTRSVE1c+xj516I3tcI5+Jl z8kg== X-Gm-Message-State: AODbwcAT7s1AS0rwykaBsx7znPw56UC/899UsK9kGeArk7kJGMecmNMq 6YmLiixHkoeoDnzzKEisnOJa5Vo/odve X-Received: by 10.37.163.130 with SMTP id e2mr50407ybi.248.1496414254617; Fri, 02 Jun 2017 07:37:34 -0700 (PDT) MIME-Version: 1.0 Sender: asomers@gmail.com Received: by 10.13.206.199 with HTTP; Fri, 2 Jun 2017 07:37:34 -0700 (PDT) In-Reply-To: <20170602125001.GA44390@FreeBSD.org> References: <201705300309.v4U3911t053281@repo.freebsd.org> <20170602125001.GA44390@FreeBSD.org> From: Alan Somers Date: Fri, 2 Jun 2017 08:37:34 -0600 X-Google-Sender-Auth: KCiXm6_-_7vpKIlTiDdrGaBFI3A Message-ID: Subject: Re: svn commit: r319173 - stable/11/tests/sys/aio To: Glen Barber Cc: Ngie Cooper , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jun 2017 14:37:36 -0000 On Fri, Jun 2, 2017 at 6:50 AM, Glen Barber wrote: > On Tue, May 30, 2017 at 03:09:01AM +0000, Ngie Cooper wrote: >> Author: ngie >> Date: Tue May 30 03:09:01 2017 >> New Revision: 319173 >> URL: https://svnweb.freebsd.org/changeset/base/319173 >> >> Log: >> MFC r312913,r318100,r318107: >> >> r312913 (by asomers): >> >> Improve the aio tests >> >> * Add tests for aio_suspend(2). >> * Add tests for polled completion notification. >> * Test the full matrix of file descriptor types and completion notification >> mechanisms. >> * Don't bother with mkstemp, because ATF runs every test in its own temp dir. >> * Fix some typos. >> * Remove extraneous ATF_REQUIRE_KERNEL_MODULE calls. >> >> r318100: >> >> style(9): move function definition curly braces to column 0 >> >> r318107: >> >> Remove unused constant (PATH_TEMPLATE) >> >> It was made unnecessary in r312913. >> >> MFC with: r312913 >> >> Modified: >> stable/11/tests/sys/aio/aio_test.c >> Directory Properties: >> stable/11/ (props changed) >> >> Modified: stable/11/tests/sys/aio/aio_test.c >> ============================================================================== >> --- stable/11/tests/sys/aio/aio_test.c Tue May 30 03:05:22 2017 (r319172) >> +++ stable/11/tests/sys/aio/aio_test.c Tue May 30 03:09:01 2017 (r319173) >> @@ -33,7 +33,7 @@ >> * reading it from a second descriptor using AIO. For some targets, the same >> * fd is used for write and read (i.e., file, md device), but for others the >> * operation is performed on a peer (pty, socket, fifo, etc). A timeout is >> - * initiated to detect undo blocking. This test does not attempt to exercise >> + * initiated to detect undue blocking. This test does not attempt to exercise >> * error cases or more subtle asynchronous behavior, just make sure that the >> * basic operations work on some basic object types. >> */ >> @@ -63,8 +63,6 @@ >> #include "freebsd_test_suite/macros.h" >> #include "local.h" >> >> -#define PATH_TEMPLATE "aio.XXXXXXXXXX" >> - >> /* >> * GLOBAL_MAX sets the largest usable buffer size to be read and written, as >> * it sizes ac_buffer in the aio_context structure. It is also the default >> @@ -74,6 +72,13 @@ >> #define GLOBAL_MAX 16384 >> >> #define BUFFER_MAX GLOBAL_MAX >> + >> +/* >> + * A completion function will block until the aio has completed, then return >> + * the result of the aio. errno will be set appropriately. >> + */ >> +typedef ssize_t (*completion)(struct aiocb*); >> + >> struct aio_context { >> int ac_read_fd, ac_write_fd; >> long ac_seed; >> @@ -179,6 +184,48 @@ aio_context_init(struct aio_context *ac, int read_fd, >> ac->ac_cleanup_arg = cleanup_arg; >> } >> >> +static ssize_t >> +poll(struct aiocb *aio) >> +{ >> + int err; >> + >> + while ((err = aio_error(aio)) == EINPROGRESS && !aio_timedout) >> + usleep(25000); >> + switch (err) { >> + case EINPROGRESS: >> + errno = EINTR; >> + return (-1); >> + case 0: >> + return (aio_return(aio)); >> + default: >> + return (err); >> + } >> +} >> + > > This appears to have broken GCC builds. > > ===> tests/sys/aio (all) > cc1: warnings being treated as errors > /usr/src/tests/sys/aio/aio_test.c: In function 'poll': > /usr/src/tests/sys/aio/aio_test.c:190: warning: declaration of 'err' shadows a global declaration > /usr/obj/powerpc.powerpc/usr/src/tmp/usr/include/err.h:49: warning: shadowed declaration is here > /usr/src/tests/sys/aio/aio_test.c: In function 'suspend': > /usr/src/tests/sys/aio/aio_test.c:209: warning: declaration of 'err' shadows a global declaration > /usr/obj/powerpc.powerpc/usr/src/tmp/usr/include/err.h:49: warning: shadowed declaration is here > > Glen I think it needs an MFC of r312919 by rwatson. I'll take care of it. -Alan