diff mbox series

[v2,08/10] tests/acceptance/virtiofs_submounts.py: remove launch_vm()

Message ID 20210323221539.3532660-9-crosa@redhat.com (mailing list archive)
State New, archived
Headers show
Series Acceptance Test: introduce base class for Linux based tests | expand

Commit Message

Cleber Rosa March 23, 2021, 10:15 p.m. UTC
The LinuxTest class' launch_and_wait() method now behaves the same way
as this test's custom launch_vm(), so let's just use the upper layer
(common) method.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
---
 tests/acceptance/virtiofs_submounts.py | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

Comments

Marc-André Lureau March 24, 2021, 8:34 a.m. UTC | #1
On Wed, Mar 24, 2021 at 2:32 AM Cleber Rosa <crosa@redhat.com> wrote:

> The LinuxTest class' launch_and_wait() method now behaves the same way
> as this test's custom launch_vm(), so let's just use the upper layer
> (common) method.
>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>



> ---
>  tests/acceptance/virtiofs_submounts.py | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
>
> diff --git a/tests/acceptance/virtiofs_submounts.py
> b/tests/acceptance/virtiofs_submounts.py
> index e019d3b896..d77ee35674 100644
> --- a/tests/acceptance/virtiofs_submounts.py
> +++ b/tests/acceptance/virtiofs_submounts.py
> @@ -134,9 +134,6 @@ def set_up_virtiofs(self):
>                           '-numa',
>                           'node,memdev=mem')
>
> -    def launch_vm(self):
> -        self.launch_and_wait()
> -
>      def set_up_nested_mounts(self):
>          scratch_dir = os.path.join(self.shared_dir, 'scratch')
>          try:
> @@ -225,7 +222,7 @@ def test_pre_virtiofsd_set_up(self):
>          self.set_up_nested_mounts()
>
>          self.set_up_virtiofs()
> -        self.launch_vm()
> +        self.launch_and_wait()
>          self.mount_in_guest()
>          self.check_in_guest()
>
> @@ -235,14 +232,14 @@ def test_pre_launch_set_up(self):
>
>          self.set_up_nested_mounts()
>
> -        self.launch_vm()
> +        self.launch_and_wait()
>          self.mount_in_guest()
>          self.check_in_guest()
>
>      def test_post_launch_set_up(self):
>          self.set_up_shared_dir()
>          self.set_up_virtiofs()
> -        self.launch_vm()
> +        self.launch_and_wait()
>
>          self.set_up_nested_mounts()
>
> @@ -252,7 +249,7 @@ def test_post_launch_set_up(self):
>      def test_post_mount_set_up(self):
>          self.set_up_shared_dir()
>          self.set_up_virtiofs()
> -        self.launch_vm()
> +        self.launch_and_wait()
>          self.mount_in_guest()
>
>          self.set_up_nested_mounts()
> @@ -265,7 +262,7 @@ def test_two_runs(self):
>          self.set_up_nested_mounts()
>
>          self.set_up_virtiofs()
> -        self.launch_vm()
> +        self.launch_and_wait()
>          self.mount_in_guest()
>          self.check_in_guest()
>
> --
> 2.25.4
>
>
>
Eric Auger March 24, 2021, 9:24 a.m. UTC | #2
Hi,

