client tests: fix pgrep usage

The current autotest code runs pgrep with fd 1 (stdout) and fd 2 (stderr)
closed.  Not redirected to /dev/null, but straight up closed.

For older versions, pgrep wouldn't complain and would happily exit(0):
write(1, "31396\n31398\n31400\n31405\n31425\n31"..., 42) = -1 EBADF (Bad file descriptor)
exit_group(0)

But the newer version checks the return value of the write() which causes
it to fail and exit(1) when it otherwise worked:
write(1, "31396\n31398\n31400\n31405\n31425\n31"..., 42) = -1 EBADF (Bad file descriptor)
close(1)                          = -1 EBADF (Bad file descriptor)
write(2, "pgrep-3.3: ", 11)       = -1 EBADF (Bad file descriptor)
write(2, "write error", 11)       = -1 EBADF (Bad file descriptor)
write(2, ": Bad file descriptor", 21) = -1 EBADF (Bad file descriptor)
exit_group(1)

This is arguably bad behavior in autotest as it shouldn't run random
programs with stdout/stderr completely disconnected.

We could use utils.run and utils.system, but those both end up logging
all the output and making things noisy.  So just redirect stdout to
/dev/null manually.

BUG=chromium:221806
TEST=`cbuildbot {arm,amd64,x86}-generic-full` passes vmtests w/new & old procps versions

Change-Id: I020f5f1b2d2fd3d9b9df5704eed12103ee803fa0
Reviewed-on: https://gerrit.chromium.org/gerrit/57073
Reviewed-by: Chris Sosa <sosa@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
5 files changed