[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/23] tests/qtest: Adapt {m48t59,rtc}-test cases for win32
From: |
Thomas Huth |
Subject: |
[PULL 06/23] tests/qtest: Adapt {m48t59,rtc}-test cases for win32 |
Date: |
Tue, 30 Aug 2022 20:39:55 +0200 |
From: Bin Meng <bin.meng@windriver.com>
There is no tm_gmtoff member in 'struct tm' on Windows.
Update rtc-test.c and m48t59-test.c accordingly.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20220824094029.1634519-16-bmeng.cn@gmail.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
tests/qtest/m48t59-test.c | 2 +-
tests/qtest/rtc-test.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/qtest/m48t59-test.c b/tests/qtest/m48t59-test.c
index b94a1230f7..843d2ced8e 100644
--- a/tests/qtest/m48t59-test.c
+++ b/tests/qtest/m48t59-test.c
@@ -137,7 +137,7 @@ static void cmos_get_date_time(QTestState *s, struct tm
*date)
date->tm_mday = mday;
date->tm_mon = mon - 1;
date->tm_year = base_year + year - 1900;
-#ifndef __sun__
+#if !defined(__sun__) && !defined(_WIN32)
date->tm_gmtoff = 0;
#endif
diff --git a/tests/qtest/rtc-test.c b/tests/qtest/rtc-test.c
index 8126ab1bdb..02ed4e1238 100644
--- a/tests/qtest/rtc-test.c
+++ b/tests/qtest/rtc-test.c
@@ -111,7 +111,7 @@ static void cmos_get_date_time(struct tm *date)
date->tm_mday = mday;
date->tm_mon = mon - 1;
date->tm_year = base_year + year - 1900;
-#ifndef __sun__
+#if !defined(__sun__) && !defined(_WIN32)
date->tm_gmtoff = 0;
#endif
--
2.31.1
- [PULL 00/23] First testing patches for QEMU 7.2, Thomas Huth, 2022/08/30
- [PULL 02/23] tests/qtest: Use g_mkdtemp(), Thomas Huth, 2022/08/30
- [PULL 04/23] tests/qtest: migration-test: Handle link() for win32, Thomas Huth, 2022/08/30
- [PULL 05/23] backends/tpm: Exclude headers and macros that don't exist on win32, Thomas Huth, 2022/08/30
- [PULL 09/23] tests/qtest: i440fx-test: Skip running request_{bios, pflash} for win32, Thomas Huth, 2022/08/30
- [PULL 03/23] tests: Use g_mkdir_with_parents(), Thomas Huth, 2022/08/30
- [PULL 06/23] tests/qtest: Adapt {m48t59,rtc}-test cases for win32,
Thomas Huth <=
- [PULL 10/23] tests/qtest: migration-test: Skip running test_migrate_fd_proto on win32, Thomas Huth, 2022/08/30
- [PULL 08/23] tests/qtest: Build cases that use memory-backend-file for posix only, Thomas Huth, 2022/08/30
- [PULL 11/23] tests/qtest: libqos: Drop inclusion of <sys/wait.h>, Thomas Huth, 2022/08/30
- [PULL 07/23] tests/qtest: Build e1000e-test for posix only, Thomas Huth, 2022/08/30
- [PULL 17/23] tests/vm: Add libslirp to the VM tests, Thomas Huth, 2022/08/30
- [PULL 19/23] tests/avocado: Fix trivial typo, Thomas Huth, 2022/08/30
- [PULL 01/23] tests/qtest: Use g_setenv(), Thomas Huth, 2022/08/30
- [PULL 18/23] tests/avocado: Do not run tests that require libslirp if it is not available, Thomas Huth, 2022/08/30
- [PULL 21/23] gitlab-ci: Only use one process in Windows jobs for compilation, Thomas Huth, 2022/08/30
- [PULL 22/23] tests/qtest/ac97-test: Correct reference to driver, Thomas Huth, 2022/08/30