Actually, I tried to use test.tmpdir, but maybe because of  the path name(too long), "virsh update-device vm1 xml" always failed...
I will execute the test with test.tmpdir and show you the log .