From 92ece16fa9ec89174cc7cad4aa42d394a077087f Mon Sep 17 00:00:00 2001 From: djm Date: Thu, 8 Feb 2018 08:46:20 +0000 Subject: [PATCH] some helpers to check verbose/quiet mode --- .../ssh/unittests/test_helper/test_helper.c | 14 +++++++++++++- .../ssh/unittests/test_helper/test_helper.h | 4 +++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/regress/usr.bin/ssh/unittests/test_helper/test_helper.c b/regress/usr.bin/ssh/unittests/test_helper/test_helper.c index 95b2e93bcb6..8efe4d4aa47 100644 --- a/regress/usr.bin/ssh/unittests/test_helper/test_helper.c +++ b/regress/usr.bin/ssh/unittests/test_helper/test_helper.c @@ -1,4 +1,4 @@ -/* $OpenBSD: test_helper.c,v 1.7 2017/03/14 01:10:07 dtucker Exp $ */ +/* $OpenBSD: test_helper.c,v 1.8 2018/02/08 08:46:20 djm Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -147,6 +147,18 @@ main(int argc, char **argv) return 0; } +int +test_is_verbose() +{ + return verbose_mode; +} + +int +test_is_quiet() +{ + return quiet_mode; +} + const char * test_data_file(const char *name) { diff --git a/regress/usr.bin/ssh/unittests/test_helper/test_helper.h b/regress/usr.bin/ssh/unittests/test_helper/test_helper.h index 33f5eaf4a6c..7d9e6749222 100644 --- a/regress/usr.bin/ssh/unittests/test_helper/test_helper.h +++ b/regress/usr.bin/ssh/unittests/test_helper/test_helper.h @@ -1,4 +1,4 @@ -/* $OpenBSD: test_helper.h,v 1.7 2017/03/14 01:10:07 dtucker Exp $ */ +/* $OpenBSD: test_helper.h,v 1.8 2018/02/08 08:46:20 djm Exp $ */ /* * Copyright (c) 2011 Damien Miller * @@ -39,6 +39,8 @@ void test_start(const char *n); void test_info(char *s, size_t len); void set_onerror_func(test_onerror_func_t *f, void *ctx); void test_done(void); +int test_is_verbose(void); +int test_is_quiet(void); void test_subtest_info(const char *fmt, ...) __attribute__((format(printf, 1, 2))); void ssl_err_check(const char *file, int line); -- 2.20.1