Commit b5f953ba authored by Nick Kralevich's avatar Nick Kralevich
Browse files

SELinuxDomainTest: Fix mako CTS failure

Mako kernel threads have spaces in their names, which confuses the
/proc/PID/stat parsing code. Rather than use split to parse the
line, use a regular expression.

Addresses the following test failure:

  android.security.cts.SELinuxDomainTest#testKernelDomain
  junit.framework.AssertionFailedError: Non Kernel thread "pid: "64" proctitle: "" label: "u:r:kernel:s0" vsize: 107" found!
  at junit.framework.Assert.fail(Assert.java:50)
  at junit.framework.Assert.assertTrue(Assert.java:20)
  at android.security.cts.SELinuxDomainTest.testKernelDomain(SELinuxDomainTest.java:247)

which is caused by the following two kernel threads:

  shell@mako:/ $ ps
  USER     PID   PPID  VSIZE  RSS     WCHAN    PC         NAME
  [deleted]
  root      62    2     0      0     ffffffff 00000000 S irq/337-mdm sta
  root      63    2     0      0     ffffffff 00000000 S irq/334-mdm pbl

Change-Id: If8bc463a0da3d4fe7ecef005ffda02306c92966f
parent bdbc99e1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment