Deleted Added
sdiff udiff text old ( 240120 ) new ( 273929 )
full compact
1/* Copyright (c) 2008 The NetBSD Foundation, Inc.
2 * All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright

--- 6 unchanged lines hidden (view full) ---

16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
20 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
22 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
24 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
25
26#include "atf-c/check.h"
27
28#include <sys/wait.h>
29
30#include <errno.h>
31#include <fcntl.h>
32#include <stdio.h>
33#include <stdlib.h>
34#include <string.h>
35#include <unistd.h>
36
37#include "atf-c/build.h"
38#include "atf-c/defs.h"
39#include "atf-c/detail/dynstr.h"
40#include "atf-c/detail/env.h"
41#include "atf-c/detail/fs.h"
42#include "atf-c/detail/list.h"
43#include "atf-c/detail/process.h"
44#include "atf-c/detail/sanity.h"
45#include "atf-c/error.h"
46#include "atf-c/utils.h"
47
48/* ---------------------------------------------------------------------
49 * Auxiliary functions.
50 * --------------------------------------------------------------------- */
51
52static
53atf_error_t
54create_tmpdir(atf_fs_path_t *dir)
55{
56 atf_error_t err;
57
58 err = atf_fs_path_init_fmt(dir, "%s/check.XXXXXX",
59 atf_env_get_with_default("TMPDIR", "/tmp"));
60 if (atf_is_error(err))
61 goto out;
62
63 err = atf_fs_mkdtemp(dir);
64 if (atf_is_error(err)) {
65 atf_fs_path_fini(dir);
66 goto out;
67 }

--- 417 unchanged lines hidden ---