tests: Introduce is_command() 40/14040/12
authorAndrew Deason <adeason@sinenomine.net>
Tue, 21 Jan 2020 21:40:12 +0000 (15:40 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 13 Aug 2021 19:08:03 +0000 (15:08 -0400)
commit15d033d0df85695f0d5a38e03cdfa51301d7f650
tree68fd360e098c99deb96685f038362552d44d3eaf
parent40d6644264db8a581800a524176cece34e90a1e1
tests: Introduce is_command()

Add a new function (is_command), to help implementing tests that
involve running a command. This works like is_string(), except the
string value we compare against is the output of the provided command,
and we also check the exit code of the command.

Convert the existing execl() call in volser/vos-t to use this new
function.

Change-Id: I4a75b1a0333e608da6a6cd69838350116a2503a9
Reviewed-on: https://gerrit.openafs.org/14040
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
tests/common/Makefile.in
tests/common/common.h
tests/common/exec.c [new file with mode: 0644]
tests/volser/vos-t.c