From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] tst_virt: Make use of systemd-detect-virt if available
Date: Thu, 25 Aug 2016 16:09:30 +0200 [thread overview]
Message-ID: <20160825140930.GJ10490@rei.lan> (raw)
In-Reply-To: <1783998347.724638.1471526149366.JavaMail.zimbra@redhat.com>
Hi!
> > You can also boot QEMU with non-default -cpu option and you will get the
> > same result.
> >
> > The easiest solution is to try the systemd-detect-virt first if it
> > exists, then we fall back to the previously implemented detections for
> > older distributions. This is not complete solution though, as the
> > detection still fails with older and non-systemd distributions.
> >
> > Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
> > ---
>
> We could also add a function that tries "virt-what", to increase our chances.
> Anyway, I think it's good idea to not rely just on /proc/cpuinfo.
Looking around virt-what does not seem to be installed by default on
anything I have here so it does not seem to add too much value. Feel
free to add it if you have a usecase.
Another option would be more or less copying what systemd-detect-virt
does, checking dmi, etc. But that is 500 lines of heuristics and
maintaining that would take take non-trivial amount of effort I would
rather like to spend on something more productive...
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-08-25 14:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-18 12:38 [LTP] [PATCH] tst_virt: Make use of systemd-detect-virt if available Cyril Hrubis
2016-08-18 13:15 ` Jan Stancek
2016-08-25 14:09 ` Cyril Hrubis [this message]
2016-08-31 13:51 ` Cyril Hrubis
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=20160825140930.GJ10490@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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