From patchwork Sun Oct 9 13:28:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugene Syromyatnikov X-Patchwork-Id: 9369099 X-Patchwork-Delegate: snitzer@redhat.com 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 B6AEF60487 for ; Mon, 10 Oct 2016 08:32:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A89E929325 for ; Mon, 10 Oct 2016 08:32:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D68B2933B; Mon, 10 Oct 2016 08:32:55 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2D1D729325 for ; Mon, 10 Oct 2016 08:32:55 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u9A8UZHf012947; Mon, 10 Oct 2016 04:30:35 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u99DSa3Y016521 for ; Sun, 9 Oct 2016 09:28:36 -0400 Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u99DSarc011616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 9 Oct 2016 09:28:36 -0400 Received: from mail-lf0-f68.google.com (mail-lf0-f68.google.com [209.85.215.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D4535335F85; Sun, 9 Oct 2016 13:28:34 +0000 (UTC) Received: by mail-lf0-f68.google.com with SMTP id b75so5442108lfg.3; Sun, 09 Oct 2016 06:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=j7aIAnKTS+9SXI3HT20sAi0hDysinnhMYLcSnd9rM1Y=; b=wDO0VoirykfFPnABIu9ROWa5F4rnuDJOGL9CuZI2st4zHWckF2K/yDQaQK2KML9egX 6dOArJ0dsIfglDbiYixd6dpvUjIDKZSm+ZbYzJkbwxp99qt/3iMolnDxYHTt9nIlFwGf Uq7o2mXAt3ZDmkz79d1OdX382fJqWjBlqZAO7FmWY8U6326G34hFzWKBzmKvUxiw8vM/ DOnmZ8aWY2YlP+u39gQ39tBS1Ie26YosMOhCtLjEwTtRBX4xZR+d7OhEOMJ7XzY/DVWg xCeRslNmBNXMnWfjvBl5eSY4n2xhzFmSPo7Czqmdbr9+MQDfHthg5Xxk9y1monvtHkcA Q8Dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=j7aIAnKTS+9SXI3HT20sAi0hDysinnhMYLcSnd9rM1Y=; b=CWoNHJHT1RzzPW78BjqVBkCftD3gH/ENyCXflqlUUml9uBs6a1Mr/qdAqE96xJqAK8 1nAob0hZ1G7RdKmG0FmHc455999Gs3TWl8ov7+DE3NO9R2pPNDGr2ZneY8Dg9HGSlctH EfbHDEjqMDHkp1euT0f4OmaMt1kqSqxkGa7gUa+JlYh+kFaF9oQLIrTf5ICH3PLF6zGl sgC8XjZUSLIh8sKlUR5mCS9VtSSi4Kjg+O6Le3MGB8tBeyIwcT5o3oiH4iSKWLwkwMp0 IjROkcn+Ki76tMEBCk+icNjBY9zwTm9/ehl1wkj55FIQM85jyq+9zbPM5BreM8wFrqtp 90xQ== X-Gm-Message-State: AA6/9RmHwVRmAmJUBBig9URKEGAzHpnGp8GqsK+lqfxbUcbx5LA7N+l5OKa5zDK0mtdfEA== X-Received: by 10.25.212.5 with SMTP id l5mr12631252lfg.73.1476019713108; Sun, 09 Oct 2016 06:28:33 -0700 (PDT) Received: from obsidian (broadband-46-188-15-144.2com.net. [46.188.15.144]) by smtp.gmail.com with ESMTPSA id e70sm5136720lji.30.2016.10.09.06.28.32 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sun, 09 Oct 2016 06:28:32 -0700 (PDT) Date: Sun, 9 Oct 2016 16:28:30 +0300 From: Eugene Syromyatnikov To: strace-devel@lists.sourceforge.net Message-ID: <20161009132830.GA1756@obsidian> References: <20161005.192828.566127461630656590.yamato@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161005.192828.566127461630656590.yamato@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sun, 09 Oct 2016 13:28:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sun, 09 Oct 2016 13:28:35 +0000 (UTC) for IP:'209.85.215.68' DOMAIN:'mail-lf0-f68.google.com' HELO:'mail-lf0-f68.google.com' FROM:'evgsyr@gmail.com' RCPT:'' X-RedHat-Spam-Score: 0.68 (BAYES_50, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.215.68 mail-lf0-f68.google.com 209.85.215.68 mail-lf0-f68.google.com X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Scanned-By: MIMEDefang 2.78 on 10.5.110.26 X-loop: dm-devel@redhat.com X-Mailman-Approved-At: Mon, 10 Oct 2016 04:29:54 -0400 Cc: dm-devel@redhat.com, mpatocka@redhat.com, yamato@redhat.com Subject: [dm-devel] [PATCH 01/21] tests/ioctl_dm: Formatting X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Virus-Scanned: ClamAV using ClamSMTP --- tests/ioctl_dm.c | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/tests/ioctl_dm.c b/tests/ioctl_dm.c index f4c3c8b..a5945ae 100644 --- a/tests/ioctl_dm.c +++ b/tests/ioctl_dm.c @@ -40,38 +40,66 @@ main(void) s.ioc.data_size = sizeof(s.ioc); s.ioc.data_start = 0; ioctl(-1, DM_VERSION, &s); - printf("ioctl(-1, DM_VERSION, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); + printf("ioctl(-1, DM_VERSION, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", flags=0}, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); init_s(); s.ioc.target_count = 1; s.u.ts.target_spec.sector_start = 0x10; s.u.ts.target_spec.length = 0x20; - s.u.ts.target_spec.next = sizeof(s.u.ts.target_spec) + sizeof(s.u.ts.target_params); + s.u.ts.target_spec.next = + sizeof(s.u.ts.target_spec) + sizeof(s.u.ts.target_params); strcpy(s.u.ts.target_spec.target_type, "tgt"); strcpy(s.u.ts.target_params, "tparams"); ioctl(-1, DM_TABLE_LOAD, &s); - printf("ioctl(-1, DM_TABLE_LOAD, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", target_count=1, flags=0, {sector_start=16, length=32, target_type=\"tgt\", string=\"tparams\"}}, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", target_count=1, flags=0, {sector_start=16, " + "length=32, target_type=\"tgt\", string=\"tparams\"}}, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); init_s(); s.u.tm.target_msg.sector = 0x1234; strcpy(s.u.tm.target_msg.message, "tmsg"); ioctl(-1, DM_TARGET_MSG, &s); - printf("ioctl(-1, DM_TARGET_MSG, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, {sector=4660, message=\"tmsg\"}}, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); + printf("ioctl(-1, DM_TARGET_MSG, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", flags=0, {sector=4660, message=\"tmsg\"}}, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); init_s(); strcpy(s.u.string, "10 20 30 40"); ioctl(-1, DM_DEV_SET_GEOMETRY, &s); - printf("ioctl(-1, DM_DEV_SET_GEOMETRY, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0, string=\"10 20 30 40\"}, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); + printf("ioctl(-1, DM_DEV_SET_GEOMETRY, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", flags=0, string=\"10 20 30 40\"}, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); init_s(); strcpy(s.u.string, "new-name"); ioctl(-1, DM_DEV_RENAME, &s); - printf("ioctl(-1, DM_DEV_RENAME, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", event_nr=0, flags=0, string=\"new-name\"}, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); + printf("ioctl(-1, DM_DEV_RENAME, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", event_nr=0, flags=0, string=\"new-name\"}, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); init_s(); s.ioc.target_count = -1U; ioctl(-1, DM_TABLE_LOAD, &s); - printf("ioctl(-1, DM_TABLE_LOAD, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", target_count=4294967295, flags=0, {sector_start=0, length=0, target_type=\"\", string=\"\"}, misplaced struct dm_target_spec}, {version=4.1.2, dev=makedev(18, 52), name=\"nnn\", uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); + printf("ioctl(-1, DM_TABLE_LOAD, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", target_count=4294967295, flags=0, " + "{sector_start=0, length=0, target_type=\"\", string=\"\"}, " + "misplaced struct dm_target_spec}, " + "{version=4.1.2, dev=makedev(18, 52), name=\"nnn\", " + "uuid=\"uuu\", flags=0}) = -1 EBADF (%m)\n"); puts("+++ exited with 0 +++"); return 0;