[{"id":1766491,"web_url":"http://patchwork.ozlabs.org/comment/1766491/","msgid":"<CAA1+qONzgG_YZt1ucgn59aTxXiCdyzKGpxs2DAedrS_FG_CuBQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-11T19:59:24","subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command not\n\tfound","submitter":{"id":71978,"url":"http://patchwork.ozlabs.org/api/people/71978/","name":"Mark Michelson","email":"mmichels@redhat.com"},"content":"On Mon, Sep 11, 2017 at 2:37 PM Alin Gabriel Serdean <aserdean@ovn.org>\nwrote:\n\n> Test: \"testing ovn -- ensure one gw controller restart in HA doesn't\n> bounce the master\" uses the command `truncate`.\n>\n> Skip the test if the command is not found.\n>\n>\nThe use of the truncate command here is to make the file 0 bytes. Rather\nthan skipping the test if the truncate command is not present, the test\ncould be altered to make the file 0 bytes in some other way.\n\n# dd if=/dev/null of=gw1/ovn-controller.log\n# > gw1-controller.log\n# rm gw1-controller.log && touch gw1/ovn-controller.log\n\nAre potential ways of expressing the same thing without needing to use\ntruncate.\n\n\n> Signed-off-by: Alin Gabriel Serdean <aserdean@ovn.org>\n> ---\n>  tests/ovn.at | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/tests/ovn.at b/tests/ovn.at\n> index f203529..4563964 100644\n> --- a/tests/ovn.at\n> +++ b/tests/ovn.at\n> @@ -8432,6 +8432,7 @@ AT_CLEANUP\n>\n>  AT_SETUP([ovn -- ensure one gw controller restart in HA doesn't bounce\n> the master])\n>  AT_SKIP_IF([test $HAVE_PYTHON = no])\n> +AT_SKIP_IF([!(test -x \"$(command -v truncate)\")])\n>  ovn_start\n>\n>  net_add n1\n> --\n> 2.10.2.windows.1\n>\n> _______________________________________________\n> dev mailing list\n> dev@openvswitch.org\n> https://mail.openvswitch.org/mailman/listinfo/ovs-dev\n>","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrf0C4l4Mz9s0Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 05:59:39 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id ABE55BFA;\n\tMon, 11 Sep 2017 19:59:36 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 0E116BB3\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 19:59:36 +0000 (UTC)","from mail-it0-f52.google.com (mail-it0-f52.google.com\n\t[209.85.214.52])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 845B642F\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 19:59:35 +0000 (UTC)","by mail-it0-f52.google.com with SMTP id r131so8501846itc.1\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 12:59:35 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to;\n\tbh=+AwG7KW2QVr2hbALocinjjsLVqiSodo4bOU4U5GKayo=;\n\tb=Ckd/M5mP+HPzBSLJ1Gux75+Xac5covr8oJnsGXUWwTS1EJXhbtZNOSW1XmJW/x5VBp\n\tSgEsnWNtQ8KrKxFcUjX+27kFG2UZmHdEIvea3c9AWzcBWaAmqysE2KUEF+0gJvXFjmdB\n\t6UZq2g2nZ9esm2uA9kQGN9w+xliOlZyfmhr8PnoerhS00l+gwIqV4JenwWXpYjscpYNX\n\tvILRLGYaxEINcZ0+WLfLVuIFsgxCdliI/lF6S/cpvZo+q1Ey4nUvQ3q1a1O/Wt+SNBgU\n\thV+Y75oFnK+ts5LYr/qBIOwK8GhhCV8GFxUQ3WeFfJKsyS2Br9IM+IloC97/ayC35tVJ\n\tozrA==","X-Gm-Message-State":"AHPjjUhFp2l2iOF5zoxbFrxjCA2dUcMs1mYXLMNYrnYpNothk4xqBK7n\n\tSmhjIS+lSwmzLRoAZIkPOq4UvHJPt/6W","X-Google-Smtp-Source":"AOwi7QCIu6rY2lSHM42+QYcwsHvHdAwwLohm9IR6LKNcR3/VMHPueyPfO64ac9ALWO2Ww0voNkBpwNriZ7ThiM2MFs0=","X-Received":"by 10.36.238.6 with SMTP id b6mr16323769iti.113.1505159974931;\n\tMon, 11 Sep 2017 12:59:34 -0700 (PDT)","MIME-Version":"1.0","References":"<20170911193711.8532-1-aserdean@ovn.org>","In-Reply-To":"<20170911193711.8532-1-aserdean@ovn.org>","From":"Mark Michelson <mmichels@redhat.com>","Date":"Mon, 11 Sep 2017 19:59:24 +0000","Message-ID":"<CAA1+qONzgG_YZt1ucgn59aTxXiCdyzKGpxs2DAedrS_FG_CuBQ@mail.gmail.com>","To":"Alin Gabriel Serdean <aserdean@ovn.org>, dev@openvswitch.org","X-Spam-Status":"No, score=0.5 required=5.0 tests=HTML_MESSAGE,\n\tRCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","X-Content-Filtered-By":"Mailman/MimeDel 2.1.12","Subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command not\n\tfound","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1766494,"web_url":"http://patchwork.ozlabs.org/comment/1766494/","msgid":"<CAA1+qOM0JNVqScJnbZ-_y3L0gChV9=+kC3N1hVczz+B+adw0vQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-11T20:05:24","subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command not\n\tfound","submitter":{"id":71978,"url":"http://patchwork.ozlabs.org/api/people/71978/","name":"Mark Michelson","email":"mmichels@redhat.com"},"content":"On Mon, Sep 11, 2017 at 2:59 PM Mark Michelson <mmichels@redhat.com> wrote:\n\n> On Mon, Sep 11, 2017 at 2:37 PM Alin Gabriel Serdean <aserdean@ovn.org>\n> wrote:\n>\n>> Test: \"testing ovn -- ensure one gw controller restart in HA doesn't\n>> bounce the master\" uses the command `truncate`.\n>>\n>> Skip the test if the command is not found.\n>>\n>>\n> The use of the truncate command here is to make the file 0 bytes. Rather\n> than skipping the test if the truncate command is not present, the test\n> could be altered to make the file 0 bytes in some other way.\n>\n> # dd if=/dev/null of=gw1/ovn-controller.log\n> # > gw1-controller.log\n> # rm gw1-controller.log && touch gw1/ovn-controller.log\n>\n> Are potential ways of expressing the same thing without needing to use\n> truncate.\n>\n\nOOps, I typoed the filename in those last two suggestions. They should be\n\n# > gw1/ovn-controller.log\n# rm gw1/ovn-controller.log && touch gw1/ovn-controller.log","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrf776bhSz9s0Z\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 06:05:39 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id C09F9C13;\n\tMon, 11 Sep 2017 20:05:37 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 117BCBB3\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 20:05:36 +0000 (UTC)","from mail-io0-f182.google.com (mail-io0-f182.google.com\n\t[209.85.223.182])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 957F249D\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 20:05:35 +0000 (UTC)","by mail-io0-f182.google.com with SMTP id j141so33967348ioj.4\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 13:05:35 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to;\n\tbh=NSjGMLt03EStHL3DiCo39ziHCU0dd3hAwN0XLVRgeLw=;\n\tb=ODtilwCfw68uBYJGgAaGYVIF3KJcEYsOYeJwcuv/M4WQCc29JYX8J3NtAKT4+EtKDi\n\tGkLpN7IazSNrFVWrZx8QqS43FIzz5ROQUEHPcEU4bqqnnCo8axxtq2LJ/1AJlCpsxAfq\n\tC/pX2f031VZjXaD/5kQAbrm/uJI62hjFfRc5QOC0tgO55yqrGuIvCEhCmMr6oHB9iQMU\n\tomN55KhKynHsBWTgizM+q3E0essMSbUJbA28iTTPOlFOMfkgdVTjCkNVoCq2pGdnEQeY\n\tjID+mdgFNVPAygCkttqN8iqqW/6T6bKtMoxR0v+QJRyXYcoDBbVgod8MDdHQlJliXC7J\n\tQVYw==","X-Gm-Message-State":"AHPjjUgNRiNPVQ5Qdj0XaKwsC7rostQm/UopIfmdQmXyqPi1iLs2LFxd\n\t2D01ZxEIoIoduy4wmcI4MAZva/2PeSBv","X-Google-Smtp-Source":"AOwi7QBrXNQZefeptd+O3hFowcyFE2jdh7cS+F5dh1GDUwmuVtrkGi2+iZG0x4v885OZfx+9eQhA69e+PR2HLDdh+2M=","X-Received":"by 10.107.175.139 with SMTP id\n\tp11mr16017591ioo.197.1505160334898; \n\tMon, 11 Sep 2017 13:05:34 -0700 (PDT)","MIME-Version":"1.0","References":"<20170911193711.8532-1-aserdean@ovn.org>\n\t<CAA1+qONzgG_YZt1ucgn59aTxXiCdyzKGpxs2DAedrS_FG_CuBQ@mail.gmail.com>","In-Reply-To":"<CAA1+qONzgG_YZt1ucgn59aTxXiCdyzKGpxs2DAedrS_FG_CuBQ@mail.gmail.com>","From":"Mark Michelson <mmichels@redhat.com>","Date":"Mon, 11 Sep 2017 20:05:24 +0000","Message-ID":"<CAA1+qOM0JNVqScJnbZ-_y3L0gChV9=+kC3N1hVczz+B+adw0vQ@mail.gmail.com>","To":"Alin Gabriel Serdean <aserdean@ovn.org>, dev@openvswitch.org","X-Spam-Status":"No, score=0.5 required=5.0 tests=HTML_MESSAGE,\n\tRCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","X-Content-Filtered-By":"Mailman/MimeDel 2.1.12","Subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command not\n\tfound","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1766527,"web_url":"http://patchwork.ozlabs.org/comment/1766527/","msgid":"<6FDA0CACF4BC624BBE12167875D71C9B40A683CA@CBSEX1.cloudbase.local>","list_archive_url":null,"date":"2017-09-11T20:28:11","subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command\n\tnot\tfound","submitter":{"id":67146,"url":"http://patchwork.ozlabs.org/api/people/67146/","name":"Alin Serdean","email":"aserdean@cloudbasesolutions.com"},"content":"> On Mon, Sep 11, 2017 at 2:59 PM Mark Michelson <mmichels@redhat.com>\r\n> wrote:\r\n> \r\n> > On Mon, Sep 11, 2017 at 2:37 PM Alin Gabriel Serdean\r\n> > <aserdean@ovn.org>\r\n> > wrote:\r\n> >\r\n> >> Test: \"testing ovn -- ensure one gw controller restart in HA doesn't\r\n> >> bounce the master\" uses the command `truncate`.\r\n> >>\r\n> >> Skip the test if the command is not found.\r\n> >>\r\n> >>\r\n> > The use of the truncate command here is to make the file 0 bytes.\r\n> > Rather than skipping the test if the truncate command is not present,\r\n> > the test could be altered to make the file 0 bytes in some other way.\r\n> >\r\n> > # dd if=/dev/null of=gw1/ovn-controller.log # > gw1-controller.log #\r\n> > rm gw1-controller.log && touch gw1/ovn-controller.log\r\n> >\r\n> > Are potential ways of expressing the same thing without needing to use\r\n> > truncate.\r\n> >\r\n> \r\n> OOps, I typoed the filename in those last two suggestions. They should be\r\n> \r\n> # > gw1/ovn-controller.log\r\n> # rm gw1/ovn-controller.log && touch gw1/ovn-controller.log\r\n> _______________________________________________\r\n[Alin Serdean] Thanks for the quick review Mark!\r\nSorry I didn't look at the actual test.\r\nI just saw it failed and:\r\n\"ovs/tests/testsuite.dir/at-groups/2364/test-source: line 82: truncate: command not found\"\r\nin the log.\r\nShort story msys does not have truncate, msys2 has it that's why I was so eager 😊.\r\n\r\nI would avoid using dd with /dev/null because that would also a bit specific.\r\n\r\nI tested with the following\r\ndiff --git a/tests/ovn.at b/tests/ovn.at\r\nindex 2a00232..572102b 100644\r\n--- a/tests/ovn.at\r\n+++ b/tests/ovn.at\r\n@@ -8501,7 +8501,8 @@ ovn-nbctl --wait=hv --timeout=3 sync\r\n # doesn't have the same effect because \"name\" is conserved, and the\r\n # Chassis entry is not replaced.\r\n\r\n-truncate -s 0 gw1/ovn-controller.log\r\n+#truncate -s 0 gw1/ovn-controller.log\r\n+> gw1/ovn-controller.log\r\n\r\n gw2_chassis=$(ovn-sbctl --bare --columns=_uuid find Chassis name=gw2)\r\n ovn-sbctl destroy Chassis $gw2_chassis\r\n\r\nDo you mind sending out a patch for it?\r\n\r\nAlin.","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrfdG0NB2z9s7B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 06:28:17 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 2D926C87;\n\tMon, 11 Sep 2017 20:28:16 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 4A02FBC5\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 20:28:14 +0000 (UTC)","from mail.cloudbasesolutions.com (mail.cloudbasesolutions.com\n\t[91.232.152.5])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTP id 823BD1CE\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 20:28:13 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby mail.cloudbasesolutions.com (Postfix) with ESMTP id 9D31D43ACB;\n\tMon, 11 Sep 2017 23:28:12 +0300 (EEST)","from mail.cloudbasesolutions.com ([127.0.0.1])\n\tby localhost (mail.cloudbasesolutions.com [127.0.0.1]) (amavisd-new, \n\tport 10024)\n\twith ESMTP id yEoITdFo294K; Mon, 11 Sep 2017 23:28:12 +0300 (EEST)","from mail.cloudbasesolutions.com (unknown [10.77.78.3])\n\tby mail.cloudbasesolutions.com (Postfix) with ESMTP id 441F543AC9;\n\tMon, 11 Sep 2017 23:28:12 +0300 (EEST)","from CBSEX1.cloudbase.local ([10.77.78.3]) by\n\tCBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0361.001;\n\tMon, 11 Sep 2017 22:28:12 +0200"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-Virus-Scanned":"amavisd-new at cloudbasesolutions.com","From":"Alin Serdean <aserdean@cloudbasesolutions.com>","To":"Mark Michelson <mmichels@redhat.com>, Alin Gabriel Serdean\n\t<aserdean@ovn.org>, \"dev@openvswitch.org\" <dev@openvswitch.org>","Thread-Topic":"[ovs-dev] [PATCH] tests: Skip OVN test if truncate command not\n\tfound","Thread-Index":"AQHTKziGJogensell0W59AzOldzguKKv+qMAgAAlhnA=","Date":"Mon, 11 Sep 2017 20:28:11 +0000","Message-ID":"<6FDA0CACF4BC624BBE12167875D71C9B40A683CA@CBSEX1.cloudbase.local>","References":"<20170911193711.8532-1-aserdean@ovn.org>\n\t<CAA1+qONzgG_YZt1ucgn59aTxXiCdyzKGpxs2DAedrS_FG_CuBQ@mail.gmail.com>\n\t<CAA1+qOM0JNVqScJnbZ-_y3L0gChV9=+kC3N1hVczz+B+adw0vQ@mail.gmail.com>","In-Reply-To":"<CAA1+qOM0JNVqScJnbZ-_y3L0gChV9=+kC3N1hVczz+B+adw0vQ@mail.gmail.com>","Accept-Language":"en-US, it-IT","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-originating-ip":"[10.77.78.1]","MIME-Version":"1.0","X-Spam-Status":"No, score=-0.0 required=5.0 tests=RP_MATCHES_RCVD\n\tautolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command\n\tnot\tfound","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1766551,"web_url":"http://patchwork.ozlabs.org/comment/1766551/","msgid":"<CAA1+qOOJZSTA_c73u_btLSLwdcM_6e_9jj_ZZKT1Ryi4dzAWUg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-11T20:59:10","subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command not\n\tfound","submitter":{"id":71978,"url":"http://patchwork.ozlabs.org/api/people/71978/","name":"Mark Michelson","email":"mmichels@redhat.com"},"content":"On Mon, Sep 11, 2017 at 3:37 PM Alin Serdean <\naserdean@cloudbasesolutions.com> wrote:\n\n> > On Mon, Sep 11, 2017 at 2:59 PM Mark Michelson <mmichels@redhat.com>\n> > wrote:\n> >\n> > > On Mon, Sep 11, 2017 at 2:37 PM Alin Gabriel Serdean\n> > > <aserdean@ovn.org>\n> > > wrote:\n> > >\n> > >> Test: \"testing ovn -- ensure one gw controller restart in HA doesn't\n> > >> bounce the master\" uses the command `truncate`.\n> > >>\n> > >> Skip the test if the command is not found.\n> > >>\n> > >>\n> > > The use of the truncate command here is to make the file 0 bytes.\n> > > Rather than skipping the test if the truncate command is not present,\n> > > the test could be altered to make the file 0 bytes in some other way.\n> > >\n> > > # dd if=/dev/null of=gw1/ovn-controller.log # > gw1-controller.log #\n> > > rm gw1-controller.log && touch gw1/ovn-controller.log\n> > >\n> > > Are potential ways of expressing the same thing without needing to use\n> > > truncate.\n> > >\n> >\n> > OOps, I typoed the filename in those last two suggestions. They should be\n> >\n> > # > gw1/ovn-controller.log\n> > # rm gw1/ovn-controller.log && touch gw1/ovn-controller.log\n> > _______________________________________________\n> [Alin Serdean] Thanks for the quick review Mark!\n> Sorry I didn't look at the actual test.\n> I just saw it failed and:\n> \"ovs/tests/testsuite.dir/at-groups/2364/test-source: line 82: truncate:\n> command not found\"\n> in the log.\n> Short story msys does not have truncate, msys2 has it that's why I was so\n> eager 😊.\n>\n> I would avoid using dd with /dev/null because that would also a bit\n> specific.\n>\n> I tested with the following\n> diff --git a/tests/ovn.at b/tests/ovn.at\n> index 2a00232..572102b 100644\n> --- a/tests/ovn.at\n> +++ b/tests/ovn.at\n> @@ -8501,7 +8501,8 @@ ovn-nbctl --wait=hv --timeout=3 sync\n>  # doesn't have the same effect because \"name\" is conserved, and the\n>  # Chassis entry is not replaced.\n>\n> -truncate -s 0 gw1/ovn-controller.log\n> +#truncate -s 0 gw1/ovn-controller.log\n> +> gw1/ovn-controller.log\n>\n>  gw2_chassis=$(ovn-sbctl --bare --columns=_uuid find Chassis name=gw2)\n>  ovn-sbctl destroy Chassis $gw2_chassis\n>\n> Do you mind sending out a patch for it?\n>\n> Alin.\n>\n\nPatch is here:\nhttps://mail.openvswitch.org/pipermail/ovs-dev/2017-September/338627.html","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrgK872DNz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 06:59:24 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 1D123C0C;\n\tMon, 11 Sep 2017 20:59:23 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 5791DBAD\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 20:59:22 +0000 (UTC)","from mail-io0-f180.google.com (mail-io0-f180.google.com\n\t[209.85.223.180])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 8F5DDA4\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 20:59:21 +0000 (UTC)","by mail-io0-f180.google.com with SMTP id n69so33801119ioi.5\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 13:59:21 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to;\n\tbh=DvsGTAMGgcAZ5LCH2P9z7pYinJz/ugGAR70wjpha/Vw=;\n\tb=mE9bNfK5JBqzZgPV1+IlVnF1ZXEvGU3A0jy3BPozvnNi4KWu3fDPDyVSQiqvcq2YP6\n\t01Kdy2VETmOzo5qmfvpWHSemiZf6/pTyYCUJr/Byiqf7hXXLtIwP9aXdB5T5hTj3Tvb4\n\tApYbhej+Iz05W+dR2RUqPd4Eimm7WLptQ9ZKZRm9urwgbeP3DsfJh2CaJDAYHlpc9k6g\n\t+JDEDXrWtelAipKwmTamGFob73FtJsIa+nM19gUrsgScWwELJs5Cy+h39w6pN14JTjmj\n\th6jrQYlZfAMgnFx+Dr65t99GrILwLP9/yogg137wTkyRcGDXPlffHjVuiz7727ABxEx2\n\taCWQ==","X-Gm-Message-State":"AHPjjUge9Wtjq+f3abPxDLpNPP9H/cXM68Tp9cLMUMlbiV5ZvdCYScss\n\tZ1etf80ublDUkiAXuKNLgBFbzAxGJ5hW","X-Google-Smtp-Source":"ADKCNb55SwnbV3ppVBS3bOsUBqzZ3jDpq8BqnH23OeD10OZPKPRMoHSjXwwywAV+EmKxX2wpaLS6zisdnHmH85uuI9U=","X-Received":"by 10.107.142.211 with SMTP id q202mr6699943iod.65.1505163560929;\n\tMon, 11 Sep 2017 13:59:20 -0700 (PDT)","MIME-Version":"1.0","References":"<20170911193711.8532-1-aserdean@ovn.org>\n\t<CAA1+qONzgG_YZt1ucgn59aTxXiCdyzKGpxs2DAedrS_FG_CuBQ@mail.gmail.com>\n\t<CAA1+qOM0JNVqScJnbZ-_y3L0gChV9=+kC3N1hVczz+B+adw0vQ@mail.gmail.com>\n\t<6FDA0CACF4BC624BBE12167875D71C9B40A683CA@CBSEX1.cloudbase.local>","In-Reply-To":"<6FDA0CACF4BC624BBE12167875D71C9B40A683CA@CBSEX1.cloudbase.local>","From":"Mark Michelson <mmichels@redhat.com>","Date":"Mon, 11 Sep 2017 20:59:10 +0000","Message-ID":"<CAA1+qOOJZSTA_c73u_btLSLwdcM_6e_9jj_ZZKT1Ryi4dzAWUg@mail.gmail.com>","To":"Alin Serdean <aserdean@cloudbasesolutions.com>, \n\tAlin Gabriel Serdean <aserdean@ovn.org>,\n\t\"dev@openvswitch.org\" <dev@openvswitch.org>","X-Spam-Status":"No, score=0.5 required=5.0 tests=HTML_MESSAGE,\n\tRCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","X-Content-Filtered-By":"Mailman/MimeDel 2.1.12","Subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command not\n\tfound","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1766593,"web_url":"http://patchwork.ozlabs.org/comment/1766593/","msgid":"<003401d32b49$13813c40$3a83b4c0$@ovn.org>","list_archive_url":null,"date":"2017-09-11T21:58:16","subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command not\n\tfound","submitter":{"id":72181,"url":"http://patchwork.ozlabs.org/api/people/72181/","name":"Alin-Gabriel Serdean","email":"aserdean@ovn.org"},"content":"Do you mind sending out a patch for it?\n\nAlin.\n\n \n\nPatch is here: https://mail.openvswitch.org/pipermail/ovs-dev/2017-September/338627.html\n\n \n\n \n\n[Alin Serdean] Thanks! I tested and acked it.","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrhdD4X4lz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 12 Sep 2017 07:58:23 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id A4209CC7;\n\tMon, 11 Sep 2017 21:58:21 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 69D6D504\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 21:58:20 +0000 (UTC)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 57BD8124\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 21:58:19 +0000 (UTC)","from cloudbasealin (unknown [79.114.118.98])\n\t(Authenticated sender: aserdean@ovn.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 88CDB172095;\n\tMon, 11 Sep 2017 23:58:16 +0200 (CEST)"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-Originating-IP":"79.114.118.98","From":"<aserdean@ovn.org>","To":"\"'Mark Michelson'\" <mmichels@redhat.com>,\n\t\"'Alin Gabriel Serdean'\" <aserdean@ovn.org>, <dev@openvswitch.org>","References":"<20170911193711.8532-1-aserdean@ovn.org>\n\t<CAA1+qONzgG_YZt1ucgn59aTxXiCdyzKGpxs2DAedrS_FG_CuBQ@mail.gmail.com>\n\t<CAA1+qOM0JNVqScJnbZ-_y3L0gChV9=+kC3N1hVczz+B+adw0vQ@mail.gmail.com>\n\t<6FDA0CACF4BC624BBE12167875D71C9B40A683CA@CBSEX1.cloudbase.local>\n\t<CAA1+qOOJZSTA_c73u_btLSLwdcM_6e_9jj_ZZKT1Ryi4dzAWUg@mail.gmail.com>","In-Reply-To":"<CAA1+qOOJZSTA_c73u_btLSLwdcM_6e_9jj_ZZKT1Ryi4dzAWUg@mail.gmail.com>","Date":"Tue, 12 Sep 2017 00:58:16 +0300","Message-ID":"<003401d32b49$13813c40$3a83b4c0$@ovn.org>","MIME-Version":"1.0","X-Mailer":"Microsoft Outlook 16.0","thread-index":"AQHTK0DYGxP+Tnl0dkG6fg9K0HZE+KKwOu7g","Content-Language":"ro","X-Spam-Status":"No, score=-0.7 required=5.0 tests=HTML_MESSAGE,\n\tRCVD_IN_DNSWL_LOW autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","X-Content-Filtered-By":"Mailman/MimeDel 2.1.12","Subject":"Re: [ovs-dev] [PATCH] tests: Skip OVN test if truncate command not\n\tfound","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}}]