vts: fix ProcZoneInfoTest test failure
Linux kernel has prevent to print nr_indirectly_reclaimable in below commit.
It lead to no string printed when to print the last line of per-node stats.
Add compatible item to match such case.
commit d62b8ac8cd540c39a10d94c1fe5389f994a82e1a
Author: Roman Gushchin <guro@fb.com>
Date: Fri May 11 16:01:53 2018 -0700
mm: don't show nr_indirectly_reclaimable in /proc/vmstat
commit 7aaf7727235870f497eb928f728f7773d6df3b40 upstream.
Don't show nr_indirectly_reclaimable in /proc/vmstat, because there is
no need to export this vm counter to userspace, and some changes are
expected in reclaimable object accounting, which can alter this counter.
Link: http://lkml.kernel.org/r/20180425191422.9159-1-guro@fb.com
Change-Id: I386e674db09dcbbda1f31d1043d382f7c9f6bbc2
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
diff --git a/api/proc/ProcZoneInfoTest.py b/api/proc/ProcZoneInfoTest.py
index dda233d..0b0f159 100644
--- a/api/proc/ProcZoneInfoTest.py
+++ b/api/proc/ProcZoneInfoTest.py
@@ -73,8 +73,12 @@
p[0] = p[1]
def p_line(self, p):
- 'line : STRING NUMBER NEWLINE'
- p[0] = p[1:3]
+ '''line : STRING NUMBER NEWLINE
+ | NUMBER NEWLINE'''
+ if len(p) == 4:
+ p[0] = p[1:3]
+ else:
+ p[0] = p[1]
def p_cpu(self, p):
'cpu : CPU COLON NUMBER NEWLINE colonline colonline colonline \