From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [RFC PATCH v2 0/3] Rewritting network tests into new shell API
Date: Sat, 31 Mar 2018 01:59:43 +0200 [thread overview]
Message-ID: <20180330235943.GA17279@x230> (raw)
In-Reply-To: <5df04eac-2ce5-7628-4bbf-8a34e51fc10e@oracle.com>
Hi Alexey,
thanks for your comments!
> Hi Petr,
> A few questions about the changes to the new API:
> I think, you wrote about renaming test_net.sh to tst_net.sh, and the
> corresponded test_net_stress.sh, so why we can't keep the copy to the
> old API during migration and make the new one with the new name?
That's another option, but I thought, it'd be easier to have just one version of
test_net.sh which supports both APIs, than maintain two files (test_net.sh and
tst_net.sh). But I might be wrong.
> What is actually changing in the new API that require the changes
> in test_net.sh except tst_resm/tst_brkm renamed to tst_res/tst_brk?
> The new variables TST_NEEDS_ROOT and TST_SETUP, TST_TESTFUNC?
Yes (you list all or most of them in your reply below) + the need to call tst_run().
I did most of the changes with simple script using sed (manual fixes are still needed).
tst_run() is the biggest change in the behavior, which complicates migrating of
testscripts/network.sh. I haven't figured out, what would be an elegant way to move it and
I'd prefer to migrate it into new version. Not sure whether we'd like to add part of
"network_settings" execution to tst_run() for tst_net.sh and thus to be run twice (once
by testscripts/network.sh and then by test which is called by testscripts/network.sh).
Now I see the best would be move this "network_settings" stuff into new called function
tst_net_run() which would set it and at the end call tst_run() + remove sourcing
test_net.sh in testscripts/network.sh (only testing script would load it and call
tst_net_run() at the end instead of tst_run()).
> Can we run a test without them temporary, without tst_run(),
> e.g. define some stubs and old API with the new one in
> tst_net.sh?
Do you mean to move all network scripts to new API, using these "shim" in tst_net.sh?
I'd prefer tests were really using new API (to benefit from it), I just don't want to
migrate all tests at once. This can be dangerous trying to implement new API functions in
legacy one.
That's why I implemented in tst_net.sh functions starting with underscore which choose the
implementation via $TST_USE_LEGACY_API. I wanted to ony tst_net.sh itself using it.
> tst_exit()
> {
> tst_do_exit()
> }
> etc.
> I remember that ROD function not using the script but tst_rod binary
> so may affect some scripts, like "ROD cd" for example... but may be it
> is already fixed, I need to check.
Git log shows it's not fixed. Good point. (s/ROD cd /cd /g)
> And we need to remove tst_rmdir() because it will be handled in the
> library as we already have TST_TMPDIR_RHOST there.
Yes, I handled it in test_net.sh and during rewrite.
> Best regards,
> Alexey
Kind regards,
Petr
next prev parent reply other threads:[~2018-03-30 23:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-29 23:31 [LTP] [RFC PATCH v2 0/3] Rewritting network tests into new shell API Petr Vorel
2018-03-29 23:31 ` [LTP] [RFC PATCH v2 1/3] test_net.sh: Support both old and new shell APIs Petr Vorel
2018-03-29 23:31 ` [LTP] [RFC PATCH v2 2/3] network/interface: Cleanup if4-addr-change Petr Vorel
2018-03-29 23:31 ` [LTP] [RFC PATCH v2 3/3] net: Migrate test_net_stress.sh and it's dependencies to new shell API Petr Vorel
2018-03-30 11:04 ` [LTP] [RFC PATCH v2 0/3] Rewritting network tests into " Alexey Kodanev
2018-03-30 23:59 ` Petr Vorel [this message]
2018-04-02 9:57 ` Alexey Kodanev
2018-04-03 7:23 ` Petr Vorel
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=20180330235943.GA17279@x230 \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.