summaryrefslogtreecommitdiffstats
path: root/contrib/atf/atf-c/detail
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/atf/atf-c/detail')
-rw-r--r--contrib/atf/atf-c/detail/dynstr.c16
-rw-r--r--contrib/atf/atf-c/detail/dynstr.h14
-rw-r--r--contrib/atf/atf-c/detail/dynstr_test.c13
-rw-r--r--contrib/atf/atf-c/detail/env.c28
-rw-r--r--contrib/atf/atf-c/detail/env.h15
-rw-r--r--contrib/atf/atf-c/detail/env_test.c35
-rw-r--r--contrib/atf/atf-c/detail/fs.c20
-rw-r--r--contrib/atf/atf-c/detail/fs.h17
-rw-r--r--contrib/atf/atf-c/detail/fs_test.c15
-rw-r--r--contrib/atf/atf-c/detail/list.c14
-rw-r--r--contrib/atf/atf-c/detail/list.h14
-rw-r--r--contrib/atf/atf-c/detail/list_test.c14
-rw-r--r--contrib/atf/atf-c/detail/map.c14
-rw-r--r--contrib/atf/atf-c/detail/map.h17
-rw-r--r--contrib/atf/atf-c/detail/map_test.c14
-rw-r--r--contrib/atf/atf-c/detail/process.c14
-rw-r--r--contrib/atf/atf-c/detail/process.h19
-rw-r--r--contrib/atf/atf-c/detail/process_helpers.c8
-rw-r--r--contrib/atf/atf-c/detail/process_test.c16
-rw-r--r--contrib/atf/atf-c/detail/sanity.c16
-rw-r--r--contrib/atf/atf-c/detail/sanity.h14
-rw-r--r--contrib/atf/atf-c/detail/sanity_test.c19
-rw-r--r--contrib/atf/atf-c/detail/test_helpers.c26
-rw-r--r--contrib/atf/atf-c/detail/test_helpers.h17
-rw-r--r--contrib/atf/atf-c/detail/text.c16
-rw-r--r--contrib/atf/atf-c/detail/text.h17
-rw-r--r--contrib/atf/atf-c/detail/text_test.c15
-rw-r--r--contrib/atf/atf-c/detail/tp_main.c23
-rw-r--r--contrib/atf/atf-c/detail/user.c13
-rw-r--r--contrib/atf/atf-c/detail/user.h14
-rw-r--r--contrib/atf/atf-c/detail/user_test.c13
-rw-r--r--contrib/atf/atf-c/detail/version_helper.c2
32 files changed, 218 insertions, 304 deletions
diff --git a/contrib/atf/atf-c/detail/dynstr.c b/contrib/atf/atf-c/detail/dynstr.c
index e533a81..424a1c9 100644
--- a/contrib/atf/atf-c/detail/dynstr.c
+++ b/contrib/atf/atf-c/detail/dynstr.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,8 +21,9 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/dynstr.h"
#include <errno.h>
#include <stdarg.h>
@@ -34,12 +32,10 @@
#include <stdlib.h>
#include <string.h>
+#include "atf-c/detail/sanity.h"
+#include "atf-c/detail/text.h"
#include "atf-c/error.h"
-#include "dynstr.h"
-#include "sanity.h"
-#include "text.h"
-
/* ---------------------------------------------------------------------
* Auxiliary functions.
* --------------------------------------------------------------------- */
diff --git a/contrib/atf/atf-c/detail/dynstr.h b/contrib/atf/atf-c/detail/dynstr.h
index c82209a..60b8e42 100644
--- a/contrib/atf/atf-c/detail/dynstr.h
+++ b/contrib/atf/atf-c/detail/dynstr.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,11 +21,10 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if !defined(ATF_C_DYNSTR_H)
-#define ATF_C_DYNSTR_H
+#if !defined(ATF_C_DETAIL_DYNSTR_H)
+#define ATF_C_DETAIL_DYNSTR_H
#include <stdarg.h>
#include <stdbool.h>
@@ -78,4 +74,4 @@ atf_error_t atf_dynstr_prepend_fmt(atf_dynstr_t *, const char *, ...);
bool atf_equal_dynstr_cstring(const atf_dynstr_t *, const char *);
bool atf_equal_dynstr_dynstr(const atf_dynstr_t *, const atf_dynstr_t *);
-#endif /* ATF_C_DYNSTR_H */
+#endif /* !defined(ATF_C_DETAIL_DYNSTR_H) */
diff --git a/contrib/atf/atf-c/detail/dynstr_test.c b/contrib/atf/atf-c/detail/dynstr_test.c
index 1b68d38..2512752 100644
--- a/contrib/atf/atf-c/detail/dynstr_test.c
+++ b/contrib/atf/atf-c/detail/dynstr_test.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,8 +21,9 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/dynstr.h"
#include <stdarg.h>
#include <stdint.h>
@@ -35,8 +33,7 @@
#include <atf-c.h>
-#include "dynstr.h"
-#include "test_helpers.h"
+#include "atf-c/detail/test_helpers.h"
/* ---------------------------------------------------------------------
* Tests for the "atf_dynstr" type.
diff --git a/contrib/atf/atf-c/detail/env.c b/contrib/atf/atf-c/detail/env.c
index feb4ee5..8ee3d69 100644
--- a/contrib/atf/atf-c/detail/env.c
+++ b/contrib/atf/atf-c/detail/env.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2007 The NetBSD Foundation, Inc.
+/* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,22 +21,21 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/env.h"
#if defined(HAVE_CONFIG_H)
-#include "bconfig.h"
+#include "config.h"
#endif
#include <errno.h>
#include <stdlib.h>
+#include "atf-c/detail/sanity.h"
+#include "atf-c/detail/text.h"
#include "atf-c/error.h"
-#include "env.h"
-#include "sanity.h"
-#include "text.h"
-
const char *
atf_env_get(const char *name)
{
@@ -48,6 +44,16 @@ atf_env_get(const char *name)
return val;
}
+const char *
+atf_env_get_with_default(const char *name, const char *default_value)
+{
+ const char* val = getenv(name);
+ if (val == NULL)
+ return default_value;
+ else
+ return val;
+}
+
bool
atf_env_has(const char *name)
{
diff --git a/contrib/atf/atf-c/detail/env.h b/contrib/atf/atf-c/detail/env.h
index c0d07a3..5d29440 100644
--- a/contrib/atf/atf-c/detail/env.h
+++ b/contrib/atf/atf-c/detail/env.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,19 +21,19 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if !defined(ATF_C_ENV_H)
-#define ATF_C_ENV_H
+#if !defined(ATF_C_DETAIL_ENV_H)
+#define ATF_C_DETAIL_ENV_H
#include <stdbool.h>
#include <atf-c/error_fwd.h>
const char *atf_env_get(const char *);
+const char *atf_env_get_with_default(const char *, const char *);
bool atf_env_has(const char *);
atf_error_t atf_env_set(const char *, const char *);
atf_error_t atf_env_unset(const char *);
-#endif /* !defined(ATF_C_ENV_H) */
+#endif /* !defined(ATF_C_DETAIL_ENV_H) */
diff --git a/contrib/atf/atf-c/detail/env_test.c b/contrib/atf/atf-c/detail/env_test.c
index 6ebf36c..3909c29 100644
--- a/contrib/atf/atf-c/detail/env_test.c
+++ b/contrib/atf/atf-c/detail/env_test.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2007 The NetBSD Foundation, Inc.
+/* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,17 +21,17 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/env.h"
#include <stdlib.h>
#include <string.h>
#include <atf-c.h>
-#include "env.h"
-#include "test_helpers.h"
-#include "text.h"
+#include "atf-c/detail/test_helpers.h"
+#include "atf-c/detail/text.h"
/* ---------------------------------------------------------------------
* Test cases for the free functions.
@@ -67,6 +64,25 @@ ATF_TC_BODY(get, tc)
ATF_REQUIRE(strchr(val, ':') != NULL);
}
+ATF_TC(get_with_default);
+ATF_TC_HEAD(get_with_default, tc)
+{
+ atf_tc_set_md_var(tc, "descr", "Tests the atf_env_get_with_default "
+ "function");
+}
+ATF_TC_BODY(get_with_default, tc)
+{
+ const char *val;
+
+ ATF_REQUIRE(atf_env_has("PATH"));
+
+ val = atf_env_get_with_default("PATH", "unknown");
+ ATF_REQUIRE(strcmp(val, "unknown") != 0);
+
+ val = atf_env_get_with_default("_UNKNOWN_VARIABLE_", "foo bar");
+ ATF_REQUIRE(strcmp(val, "foo bar") == 0);
+}
+
ATF_TC(set);
ATF_TC_HEAD(set, tc)
{
@@ -109,6 +125,7 @@ ATF_TP_ADD_TCS(tp)
{
ATF_TP_ADD_TC(tp, has);
ATF_TP_ADD_TC(tp, get);
+ ATF_TP_ADD_TC(tp, get_with_default);
ATF_TP_ADD_TC(tp, set);
ATF_TP_ADD_TC(tp, unset);
diff --git a/contrib/atf/atf-c/detail/fs.c b/contrib/atf/atf-c/detail/fs.c
index 22cbca4..5ff7648 100644
--- a/contrib/atf/atf-c/detail/fs.c
+++ b/contrib/atf/atf-c/detail/fs.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2007 The NetBSD Foundation, Inc.
+/* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,11 +21,12 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/fs.h"
#if defined(HAVE_CONFIG_H)
-#include "bconfig.h"
+#include "config.h"
#endif
#include <sys/types.h>
@@ -47,13 +45,11 @@
#include <unistd.h>
#include "atf-c/defs.h"
+#include "atf-c/detail/sanity.h"
+#include "atf-c/detail/text.h"
+#include "atf-c/detail/user.h"
#include "atf-c/error.h"
-#include "fs.h"
-#include "sanity.h"
-#include "text.h"
-#include "user.h"
-
/* ---------------------------------------------------------------------
* Prototypes for auxiliary functions.
* --------------------------------------------------------------------- */
diff --git a/contrib/atf/atf-c/detail/fs.h b/contrib/atf/atf-c/detail/fs.h
index ec77c3b..1c6c0eb 100644
--- a/contrib/atf/atf-c/detail/fs.h
+++ b/contrib/atf/atf-c/detail/fs.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,11 +21,10 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if !defined(ATF_C_FS_H)
-#define ATF_C_FS_H
+#if !defined(ATF_C_DETAIL_FS_H)
+#define ATF_C_DETAIL_FS_H
#include <sys/types.h>
#include <sys/stat.h>
@@ -36,10 +32,9 @@
#include <stdarg.h>
#include <stdbool.h>
+#include <atf-c/detail/dynstr.h>
#include <atf-c/error_fwd.h>
-#include "dynstr.h"
-
/* ---------------------------------------------------------------------
* The "atf_fs_path" type.
* --------------------------------------------------------------------- */
@@ -130,4 +125,4 @@ atf_error_t atf_fs_mkstemp(atf_fs_path_t *, int *);
atf_error_t atf_fs_rmdir(const atf_fs_path_t *);
atf_error_t atf_fs_unlink(const atf_fs_path_t *);
-#endif /* !defined(ATF_C_FS_H) */
+#endif /* !defined(ATF_C_DETAIL_FS_H) */
diff --git a/contrib/atf/atf-c/detail/fs_test.c b/contrib/atf/atf-c/detail/fs_test.c
index 043304a..3dbc4d3 100644
--- a/contrib/atf/atf-c/detail/fs_test.c
+++ b/contrib/atf/atf-c/detail/fs_test.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2007 The NetBSD Foundation, Inc.
+/* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,8 +21,9 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/fs.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -39,9 +37,8 @@
#include <atf-c.h>
-#include "fs.h"
-#include "test_helpers.h"
-#include "user.h"
+#include "atf-c/detail/test_helpers.h"
+#include "atf-c/detail/user.h"
/* ---------------------------------------------------------------------
* Auxiliary functions.
diff --git a/contrib/atf/atf-c/detail/list.c b/contrib/atf/atf-c/detail/list.c
index 0d005ad..d14216e 100644
--- a/contrib/atf/atf-c/detail/list.c
+++ b/contrib/atf/atf-c/detail/list.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,18 +21,17 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/list.h"
#include <stdlib.h>
#include <string.h>
+#include "atf-c/detail/sanity.h"
#include "atf-c/error.h"
#include "atf-c/utils.h"
-#include "list.h"
-#include "sanity.h"
-
/* ---------------------------------------------------------------------
* Auxiliary functions.
* --------------------------------------------------------------------- */
diff --git a/contrib/atf/atf-c/detail/list.h b/contrib/atf/atf-c/detail/list.h
index 2c0fbcb..b250066 100644
--- a/contrib/atf/atf-c/detail/list.h
+++ b/contrib/atf/atf-c/detail/list.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,11 +21,10 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if !defined(ATF_C_LIST_H)
-#define ATF_C_LIST_H
+#if !defined(ATF_C_DETAIL_LIST_H)
+#define ATF_C_DETAIL_LIST_H
#include <stdarg.h>
#include <stdbool.h>
@@ -112,4 +108,4 @@ void atf_list_append_list(atf_list_t *, atf_list_t *);
!atf_equal_list_citer_list_citer((iter), atf_list_end_c(list)); \
iter = atf_list_citer_next(iter))
-#endif /* ATF_C_LIST_H */
+#endif /* !defined(ATF_C_DETAIL_LIST_H) */
diff --git a/contrib/atf/atf-c/detail/list_test.c b/contrib/atf/atf-c/detail/list_test.c
index 3aa576c..82a715d 100644
--- a/contrib/atf/atf-c/detail/list_test.c
+++ b/contrib/atf/atf-c/detail/list_test.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,19 +21,18 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/list.h"
#include <stdio.h>
#include <string.h>
#include <atf-c.h>
+#include "atf-c/detail/test_helpers.h"
#include "atf-c/utils.h"
-#include "list.h"
-#include "test_helpers.h"
-
/* ---------------------------------------------------------------------
* Tests for the "atf_list" type.
* --------------------------------------------------------------------- */
diff --git a/contrib/atf/atf-c/detail/map.c b/contrib/atf/atf-c/detail/map.c
index 7395adf..34aaae2 100644
--- a/contrib/atf/atf-c/detail/map.c
+++ b/contrib/atf/atf-c/detail/map.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,19 +21,18 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/map.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include "atf-c/detail/sanity.h"
#include "atf-c/error.h"
#include "atf-c/utils.h"
-#include "map.h"
-#include "sanity.h"
-
/* ---------------------------------------------------------------------
* Auxiliary functions.
* --------------------------------------------------------------------- */
diff --git a/contrib/atf/atf-c/detail/map.h b/contrib/atf/atf-c/detail/map.h
index a3ed7a2..7ca8e8a 100644
--- a/contrib/atf/atf-c/detail/map.h
+++ b/contrib/atf/atf-c/detail/map.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,19 +21,17 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if !defined(ATF_C_MAP_H)
-#define ATF_C_MAP_H
+#if !defined(ATF_C_DETAIL_MAP_H)
+#define ATF_C_DETAIL_MAP_H
#include <stdarg.h>
#include <stdbool.h>
+#include <atf-c/detail/list.h>
#include <atf-c/error_fwd.h>
-#include "list.h"
-
/* ---------------------------------------------------------------------
* The "atf_map_citer" type.
* --------------------------------------------------------------------- */
@@ -116,4 +111,4 @@ atf_error_t atf_map_insert(atf_map_t *, const char *, void *, bool);
!atf_equal_map_citer_map_citer((iter), atf_map_end_c(map)); \
iter = atf_map_citer_next(iter))
-#endif /* ATF_C_MAP_H */
+#endif /* !defined(ATF_C_DETAIL_MAP_H) */
diff --git a/contrib/atf/atf-c/detail/map_test.c b/contrib/atf/atf-c/detail/map_test.c
index 644ab69..0982e20f 100644
--- a/contrib/atf/atf-c/detail/map_test.c
+++ b/contrib/atf/atf-c/detail/map_test.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,19 +21,18 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/map.h"
#include <stdio.h>
#include <string.h>
#include <atf-c.h>
+#include "atf-c/detail/test_helpers.h"
#include "atf-c/utils.h"
-#include "map.h"
-#include "test_helpers.h"
-
/* ---------------------------------------------------------------------
* Tests for the "atf_map" type.
* --------------------------------------------------------------------- */
diff --git a/contrib/atf/atf-c/detail/process.c b/contrib/atf/atf-c/detail/process.c
index bc36b57..8e08b6c 100644
--- a/contrib/atf/atf-c/detail/process.c
+++ b/contrib/atf/atf-c/detail/process.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2007 The NetBSD Foundation, Inc.
+/* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,8 +21,9 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/process.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -38,11 +36,9 @@
#include <unistd.h>
#include "atf-c/defs.h"
+#include "atf-c/detail/sanity.h"
#include "atf-c/error.h"
-#include "process.h"
-#include "sanity.h"
-
/* This prototype is not in the header file because this is a private
* function; however, we need to access it during testing. */
atf_error_t atf_process_status_init(atf_process_status_t *, int);
diff --git a/contrib/atf/atf-c/detail/process.h b/contrib/atf/atf-c/detail/process.h
index b4aad3d..81158d0 100644
--- a/contrib/atf/atf-c/detail/process.h
+++ b/contrib/atf/atf-c/detail/process.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,21 +21,19 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if !defined(ATF_C_PROCESS_H)
-#define ATF_C_PROCESS_H
+#if !defined(ATF_C_DETAIL_PROCESS_H)
+#define ATF_C_DETAIL_PROCESS_H
#include <sys/types.h>
#include <stdbool.h>
+#include <atf-c/detail/fs.h>
+#include <atf-c/detail/list.h>
#include <atf-c/error_fwd.h>
-#include "fs.h"
-#include "list.h"
-
/* ---------------------------------------------------------------------
* The "atf_process_stream" type.
* --------------------------------------------------------------------- */
@@ -133,4 +128,4 @@ atf_error_t atf_process_exec_list(atf_process_status_t *,
const atf_process_stream_t *,
void (*)(void));
-#endif /* !defined(ATF_C_PROCESS_H) */
+#endif /* !defined(ATF_C_DETAIL_PROCESS_H) */
diff --git a/contrib/atf/atf-c/detail/process_helpers.c b/contrib/atf/atf-c/detail/process_helpers.c
index 61f1b67..47b90bc 100644
--- a/contrib/atf/atf-c/detail/process_helpers.c
+++ b/contrib/atf/atf-c/detail/process_helpers.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,8 +21,7 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#include <sys/types.h>
diff --git a/contrib/atf/atf-c/detail/process_test.c b/contrib/atf/atf-c/detail/process_test.c
index 9e55f70..5ae5565 100644
--- a/contrib/atf/atf-c/detail/process_test.c
+++ b/contrib/atf/atf-c/detail/process_test.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,8 +21,9 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/process.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -43,10 +41,8 @@
#include <atf-c.h>
#include "atf-c/defs.h"
-
-#include "process.h"
-#include "sanity.h"
-#include "test_helpers.h"
+#include "atf-c/detail/sanity.h"
+#include "atf-c/detail/test_helpers.h"
atf_error_t atf_process_status_init(atf_process_status_t *, int);
diff --git a/contrib/atf/atf-c/detail/sanity.c b/contrib/atf/atf-c/detail/sanity.c
index d8a8905..cfc8676 100644
--- a/contrib/atf/atf-c/detail/sanity.c
+++ b/contrib/atf/atf-c/detail/sanity.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,11 +21,12 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/sanity.h"
#if defined(HAVE_CONFIG_H)
-#include "bconfig.h"
+#include "config.h"
#endif
#include <err.h>
@@ -36,8 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include "sanity.h"
-
static
void
fail(const char *fmt, ...)
@@ -53,7 +49,7 @@ fail(const char *fmt, ...)
warnx("This is probably a bug in this application or one of the "
"libraries it uses. If you believe this problem is caused "
"by, or is related to " PACKAGE_STRING ", please report it "
- "to " PACKAGE_BUGREPORT " and provide as many detatils as "
+ "to " PACKAGE_BUGREPORT " and provide as many details as "
"possible describing how you got to this condition.");
abort();
diff --git a/contrib/atf/atf-c/detail/sanity.h b/contrib/atf/atf-c/detail/sanity.h
index 0b4f3e4..7f51fe0 100644
--- a/contrib/atf/atf-c/detail/sanity.h
+++ b/contrib/atf/atf-c/detail/sanity.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,11 +21,10 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if !defined(ATF_C_SANITY_H)
-#define ATF_C_SANITY_H
+#if !defined(ATF_C_DETAIL_SANITY_H)
+#define ATF_C_DETAIL_SANITY_H
void atf_sanity_inv(const char *, int, const char *);
void atf_sanity_pre(const char *, int, const char *);
@@ -70,4 +66,4 @@ void atf_sanity_post(const char *, int, const char *);
#define UNREACHABLE INV(0)
-#endif /* ATF_C_SANITY_H */
+#endif /* !defined(ATF_C_DETAIL_SANITY_H) */
diff --git a/contrib/atf/atf-c/detail/sanity_test.c b/contrib/atf/atf-c/detail/sanity_test.c
index 7c8285b..a986c32 100644
--- a/contrib/atf/atf-c/detail/sanity_test.c
+++ b/contrib/atf/atf-c/detail/sanity_test.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,11 +21,12 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/sanity.h"
#if defined(HAVE_CONFIG_H)
-#include "bconfig.h"
+#include "config.h"
#endif
#include <sys/types.h>
@@ -42,10 +40,9 @@
#include <atf-c.h>
-#include "dynstr.h"
-#include "process.h"
-#include "sanity.h"
-#include "test_helpers.h"
+#include "atf-c/detail/dynstr.h"
+#include "atf-c/detail/process.h"
+#include "atf-c/detail/test_helpers.h"
/* ---------------------------------------------------------------------
* Auxiliary functions.
diff --git a/contrib/atf/atf-c/detail/test_helpers.c b/contrib/atf/atf-c/detail/test_helpers.c
index aacbf32..827d46e 100644
--- a/contrib/atf/atf-c/detail/test_helpers.c
+++ b/contrib/atf/atf-c/detail/test_helpers.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,24 +21,24 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/test_helpers.h"
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <atf-c.h>
+
#include "atf-c/build.h"
#include "atf-c/check.h"
-#include "atf-c/config.h"
+#include "atf-c/detail/dynstr.h"
+#include "atf-c/detail/env.h"
+#include "atf-c/detail/fs.h"
+#include "atf-c/detail/process.h"
#include "atf-c/error.h"
-#include "atf-c/macros.h"
-
-#include "dynstr.h"
-#include "fs.h"
-#include "process.h"
-#include "test_helpers.h"
bool
build_check_c_o(const char *path)
@@ -50,7 +47,8 @@ build_check_c_o(const char *path)
atf_dynstr_t iflag;
const char *optargs[4];
- RE(atf_dynstr_init_fmt(&iflag, "-I%s", atf_config_get("atf_includedir")));
+ RE(atf_dynstr_init_fmt(&iflag, "-I%s", atf_env_get_with_default(
+ "ATF_INCLUDEDIR", ATF_INCLUDEDIR)));
optargs[0] = atf_dynstr_cstring(&iflag);
optargs[1] = "-Wall";
diff --git a/contrib/atf/atf-c/detail/test_helpers.h b/contrib/atf/atf-c/detail/test_helpers.h
index 3037ba4..a601c29 100644
--- a/contrib/atf/atf-c/detail/test_helpers.h
+++ b/contrib/atf/atf-c/detail/test_helpers.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,18 +21,20 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if defined(TESTS_ATF_ATF_C_TEST_HELPERS_H)
+#if defined(ATF_C_DETAIL_TEST_HELPERS_H)
# error "Cannot include test_helpers.h more than once."
#else
-# define TESTS_ATF_ATF_C_TEST_HELPERS_H
+# define ATF_C_DETAIL_TEST_HELPERS_H
#endif
#include <stdbool.h>
-#include "atf-c/error_fwd.h"
+#include <atf-c.h>
+
+#include <atf-c/error_fwd.h>
+#include <atf-c/tc.h>
struct atf_dynstr;
struct atf_fs_path;
diff --git a/contrib/atf/atf-c/detail/text.c b/contrib/atf/atf-c/detail/text.c
index d91e8d1..3b1d7e7 100644
--- a/contrib/atf/atf-c/detail/text.c
+++ b/contrib/atf/atf-c/detail/text.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,20 +21,19 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/text.h"
#include <errno.h>
#include <limits.h>
#include <string.h>
#include <stdlib.h>
+#include "atf-c/detail/dynstr.h"
+#include "atf-c/detail/sanity.h"
#include "atf-c/error.h"
-#include "dynstr.h"
-#include "sanity.h"
-#include "text.h"
-
atf_error_t
atf_text_for_each_word(const char *instr, const char *sep,
atf_error_t (*func)(const char *, void *),
diff --git a/contrib/atf/atf-c/detail/text.h b/contrib/atf/atf-c/detail/text.h
index 8f8ddf4..b2820b6 100644
--- a/contrib/atf/atf-c/detail/text.h
+++ b/contrib/atf/atf-c/detail/text.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,19 +21,17 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if !defined(ATF_C_TEXT_H)
-#define ATF_C_TEXT_H
+#if !defined(ATF_C_DETAIL_TEXT_H)
+#define ATF_C_DETAIL_TEXT_H
#include <stdarg.h>
#include <stdbool.h>
+#include <atf-c/detail/list.h>
#include <atf-c/error_fwd.h>
-#include "list.h"
-
atf_error_t atf_text_for_each_word(const char *, const char *,
atf_error_t (*)(const char *, void *),
void *);
@@ -46,4 +41,4 @@ atf_error_t atf_text_split(const char *, const char *, atf_list_t *);
atf_error_t atf_text_to_bool(const char *, bool *);
atf_error_t atf_text_to_long(const char *, long *);
-#endif /* ATF_C_TEXT_H */
+#endif /* !defined(ATF_C_DETAIL_TEXT_H) */
diff --git a/contrib/atf/atf-c/detail/text_test.c b/contrib/atf/atf-c/detail/text_test.c
index 7bdf9c8..5d6c8e5 100644
--- a/contrib/atf/atf-c/detail/text_test.c
+++ b/contrib/atf/atf-c/detail/text_test.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,8 +21,9 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/text.h"
#include <stdio.h>
#include <stdlib.h>
@@ -33,9 +31,8 @@
#include <atf-c.h>
-#include "sanity.h"
-#include "test_helpers.h"
-#include "text.h"
+#include "atf-c/detail/sanity.h"
+#include "atf-c/detail/test_helpers.h"
/* ---------------------------------------------------------------------
* Auxiliary functions.
diff --git a/contrib/atf/atf-c/detail/tp_main.c b/contrib/atf/atf-c/detail/tp_main.c
index a62ae0a..439384b4 100644
--- a/contrib/atf/atf-c/detail/tp_main.c
+++ b/contrib/atf/atf-c/detail/tp_main.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2008 The NetBSD Foundation, Inc.
+/* Copyright (c) 2008 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,11 +21,10 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
#if defined(HAVE_CONFIG_H)
-#include "bconfig.h"
+#include "config.h"
#endif
#include <ctype.h>
@@ -38,17 +34,16 @@
#include <string.h>
#include <unistd.h>
+#include "atf-c/detail/dynstr.h"
+#include "atf-c/detail/env.h"
+#include "atf-c/detail/fs.h"
+#include "atf-c/detail/map.h"
+#include "atf-c/detail/sanity.h"
#include "atf-c/error.h"
#include "atf-c/tc.h"
#include "atf-c/tp.h"
#include "atf-c/utils.h"
-#include "dynstr.h"
-#include "env.h"
-#include "fs.h"
-#include "map.h"
-#include "sanity.h"
-
#if defined(HAVE_GNU_GETOPT)
# define GETOPT_POSIX "+"
#else
@@ -499,7 +494,7 @@ run_tc(const atf_tp_t *tp, struct params *p, int *exitcode)
if (!atf_env_has("__RUNNING_INSIDE_ATF_RUN") || strcmp(atf_env_get(
"__RUNNING_INSIDE_ATF_RUN"), "internal-yes-value") != 0)
{
- print_warning("Running test cases without atf-run(1) is unsupported");
+ print_warning("Running test cases outside of kyua(1) is unsupported");
print_warning("No isolation nor timeout control is being applied; you "
"may get unexpected failures; see atf-test-case(4)");
}
diff --git a/contrib/atf/atf-c/detail/user.c b/contrib/atf/atf-c/detail/user.c
index 5a89bf4..bbb4ded 100644
--- a/contrib/atf/atf-c/detail/user.c
+++ b/contrib/atf/atf-c/detail/user.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2007 The NetBSD Foundation, Inc.
+/* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,16 +21,16 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/user.h"
#include <sys/param.h>
#include <sys/types.h>
#include <limits.h>
#include <unistd.h>
-#include "sanity.h"
-#include "user.h"
+#include "atf-c/detail/sanity.h"
/* ---------------------------------------------------------------------
* Free functions.
diff --git a/contrib/atf/atf-c/detail/user.h b/contrib/atf/atf-c/detail/user.h
index d682bcf..14a3e96 100644
--- a/contrib/atf/atf-c/detail/user.h
+++ b/contrib/atf/atf-c/detail/user.h
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2007 The NetBSD Foundation, Inc.
+/* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,11 +21,10 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
-#if !defined(ATF_C_USER_H)
-#define ATF_C_USER_H
+#if !defined(ATF_C_DETAIL_USER_H)
+#define ATF_C_DETAIL_USER_H
#include <sys/types.h>
@@ -46,4 +42,4 @@ bool atf_user_is_member_of_group(gid_t);
bool atf_user_is_root(void);
bool atf_user_is_unprivileged(void);
-#endif /* !defined(ATF_C_USER_H) */
+#endif /* !defined(ATF_C_DETAIL_USER_H) */
diff --git a/contrib/atf/atf-c/detail/user_test.c b/contrib/atf/atf-c/detail/user_test.c
index 0bf37e7..6a0f6e1 100644
--- a/contrib/atf/atf-c/detail/user_test.c
+++ b/contrib/atf/atf-c/detail/user_test.c
@@ -1,7 +1,4 @@
-/*
- * Automated Testing Framework (atf)
- *
- * Copyright (c) 2007 The NetBSD Foundation, Inc.
+/* Copyright (c) 2007 The NetBSD Foundation, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -24,8 +21,9 @@
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
+
+#include "atf-c/detail/user.h"
#include <sys/param.h>
#include <sys/types.h>
@@ -36,8 +34,7 @@
#include <atf-c.h>
-#include "test_helpers.h"
-#include "user.h"
+#include "atf-c/detail/test_helpers.h"
/* ---------------------------------------------------------------------
* Test cases for the free functions.
diff --git a/contrib/atf/atf-c/detail/version_helper.c b/contrib/atf/atf-c/detail/version_helper.c
index b75ff36..fd48466 100644
--- a/contrib/atf/atf-c/detail/version_helper.c
+++ b/contrib/atf/atf-c/detail/version_helper.c
@@ -29,7 +29,7 @@
*/
#if defined(HAVE_CONFIG_H)
-#include "bconfig.h"
+#include "config.h"
#endif
#include <stdio.h>
OpenPOWER on IntegriCloud