From: Aniket Sahu <asahu1x@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, peterx@redhat.com, farosas@suse.de,
npiggin@gmail.com, adityag@linux.ibm.com, milesg@linux.ibm.com,
harshpb@linux.ibm.com, rathc@linux.ibm.com,
anushree.mathur@linux.ibm.com, misanjum@linux.ibm.com,
gautam@linux.ibm.com, thuth@redhat.com, amachhiw@linux.ibm.com,
asahu1x@linux.ibm.com
Subject: [PATCH 1/5] tests/functional/ppc64: replace deprecated datetime.utcnow()
Date: Fri, 20 Nov 2026 15:28:54 +0530 [thread overview]
Message-ID: <20261120095854.35941-8-asahu1x@linux.ibm.com> (raw)
In-Reply-To: <20261120095854.35941-7-asahu1x@linux.ibm.com>
Replace datetime.utcnow() with datetime.now(timezone.utc) to avoid
deprecation warnings in Python 3.12+.
Also add debug logging when setting the system clock in the L1 guest.
Signed-off-by: Aniket Sahu <asahu1x@linux.ibm.com>
---
tests/functional/ppc64/test_hv.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/functional/ppc64/test_hv.py b/tests/functional/ppc64/test_hv.py
index beec1dbbea..8a1fca2cb1 100755
--- a/tests/functional/ppc64/test_hv.py
+++ b/tests/functional/ppc64/test_hv.py
@@ -12,7 +12,7 @@
import os
import subprocess
-from datetime import datetime
+from datetime import datetime, timezone
from qemu_test import QemuSystemTest, Asset
from qemu_test import wait_for_console_pattern, exec_command
from qemu_test import skipIfMissingCommands, skipBigDataTest
@@ -74,8 +74,9 @@ def do_start_alpine(self):
ps1='localhost:~#'
wait_for_console_pattern(self, 'localhost login:')
exec_command_and_wait_for_pattern(self, 'root', ps1)
+ self.log.debug("do_start_alpine: logged in, setting system clock")
# If the time is wrong, SSL certificates can fail.
- cmd='date -s "' + datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S' + '"')
+ cmd='date -s "' + datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M:%S' + '"')
exec_command_and_wait_for_pattern(self, cmd, ps1)
ps1='alpine:~#'
exec_command_and_wait_for_pattern(self, 'setup-alpine -qe', ps1)
--
2.52.0
next prev parent reply other threads:[~2026-11-20 10:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 9:58 [PATCH 0/5] tests/functional/ppc64: Fixes and improvements for hypervisor tests Aniket Sahu
2026-11-20 9:58 ` Aniket Sahu [this message]
2026-11-20 9:58 ` [PATCH 2/5] tests/functional/ppc64: pin machine types " Aniket Sahu
2026-11-20 10:06 ` Daniel P. Berrangé
2026-11-20 10:29 ` Aniket Sahu
2026-11-20 9:58 ` [PATCH 3/5] tests/functional/ppc64: add kernel params and early panic detection Aniket Sahu
2026-11-20 9:58 ` [PATCH 4/5] tests/functional/ppc64: dynamically resolve NVMe device path Aniket Sahu
2026-11-20 9:58 ` [PATCH 5/5] tests/functional/ppc64: increase timeout for hypervisor tests Aniket Sahu
2026-11-20 16:06 ` [PATCH 0/5] tests/functional/ppc64: Fixes and improvements " Alex Bennée
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=20261120095854.35941-8-asahu1x@linux.ibm.com \
--to=asahu1x@linux.ibm.com \
--cc=adityag@linux.ibm.com \
--cc=amachhiw@linux.ibm.com \
--cc=anushree.mathur@linux.ibm.com \
--cc=farosas@suse.de \
--cc=gautam@linux.ibm.com \
--cc=harshpb@linux.ibm.com \
--cc=milesg@linux.ibm.com \
--cc=misanjum@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rathc@linux.ibm.com \
--cc=thuth@redhat.com \
/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 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.