We want to include your server tester in a script that's running a battery of NFSv4 tests, ...
Good.
To that end, I'm trying to consolidate the code as much as possible, and I'm wondering if there's any reason NOT to merge the test_tree_net.py code with the main nfs4st.py code. Then it would just recreate the test_tree each time, no hassle. The only reason I can see that this would be a bad idea is if the server tester writes a log or something into the test tree. What are your thoughts?
Well, in principle test_tree_net could be integrated into nfs4st.py. The important thing is that all errors are detected. If test_tree_net fails to setup the test tree, the results from nfs4st.py won't be valid. Currently, test_tree_net does not have as many error checks as one would wish.
My experience from Cthon was also that it takes some tweaking before it's possible to run test_tree_net. As far as I know, NetApp Filers still fails on test_tree_net.
So, currently test_tree_net must probably be "supervised", at least for untested servers. If you know that test_tree_net works with the servers you are testing, it is probably safe just to make a script that runs test_tree_net before nfs4st.py. If you find out that it does indeed work with most servers, then maybe it is a good idea to integrate test_tree_net into nfs4st after all.
Along the same lines - if there's nothing important stored in the test tree after the suites are run, then it probably would also make sense to clean up and just destroy the tree at the end of a server test, right?
Yes, that's ok, as long as you remember to re-create the tree before running nfs4st again.
Finally, you say in your documentation that test_tree.py is obsolete, and that test_tree_net.py is all that is needed - can we just throw away test_tree.py, then, to avoid confusion?
Probably. There may still be use for test_tree.py: If it's impossible to run test_tree_net.py against some server, and this server supports running Python scripts like test_tree.py locally, then test_tree.py can be used as a substitute for test_tree_net.py. This would make it possible to run nfs4st even though the server is that broken that test_tree_net.py won't succeed.
The problem is that test_tree.py is outdated and probably incompatible with nfs4st.py nowadays :-) Actually, I'm not sure.
The ultimate solution, I guess, is to define the test tree in some kind of language, which can be used as input file either to a "network test tree creator" (like test_tree_net) or a "local test tree creator" (like test_tree). Or what do you think?
I noticed that it's still referenced in Makefile.pychecker and setup.py. Let me know.
test_tree_net.py should be added to Makefile.pychecker and setup.py. test_tree.py should be removed, eventually.