netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: shekhar sharma <shekhar250198@gmail.com>
To: Eric Garver <eric@garver.life>,
	Shekhar Sharma <shekhar250198@gmail.com>,
	Netfilter Development Mailing list 
	<netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft v8]tests: py: add netns feature
Date: Tue, 18 Jun 2019 22:36:49 +0530	[thread overview]
Message-ID: <CAN9XX2qhd73k5XmwxucKYPdGe_cV6EZN7RP62LKWGBfYgaNsOA@mail.gmail.com> (raw)
In-Reply-To: <20190618144720.taadv3cawuqp5xka@egarver.localdomain>

Hi Eric!
On Tue, Jun 18, 2019 at 8:17 PM Eric Garver <eric@garver.life> wrote:
>
> On Mon, Jun 17, 2019 at 07:45:58PM +0530, Shekhar Sharma wrote:
> > This patch adds the netns feature to the 'nft-test.py' file.
> >
> >
> > Signed-off-by: Shekhar Sharma <shekhar250198@gmail.com>
> > ---
> > The version history of the patch is :
> > v1: add the netns feature
> > v2: use format() method to simplify print statements.
> > v3: updated the shebang
> > v4: resent the same with small changes
> > v5&v6: resent with small changes
> > v7: netns commands changed for passing the netns name via netns argument.
> > v8: correct typo error
> >
> >  tests/py/nft-test.py | 140 +++++++++++++++++++++++++++++++------------
> >  1 file changed, 101 insertions(+), 39 deletions(-)
> >
> > diff --git a/tests/py/nft-test.py b/tests/py/nft-test.py
> > index 09d00dba..bf5e64c0 100755
> > --- a/tests/py/nft-test.py
> > +++ b/tests/py/nft-test.py
> [..]
> > @@ -1359,6 +1417,13 @@ def main():
> >                          dest='enable_schema',
> >                          help='verify json input/output against schema')
> >
> > +    parser.add_argument('-N', '--netns', action='store_true',
> > +                        help='Test namespace path')
>
> AFAICS, this new option is not being used - it's not passed to
> run_test_file() or other functions. Will that be done in a follow up
> patch?
>

True. I just saw that '-N', '-V' are also not added in the lines below
this as in
debug_option= args.debug
i need to add that as well and then use it in the functions.
I think that will be covered in another patch.

> > +
> > +    parser.add_argument('-v', '--version', action='version',
> > +                        version='1.0',
> > +                        help='Print the version information')
> > +
> >      args = parser.parse_args()
> >      global debug_option, need_fix_option, enable_json_option, enable_json_schema
> >      debug_option = args.debug
> [..]
> > @@ -1434,18 +1499,15 @@ def main():
> >              run_total += file_unit_run
> >
> >      if test_files == 0:
> > -        print "No test files to run"
> > +        print("No test files to run")
> >      else:
> >          if not specific_file:
> >              if force_all_family_option:
> > -                print "%d test files, %d files passed, %d unit tests, " \
> > -                      "%d total executed, %d error, %d warning" \
> > -                      % (test_files, files_ok, tests, run_total, errors,
> > -                         warnings)
> > +                print("{} test files, {} files passed, {} unit tests, ".format(test_files,files_ok,tests))
> > +                print("{} total executed, {} error, {} warning".format(run_total, errors, warnings))
> >              else:
> > -                print "%d test files, %d files passed, %d unit tests, " \
> > -                      "%d error, %d warning" \
> > -                      % (test_files, files_ok, tests, errors, warnings)
> > +                print("{} test files, {} files passed, {} unit tests, ".format(test_files,files_ok,tests))
> > +                print("{} error, {} warning".format(errors, warnings))
> >
>
> Please drop this hunk. It was already addressed in your patch "[PATCH
> nft v7 1/2]tests:py: conversion to  python3". As such this patch doesn't
> apply on top of your previous patch.

Ok. Will re-post the patch with out this bit.

Thanks!
Shekhar

  reply	other threads:[~2019-06-18 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17 14:15 [PATCH nft v8]tests: py: add netns feature Shekhar Sharma
2019-06-18 14:47 ` Eric Garver
2019-06-18 17:06   ` shekhar sharma [this message]
2019-06-18 17:10     ` shekhar sharma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN9XX2qhd73k5XmwxucKYPdGe_cV6EZN7RP62LKWGBfYgaNsOA@mail.gmail.com \
    --to=shekhar250198@gmail.com \
    --cc=eric@garver.life \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).