From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?THVrw6HFoSBEb2t0b3I=?= Subject: Re: [PATCH 1/4] [NEW] cgroup test * general smoke_test + module dependend subtests (memory test included) * library for future use in other tests (kvm) Date: Sun, 21 Aug 2011 11:15:14 +0200 Message-ID: <4E50CCA2.5010200@redhat.com> References: <919030077.251272.1313667202539.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: root , autotest@test.kernel.org, kvm@vger.kernel.org, kvm-autotest@redhat.com, fyang@redhat.com, lmr@redhat.com To: Jiri Zupka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:16002 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751282Ab1HUJPZ (ORCPT ); Sun, 21 Aug 2011 05:15:25 -0400 In-Reply-To: <919030077.251272.1313667202539.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: #SNIP >> + pwd =3D item.mk_cgroup() >> + if pwd =3D=3D None: >> + logging.error("test_memory: Can't create cgroup") >> + return -1 >> + >> + logging.debug("test_memory: Memory filling test") >> + >> + f =3D open('/proc/meminfo','r') > > Not clean way how to do this.. It is better to use regular expression= =2E > But this is absolutely no important. > OKi, anyway Ypu is trying to get get_mem_usage() function into utils.=20 I'll use it then. >> + mem =3D f.readline() >> + while not mem.startswith("MemFree"): >> + mem =3D f.readline() #SNIP >> + logging.error("cg.smoke_test[%d]: Can't remove cgroup direcotry", >> + part) >> + return -1 >> + >> + # Finish the process >> + part +=3D 1 >> + ps.stdin.write('\n') >> + time.sleep(2) > > There should be bigger timeout. This is sometime make problem. > Process ends correct way but not in timeout. > OK, Lucas, can you please change it in patchset (if you intend to accep= t=20 it?). 10 seconds seems to be more safe DL, thanks. >> + if (ps.poll() =3D=3D None): >> + logging.error("cg.smoke_test[%d]: Process is not finished", part) >> + return -1 >> + >> + return 0 >> + >> + #SNIP Thank you, Ji=C5=99=C3=AD. kind regards, Luk=C3=A1=C5=A1