[Libguestfs] [PATCH nbdkit] tests: Add generic requires function.