From: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> To: qemu-devel@nongnu.org Cc: pavel.dovgalyuk@ispras.ru, pbonzini@redhat.com, alex.bennee@linaro.org, crosa@redhat.com, f4bug@amsat.org Subject: [PATCH v3 7/9] tests/avocado: update replay_linux test Date: Thu, 26 May 2022 11:45:40 +0300 [thread overview] Message-ID: <165355474012.533615.16973613513034331867.stgit@pasha-ThinkPad-X280> (raw) In-Reply-To: <165355470196.533615.1219754093587154582.stgit@pasha-ThinkPad-X280> This patch updates replay_linux test to make it compatible with new LinuxTest class. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru> --- tests/avocado/replay_linux.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tests/avocado/replay_linux.py b/tests/avocado/replay_linux.py index 15953f9e49..1099b5647f 100644 --- a/tests/avocado/replay_linux.py +++ b/tests/avocado/replay_linux.py @@ -32,9 +32,16 @@ class ReplayLinux(LinuxTest): bus = 'ide' def setUp(self): - super(ReplayLinux, self).setUp() + # LinuxTest does many replay-incompatible things, but includes + # useful methods. Do not setup LinuxTest here and just + # call some functions. + super(LinuxTest, self).setUp() + self._set_distro() self.boot_path = self.download_boot() - self.cloudinit_path = self.prepare_cloudinit() + self.phone_server = cloudinit.PhoneHomeServer(('0.0.0.0', 0), + self.name) + ssh_pubkey, self.ssh_key = self.set_up_existing_ssh_keys() + self.cloudinit_path = self.prepare_cloudinit(ssh_pubkey) def vm_add_disk(self, vm, path, id, device): bus_string = '' @@ -50,7 +57,9 @@ def launch_and_wait(self, record, args, shift): vm = self.get_vm() vm.add_args('-smp', '1') vm.add_args('-m', '1024') - vm.add_args('-object', 'filter-replay,id=replay,netdev=hub0port0') + vm.add_args('-netdev', 'user,id=vnet,hostfwd=:127.0.0.1:0-:22', + '-device', 'virtio-net,netdev=vnet') + vm.add_args('-object', 'filter-replay,id=replay,netdev=vnet') if args: vm.add_args(*args) self.vm_add_disk(vm, self.boot_path, 0, self.hdd) @@ -75,8 +84,8 @@ def launch_and_wait(self, record, args, shift): stop_check=(lambda : not vm.is_running())) console_drainer.start() if record: - cloudinit.wait_for_phone_home(('0.0.0.0', self.phone_home_port), - self.name) + while not self.phone_server.instance_phoned_back: + self.phone_server.handle_request() vm.shutdown() logger.info('finished the recording with log size %s bytes' % os.path.getsize(replay_path))
next prev parent reply other threads:[~2022-05-26 8:56 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-26 8:45 [PATCH v3 0/9] Record/replay refactoring and stuff Pavel Dovgalyuk 2022-05-26 8:45 ` [PATCH v3 1/9] replay: fix event queue flush for qemu shutdown Pavel Dovgalyuk 2022-05-26 8:45 ` [PATCH v3 2/9] replay: notify vCPU when BH is scheduled Pavel Dovgalyuk 2022-05-26 9:37 ` Paolo Bonzini 2022-05-26 9:51 ` Pavel Dovgalyuk 2022-05-26 12:10 ` Paolo Bonzini 2022-05-27 8:45 ` Pavel Dovgalyuk 2022-05-26 8:45 ` [PATCH v3 3/9] replay: rewrite async event handling Pavel Dovgalyuk 2022-05-26 8:45 ` [PATCH v3 4/9] replay: simplify async event processing Pavel Dovgalyuk 2022-05-26 9:40 ` Paolo Bonzini 2022-05-26 9:53 ` Pavel Dovgalyuk 2022-05-26 8:45 ` [PATCH v3 5/9] docs: convert docs/devel/replay page to rst Pavel Dovgalyuk 2022-05-26 8:45 ` [PATCH v3 6/9] docs: move replay docs to docs/system/replay.rst Pavel Dovgalyuk 2022-05-26 8:45 ` Pavel Dovgalyuk [this message] 2022-05-26 8:45 ` [PATCH v3 8/9] tests/avocado: add replay Linux tests for virtio machine Pavel Dovgalyuk 2022-05-26 8:45 ` [PATCH v3 9/9] tests/avocado: add replay Linux test for Aarch64 machines Pavel Dovgalyuk 2022-05-26 9:42 ` [PATCH v3 0/9] Record/replay refactoring and stuff Paolo Bonzini
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=165355474012.533615.16973613513034331867.stgit@pasha-ThinkPad-X280 \ --to=pavel.dovgalyuk@ispras.ru \ --cc=alex.bennee@linaro.org \ --cc=crosa@redhat.com \ --cc=f4bug@amsat.org \ --cc=pbonzini@redhat.com \ --cc=qemu-devel@nongnu.org \ --subject='Re: [PATCH v3 7/9] tests/avocado: update replay_linux test' \ /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
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.