public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Steve Sakoman" <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 23/33] oeqa/suspend : add test for suspend state
Date: Thu,  5 Aug 2021 05:34:00 -1000	[thread overview]
Message-ID: <dbd541cf2bf5083604a2e929ea8f148b96b4ce2f.1628176985.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1628176985.git.steve@sakoman.com>

From: Teoh Jay Shen <jay.shen.teoh@intel.com>

This test case is checking the command and LAN device behaviour before and after suspend state. The Test_if_LAN_device_works_well_after_resume_from_suspend_state and standby manual test cases from oeqa/manual/bsp-hw can be replace by this runtime test.

Signed-off-by: Teoh Jay Shen <jay.shen.teoh@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 10728035a606483ea67f6cb8ba5779558856593a)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/lib/oeqa/runtime/cases/suspend.py | 33 ++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 meta/lib/oeqa/runtime/cases/suspend.py

diff --git a/meta/lib/oeqa/runtime/cases/suspend.py b/meta/lib/oeqa/runtime/cases/suspend.py
new file mode 100644
index 0000000000..67b6f7e56f
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/suspend.py
@@ -0,0 +1,33 @@
+from oeqa.runtime.case import OERuntimeTestCase
+from oeqa.core.decorator.depends import OETestDepends
+from oeqa.core.decorator.data import skipIfQemu
+import threading
+import time
+
+class Suspend_Test(OERuntimeTestCase):
+
+    def test_date(self): 
+        (status, output) = self.target.run('date')
+        self.assertEqual(status, 0,  msg = 'Failed to run date command, output : %s' % output)
+        
+    def test_ping(self):
+        t_thread = threading.Thread(target=self.target.run, args=("ping 8.8.8.8",))
+        t_thread.start()
+        time.sleep(2)
+        
+        status, output = self.target.run('pidof ping')
+        self.target.run('kill -9 %s' % output)
+        self.assertEqual(status, 0, msg = 'Not able to find process that runs ping, output : %s' % output)  
+        
+    def set_suspend(self): 
+        (status, output) = self.target.run('sudo rtcwake -m mem -s 10')
+        self.assertEqual(status, 0,  msg = 'Failed to suspends your system to RAM, output : %s' % output)
+    
+    @skipIfQemu('qemuall', 'Test only runs on real hardware')
+    @OETestDepends(['ssh.SSHTest.test_ssh'])
+    def test_suspend(self):
+        self.test_date()
+        self.test_ping()
+        self.set_suspend()
+        self.test_date()
+        self.test_ping()
-- 
2.25.1


  parent reply	other threads:[~2021-08-05 15:37 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-05 15:33 [OE-core][dunfell 00/33] Patch review Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 01/33] Revert "gstreamer-plugins-good: ignore CVE-2021-3497/8 since they are fixed" Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 02/33] Revert "gstreamer-plugins-base: ignore CVE-2021-3522 since it is fixed" Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 03/33] gstreamer: ignore CVE-2021-3497, CVE-2021-3498, and CVE-2021-3522 Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 04/33] libxml2: fix CVE-2021-3541 Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 05/33] avahi: fix CVE-2021-3468 Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 06/33] curl: Fix for CVE-2021-22898 Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 07/33] curl: Fix CVE-2021-22924 and CVE-2021-22925 Steve Sakoman
2021-08-06 16:12   ` Mike Crowe
2021-08-05 15:33 ` [OE-core][dunfell 08/33] linux-yocto/5.4: update to v5.4.134 Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 09/33] oeqa/manual/toaster: fix small typo Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 10/33] ovmf: Fix VLA warnings with GCC 11 Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 11/33] archiver.bbclass: Fix patch error for recipes that inherit dos2unix Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 12/33] bitbake.conf: change GNOME_MIRROR to new one Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 13/33] initramfs-framework/setup-live: fix shebang Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 14/33] yocto-check-layer: Remove duplicated code Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 15/33] glew: fix Makefile race Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 16/33] oe-setup-builddir: update YP docs and OE URLs Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 17/33] qemu.inc: Add seccomp PACKAGECONFIG option Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 18/33] qemu: Enable seccomp if FEATURE is set Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 19/33] ifupdown: added -1 option to dhclient for dhcpv6 Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 20/33] oeqa/ethernet_ip_connman : add test for network connections Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 21/33] oeqa/runtime : add test for RTC(Real Time Clock) Steve Sakoman
2021-08-05 15:33 ` [OE-core][dunfell 22/33] oeqa/runtime/cases: Only disable/enable for current boot Steve Sakoman
2021-08-05 15:34 ` Steve Sakoman [this message]
2021-08-05 15:34 ` [OE-core][dunfell 24/33] oeqa/runtime: add test for matchbox-terminal Steve Sakoman
2021-08-05 15:34 ` [OE-core][dunfell 25/33] oeqa/terminal : improve the test case Steve Sakoman
2021-08-05 15:34 ` [OE-core][dunfell 26/33] oeqa/usb_hid.py : add test to check the usb/human interface device status after suspend state Steve Sakoman
2021-08-05 15:34 ` [OE-core][dunfell 27/33] yocto-check-layer: improve missed dependencies Steve Sakoman
2021-08-05 15:34 ` [OE-core][dunfell 28/33] checklayer: new function get_layer_dependencies() Steve Sakoman
2021-08-05 15:34 ` [OE-core][dunfell 29/33] checklayer: rename _find_layer_depends Steve Sakoman
2021-08-05 15:34 ` [OE-core][dunfell 30/33] yocto-check-layer: ensure that all layer dependencies are tested too Steve Sakoman
2021-08-05 15:34 ` [OE-core][dunfell 31/33] archiver.bbclass: fix do_ar_configured failure for kernel Steve Sakoman
2021-08-05 15:34 ` [OE-core][dunfell 32/33] linux-yocto/5.4: update to v5.4.135 Steve Sakoman
2021-08-05 15:34 ` [OE-core][dunfell 33/33] sstate: Fix rebuilds when changing layer config Steve Sakoman

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=dbd541cf2bf5083604a2e929ea8f148b96b4ce2f.1628176985.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox