From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, Bruce Rogers <brogers@suse.com>
Subject: [Qemu-devel] [PULL for-2.9 3/3] tests: check path to avoid a failing qga/get-vcpus test
Date: Mon, 6 Mar 2017 02:03:42 -0600 [thread overview]
Message-ID: <1488787422-30487-4-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1488787422-30487-1-git-send-email-mdroth@linux.vnet.ibm.com>
From: Bruce Rogers <brogers@suse.com>
The qga/get-vcpus test fails in a simple chroot environment, as
used in an openSUSE Build Service local build, so first check
that the sysfs based path exists in order to avoid calling this
test in an environment where it won't work right.
Signed-off-by: Bruce Rogers <brogers@suse.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
tests/test-qga.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/test-qga.c b/tests/test-qga.c
index 868b02a..9e6d19a 100644
--- a/tests/test-qga.c
+++ b/tests/test-qga.c
@@ -924,7 +924,9 @@ int main(int argc, char **argv)
g_test_add_data_func("/qga/info", &fix, test_qga_info);
g_test_add_data_func("/qga/network-get-interfaces", &fix,
test_qga_network_get_interfaces);
- g_test_add_data_func("/qga/get-vcpus", &fix, test_qga_get_vcpus);
+ if (!access("/sys/devices/system/cpu/cpu0", F_OK)) {
+ g_test_add_data_func("/qga/get-vcpus", &fix, test_qga_get_vcpus);
+ }
g_test_add_data_func("/qga/get-fsinfo", &fix, test_qga_get_fsinfo);
g_test_add_data_func("/qga/get-memory-block-info", &fix,
test_qga_get_memory_block_info);
--
2.7.4
next prev parent reply other threads:[~2017-03-06 8:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-06 8:03 [Qemu-devel] [PULL for-2.9 0/3] qemu-ga patch queue for 2.9 Michael Roth
2017-03-06 8:03 ` [Qemu-devel] [PULL for-2.9 1/3] qga: add systemd socket activation support Michael Roth
2017-03-06 8:03 ` [Qemu-devel] [PULL for-2.9 2/3] qga: ignore EBUSY when freezing a filesystem Michael Roth
2017-03-06 8:03 ` Michael Roth [this message]
2017-03-07 9:09 ` [Qemu-devel] [PULL for-2.9 0/3] qemu-ga patch queue for 2.9 Peter Maydell
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=1488787422-30487-4-git-send-email-mdroth@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=brogers@suse.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).