#SNIP
+ pwd = item.mk_cgroup()
+ if pwd == None:
+ logging.error("test_memory: Can't create cgroup")
+ return -1
+
+ logging.debug("test_memory: Memory filling test")
+
+ f = open('/proc/meminfo','r')
Not clean way how to do this.. It is better to use regular expression.
But this is absolutely no important.
OKi, anyway Ypu is trying to get get_mem_usage() function into utils.
I'll use it then.
+ mem = f.readline()
+ while not mem.startswith("MemFree"):
+ mem = f.readline()
#SNIP
+ logging.error("cg.smoke_test[%d]: Can't remove cgroup direcotry",
+ part)
+ return -1
+
+ # Finish the process
+ part += 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 accept
it?). 10 seconds seems to be more safe DL, thanks.
+ if (ps.poll() == None):
+ logging.error("cg.smoke_test[%d]: Process is not finished", part)
+ return -1
+
+ return 0
+
+
#SNIP
Thank you, Jiří.
kind regards,
Lukáš
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html