From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: autotest@test.kernel.org, kvm@vger.kernel.org
Subject: Re: [Autotest] [PATCH 2/3] KVM test: Create ksm scanner through pre_command
Date: Thu, 6 May 2010 14:05:48 -0300 [thread overview]
Message-ID: <v2i6ac58f4f1005061005xda45dc35xc84cc832725fcf73@mail.gmail.com> (raw)
In-Reply-To: <20100426100734.26501.22279.stgit@localhost.localdomain>
On Mon, Apr 26, 2010 at 7:07 AM, Jason Wang <jasowang@redhat.com> wrote:
> KSM may have various control interface for different distributions,so
> this patch launch ksm through pre_command instead of the hard-coded
> bits in the test. User may specify their owner suitable commands or
> paramteres.
Applied, thanks!
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> client/tests/kvm/tests/ksm_overcommit.py | 15 ---------------
> client/tests/kvm/tests_base.cfg.sample | 2 ++
> 2 files changed, 2 insertions(+), 15 deletions(-)
>
> diff --git a/client/tests/kvm/tests/ksm_overcommit.py b/client/tests/kvm/tests/ksm_overcommit.py
> index 2dd46c4..4aa6deb 100644
> --- a/client/tests/kvm/tests/ksm_overcommit.py
> +++ b/client/tests/kvm/tests/ksm_overcommit.py
> @@ -412,21 +412,6 @@ def run_ksm_overcommit(test, params, env):
> (3100 - 64.0)))
> mem = int(math.floor(host_mem * overcommit / vmsc))
>
> - logging.debug("Checking KSM status...")
> - ksm_flag = 0
> - for line in os.popen('ksmctl info').readlines():
> - if line.startswith('flags'):
> - ksm_flag = int(line.split(' ')[1].split(',')[0])
> - if int(ksm_flag) != 1:
> - logging.info("KSM module is not loaded! Trying to load module and "
> - "start ksmctl...")
> - try:
> - utils.run("modprobe ksm")
> - utils.run("ksmctl start 5000 100")
> - except error.CmdError, e:
> - raise error.TestFail("Failed to load KSM: %s" % e)
> - logging.debug("KSM module loaded and ksmctl started")
> -
> swap = int(utils.read_from_meminfo("SwapTotal")) / 1024
>
> logging.debug("Overcommit = %f", overcommit)
> diff --git a/client/tests/kvm/tests_base.cfg.sample b/client/tests/kvm/tests_base.cfg.sample
> index e73ba44..2db0d2c 100644
> --- a/client/tests/kvm/tests_base.cfg.sample
> +++ b/client/tests/kvm/tests_base.cfg.sample
> @@ -285,6 +285,8 @@ variants:
> catch_uuid_cmd = dmidecode | awk -F: '/UUID/ {print $2}'
>
> - ksm_overcommit:
> + pre_command = "[ -e /dev/ksm ] && true || modprobe ksm && ksmctl start 5000 50"
> + pre_command_critical = yes
> # Don't preprocess any vms as we need to change its params
> vms = ''
> image_snapshot = yes
>
> _______________________________________________
> Autotest mailing list
> Autotest@test.kernel.org
> http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
>
--
Lucas
next prev parent reply other threads:[~2010-05-06 17:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-26 10:07 [PATCH 1/3] KVM test: Use customized command to get the version of kvm and its Jason Wang
2010-04-26 10:07 ` [PATCH 2/3] KVM test: Create ksm scanner through pre_command Jason Wang
2010-05-06 17:05 ` Lucas Meneghel Rodrigues [this message]
2010-04-26 10:07 ` [PATCH 3/3] KVM test: Remove the duplicated KERNEL paramters in the pxe configuration file Jason Wang
2010-05-06 17:01 ` [Autotest] " Lucas Meneghel Rodrigues
2010-05-06 17:16 ` [Autotest] [PATCH 1/3] KVM test: Use customized command to get the version of kvm and its Lucas Meneghel Rodrigues
2010-05-07 10:10 ` Jason Wang
2010-05-07 12:17 ` Lucas Meneghel Rodrigues
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=v2i6ac58f4f1005061005xda45dc35xc84cc832725fcf73@mail.gmail.com \
--to=lmr@redhat.com \
--cc=autotest@test.kernel.org \
--cc=jasowang@redhat.com \
--cc=kvm@vger.kernel.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).