diff options
author | Ulrich Drepper <drepper@redhat.com> | 2008-06-25 23:26:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2008-06-25 23:26:07 +0000 |
commit | 7166d23fb4bb3c749c1a5ccb08d243e40d926729 (patch) | |
tree | baf1594971ee08b73d147c69c8710aa8b1e9d3de | |
parent | 974069d8643afba545125ba813fded1b7a62142c (diff) | |
download | glibc-7166d23fb4bb3c749c1a5ccb08d243e40d926729.tar.gz glibc-7166d23fb4bb3c749c1a5ccb08d243e40d926729.tar.xz glibc-7166d23fb4bb3c749c1a5ccb08d243e40d926729.zip |
* posix/tst-regex.c (main): Rename to...
(do_test): ... this. Remove cmdline option processing. (TIMEOUT): Define. (TEST_FUNCTION): Define. (CMDLINE_OPTIONS): Define.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | posix/tst-regex.c | 20 |
2 files changed, 18 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog index 87dd7568e6..504b4d50aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-17 Carlos O'Donell <carlos@codesourcery.com> + + * posix/tst-regex.c (main): Rename to... + (do_test): ... this. Remove cmdline option processing. + (TIMEOUT): Define. + (TEST_FUNCTION): Define. + (CMDLINE_OPTIONS): Define. + 2008-06-25 Ulrich Drepper <drepper@redhat.com> [BZ #5210] diff --git a/posix/tst-regex.c b/posix/tst-regex.c index 6a71e1239a..a7fba698f2 100644 --- a/posix/tst-regex.c +++ b/posix/tst-regex.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2003, 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -55,8 +55,8 @@ static int run_test_backwards (const char *expr, const char *mem, size_t memlen, int icase, int expected); -int -main (int argc, char *argv[]) +static int +do_test (void) { const char *file; int fd; @@ -66,16 +66,9 @@ main (int argc, char *argv[]) char *outmem; size_t inlen; size_t outlen; - static const struct option options[] = - { - {"timing",no_argument, &timing, 1 }, - {NULL, 0, NULL, 0 } - }; mtrace (); - while (getopt_long (argc, argv, "", options, NULL) >= 0); - /* Make the content of the file available in memory. */ file = "../ChangeLog.8"; fd = open (file, O_RDONLY); @@ -506,3 +499,10 @@ run_test_backwards (const char *expr, const char *mem, size_t memlen, expect. */ return cnt != expected; } + +/* If --timing is used we will need a larger timout. */ +#define TIMEOUT 50 +#define CMDLINE_OPTIONS \ + {"timing", no_argument, &timing, 1 }, +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" |