On 3/23/21 11:15 PM, Cleber Rosa wrote:
> The LinuxTest class' launch_and_wait() method now behaves the same way
> as this test's custom launch_vm(), so let's just use the upper layer
> (common) method.
> 
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Eric
> ---
>  tests/acceptance/virtiofs_submounts.py | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py
> index e019d3b896..d77ee35674 100644
> --- a/tests/acceptance/virtiofs_submounts.py
> +++ b/tests/acceptance/virtiofs_submounts.py
> @@ -134,9 +134,6 @@ def set_up_virtiofs(self):
>                           '-numa',
>                           'node,memdev=mem')
>  
> -    def launch_vm(self):
> -        self.launch_and_wait()
> -
>      def set_up_nested_mounts(self):
>          scratch_dir = os.path.join(self.shared_dir, 'scratch')
>          try:
> @@ -225,7 +222,7 @@ def test_pre_virtiofsd_set_up(self):
>          self.set_up_nested_mounts()
>  
>          self.set_up_virtiofs()
> -        self.launch_vm()
> +        self.launch_and_wait()
>          self.mount_in_guest()
>          self.check_in_guest()
>  
> @@ -235,14 +232,14 @@ def test_pre_launch_set_up(self):
>  
>          self.set_up_nested_mounts()
>  
> -        self.launch_vm()
> +        self.launch_and_wait()
>          self.mount_in_guest()
>          self.check_in_guest()
>  
>      def test_post_launch_set_up(self):
>          self.set_up_shared_dir()
>          self.set_up_virtiofs()
> -        self.launch_vm()
> +        self.launch_and_wait()
>  
>          self.set_up_nested_mounts()
>  
> @@ -252,7 +249,7 @@ def test_post_launch_set_up(self):
>      def test_post_mount_set_up(self):
>          self.set_up_shared_dir()
>          self.set_up_virtiofs()
> -        self.launch_vm()
> +        self.launch_and_wait()
>          self.mount_in_guest()
>  
>          self.set_up_nested_mounts()
> @@ -265,7 +262,7 @@ def test_two_runs(self):
>          self.set_up_nested_mounts()
>  
>          self.set_up_virtiofs()
> -        self.launch_vm()
> +        self.launch_and_wait()
>          self.mount_in_guest()
>          self.check_in_guest()
>  
>
Willian Rampazzo March 24, 2021, 8:46 p.m. UTC | #3
On Tue, Mar 23, 2021 at 7:16 PM Cleber Rosa <crosa@redhat.com> wrote:
>
> The LinuxTest class' launch_and_wait() method now behaves the same way
> as this test's custom launch_vm(), so let's just use the upper layer
> (common) method.
>
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> ---
>  tests/acceptance/virtiofs_submounts.py | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
diff mbox series

Patch

diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virtiofs_submounts.py
index e019d3b896..d77ee35674 100644
--- a/tests/acceptance/virtiofs_submounts.py
+++ b/tests/acceptance/virtiofs_submounts.py
@@ -134,9 +134,6 @@  def set_up_virtiofs(self):
                          '-numa',
                          'node,memdev=mem')
 
-    def launch_vm(self):
-        self.launch_and_wait()
-
     def set_up_nested_mounts(self):
         scratch_dir = os.path.join(self.shared_dir, 'scratch')
         try:
@@ -225,7 +222,7 @@  def test_pre_virtiofsd_set_up(self):
         self.set_up_nested_mounts()
 
         self.set_up_virtiofs()
-        self.launch_vm()
+        self.launch_and_wait()
         self.mount_in_guest()
         self.check_in_guest()
 
@@ -235,14 +232,14 @@  def test_pre_launch_set_up(self):
 
         self.set_up_nested_mounts()
 
-        self.launch_vm()
+        self.launch_and_wait()
         self.mount_in_guest()
         self.check_in_guest()
 
     def test_post_launch_set_up(self):
         self.set_up_shared_dir()
         self.set_up_virtiofs()
-        self.launch_vm()
+        self.launch_and_wait()
 
         self.set_up_nested_mounts()
 
@@ -252,7 +249,7 @@  def test_post_launch_set_up(self):
     def test_post_mount_set_up(self):
         self.set_up_shared_dir()
         self.set_up_virtiofs()
-        self.launch_vm()
+        self.launch_and_wait()
         self.mount_in_guest()
 
         self.set_up_nested_mounts()
@@ -265,7 +262,7 @@  def test_two_runs(self):
         self.set_up_nested_mounts()
 
         self.set_up_virtiofs()
-        self.launch_vm()
+        self.launch_and_wait()
         self.mount_in_guest()
         self.check_in_guest()