On 06/30/2010 08:42 PM, Lucas Meneghel Rodrigues wrote: > On Thu, 2010-07-01 at 01:32 +0800, Amos Kong wrote: >> qemu-kvm man page: >> ... >> -tftp dir >> When using the user mode network stack, activate a built-in TFTP >> server. >> The files in dir will be exposed as the root of a TFTP server. The >> TFTP >> client on the guest must be configured in binary mode (use the command >> "bin" of the Unix TFTP client). The host IP address on the guest is as >> usual 10.0.2.2. > > Yeah, good catch! Applied, thanks. > >> Signed-off-by: Amos Kong <[email protected]> >> --- >> 0 files changed, 0 insertions(+), 0 deletions(-) >> >> diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py >> index a5555b9..514dfd1 100755 >> --- a/client/tests/kvm/kvm_vm.py >> +++ b/client/tests/kvm/kvm_vm.py >> @@ -390,7 +390,7 @@ class VM: >> qemu_cmd += add_floppy(help, floppy) >> >> tftp = params.get("tftp") >> - if tftp: >> + if tftp and nic_params.get("nic_mode") == "user":
nic_params happens to be the params dict of the last NIC. It's defined in a loop earlier in the function and this tftp code is outside that loop. I don't think it's correct to enable/disable tftp based on the nic_mode of just one NIC, let alone the last NIC. Of course this is fine for the common case where only a single NIC exists, but maybe it would be more correct to check all NICs. >> tftp = kvm_utils.get_path(root_dir, tftp) >> qemu_cmd += add_tftp(help, tftp) >> >> > > > _______________________________________________ > Autotest mailing list > [email protected] > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
