~andreserl/ubuntu/lucid/bind9/bind9-apport-533601

« back to all changes in this revision

Viewing changes to lib/tests/t_api.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004, 2005  Internet Systems Consortium, Inc. ("ISC")
 
2
 * Copyright (C) 2004, 2005, 2007, 2008  Internet Systems Consortium, Inc. ("ISC")
3
3
 * Copyright (C) 1999-2003  Internet Software Consortium.
4
4
 *
5
 
 * Permission to use, copy, modify, and distribute this software for any
 
5
 * Permission to use, copy, modify, and/or distribute this software for any
6
6
 * purpose with or without fee is hereby granted, provided that the above
7
7
 * copyright notice and this permission notice appear in all copies.
8
8
 *
15
15
 * PERFORMANCE OF THIS SOFTWARE.
16
16
 */
17
17
 
18
 
/* $Id: t_api.c,v 1.48.2.1.2.8 2005/06/18 01:03:24 marka Exp $ */
 
18
/* $Id: t_api.c,v 1.60.128.3 2008/01/17 23:46:37 tbox Exp $ */
 
19
 
 
20
/*! \file */
19
21
 
20
22
#include <config.h>
21
23
 
53
55
                "\t-t <test_number> : run specified test number\n"
54
56
                "\t-x               : don't execute tests in a subproc\n"
55
57
                "\t-q <timeout>     : use 'timeout' as the timeout value\n";
56
 
/*
 
58
/*!<
57
59
 *              -a              -->     run all tests
58
60
 *              -b dir          -->     chdir to dir before running tests
59
61
 *              -c config       -->     use config file 'config'
66
68
 *              -q timeout      -->     use 'timeout' as the timeout value
67
69
 */
68
70
 
69
 
#define T_MAXTESTS              256     /* must be 0 mod 8 */
 
71
#define T_MAXTESTS              256     /*% must be 0 mod 8 */
70
72
#define T_MAXENV                256
71
73
#define T_DEFAULT_CONFIG        "t_config"
72
74
#define T_BUFSIZ                256
128
130
        /*
129
131
         * -a option is now default.
130
132
         */
131
 
        memset(T_tvec, 0xffff, sizeof(T_tvec));
 
133
        memset(T_tvec, 0xff, sizeof(T_tvec));
132
134
 
133
135
        /*
134
136
         * Parse args.
139
141
                        /*
140
142
                         * Flag all tests to be run.
141
143
                         */
142
 
                        memset(T_tvec, 0xffff, sizeof(T_tvec));
 
144
                        memset(T_tvec, 0xff, sizeof(T_tvec));
143
145
                }
144
146
                else if (c == 'b') {
145
147
                        T_dir = isc_commandline_argument;
304
306
                                                  "the test case timed out\n");
305
307
                                                        else
306
308
                                                                t_info(
307
 
                                         "the test case caused exception %d\n",
308
 
                                                             WTERMSIG(status));
 
309
                                         "the test case caused exception %d\n",
 
310
                                                             WTERMSIG(status));
309
311
                                                        t_result(T_UNRESOLVED);
310
312
                                                    }
311
313
                                            } else if ((deadpid == -1) &&
540
542
                        }
541
543
                }
542
544
                *p = '\0';
543
 
                return(((c == EOF) && (n == 0U)) ? NULL : buf);
 
545
                if (c == EOF && n == 0U) {
 
546
                        free(buf);
 
547
                        return (NULL);
 
548
                }
 
549
                return (buf);
544
550
        } else {
545
551
                fprintf(stderr, "malloc failed %d", errno);
546
552
                return(NULL);
747
753
                        /*
748
754
                         * Skip comment lines.
749
755
                         */
750
 
                        if ((isspace((unsigned char)*p)) || (*p == '#'))
 
756
                        if ((isspace((unsigned char)*p)) || (*p == '#')) {
 
757
                                (void)free(p);
751
758
                                continue;
 
759
                        }
752
760
 
753
761
                        cnt = t_bustline(p, tokens);
754
762
                        if (cnt == nargs) {