Blame SOURCES/glibc-rh1595191-3.patch

147e83
commit 44927211651adde42bbd431ef5ebe568186125e5
147e83
Author: Florian Weimer <fweimer@redhat.com>
147e83
Date:   Tue Jul 3 17:57:14 2018 +0200
147e83
147e83
    libio: Add tst-vtables, tst-vtables-interposed
147e83
    
147e83
    (cherry picked from commit 29055464a03c72762969a2e8734d0d05d4d70e58)
147e83
    
147e83
    Some adjustments were needed for a tricky multi-inclusion issue related
147e83
    to libioP.h.
147e83
147e83
Backported from the upsteam release/2.27/master branch, adjusted for
147e83
lack of tests-internal support downstream.
147e83
147e83
diff --git a/libio/Makefile b/libio/Makefile
147e83
index 0cef96141209fe99..1e923da42e45c492 100644
147e83
--- a/libio/Makefile
147e83
+++ b/libio/Makefile
147e83
@@ -61,7 +61,9 @@ tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc   \
147e83
 	bug-memstream1 bug-wmemstream1 \
147e83
 	tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos tst-fseek \
147e83
 	tst-fwrite-error tst-ftell-active-handler \
147e83
-	tst-ftell-append
147e83
+	tst-ftell-append \
147e83
+	tst-vtables tst-vtables-interposed
147e83
+
147e83
 ifeq (yes,$(build-shared))
147e83
 # Add test-fopenloc only if shared library is enabled since it depends on
147e83
 # shared localedata objects.
147e83
diff --git a/libio/tst-vtables-common.c b/libio/tst-vtables-common.c
147e83
new file mode 100644
147e83
index 0000000000000000..dc8d89c195b95b8d
147e83
--- /dev/null
147e83
+++ b/libio/tst-vtables-common.c
147e83
@@ -0,0 +1,511 @@
147e83
+/* Test for libio vtables and their validation.  Common code.
147e83
+   Copyright (C) 2018 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+/* This test provides some coverage for how various stdio functions
147e83
+   use the vtables in FILE * objects.  The focus is mostly on which
147e83
+   functions call which methods, not so much on validating data
147e83
+   processing.  An initial series of tests check that custom vtables
147e83
+   do not work without activation through _IO_init.
147e83
+
147e83
+   Note: libio vtables are deprecated feature.  Do not use this test
147e83
+   as a documentation source for writing custom vtables.  See
147e83
+   fopencookie for a different way of creating custom stdio
147e83
+   streams.  */
147e83
+
147e83
+#include <stdbool.h>
147e83
+#include <string.h>
147e83
+#include <support/capture_subprocess.h>
147e83
+#include <support/check.h>
147e83
+#include <support/namespace.h>
147e83
+#include <support/support.h>
147e83
+#include <support/test-driver.h>
147e83
+#include <support/xunistd.h>
147e83
+
147e83
+/* Data shared between the test subprocess and the test driver in the
147e83
+   parent.  Note that *shared is reset at the start of the check_call
147e83
+   function.  */
147e83
+struct shared
147e83
+{
147e83
+  /* Expected file pointer for method calls.  */
147e83
+  FILE *fp;
147e83
+
147e83
+  /* If true, assume that a call to _IO_init is needed to enable
147e83
+     custom vtables.  */
147e83
+  bool initially_disabled;
147e83
+
147e83
+  /* Requested return value for the methods which have one.  */
147e83
+  int return_value;
147e83
+
147e83
+  /* A value (usually a character) recorded by some of the methods
147e83
+     below.  */
147e83
+  int value;
147e83
+
147e83
+  /* Likewise, for some data.  */
147e83
+  char buffer[16];
147e83
+  size_t buffer_length;
147e83
+
147e83
+  /* Total number of method calls.  */
147e83
+  unsigned int calls;
147e83
+
147e83
+  /* Individual method call counts.  */
147e83
+  unsigned int calls_finish;
147e83
+  unsigned int calls_overflow;
147e83
+  unsigned int calls_underflow;
147e83
+  unsigned int calls_uflow;
147e83
+  unsigned int calls_pbackfail;
147e83
+  unsigned int calls_xsputn;
147e83
+  unsigned int calls_xsgetn;
147e83
+  unsigned int calls_seekoff;
147e83
+  unsigned int calls_seekpos;
147e83
+  unsigned int calls_setbuf;
147e83
+  unsigned int calls_sync;
147e83
+  unsigned int calls_doallocate;
147e83
+  unsigned int calls_read;
147e83
+  unsigned int calls_write;
147e83
+  unsigned int calls_seek;
147e83
+  unsigned int calls_close;
147e83
+  unsigned int calls_stat;
147e83
+  unsigned int calls_showmanyc;
147e83
+  unsigned int calls_imbue;
147e83
+} *shared;
147e83
+
147e83
+/* Method implementations which increment the counters in *shared.  */
147e83
+
147e83
+static void
147e83
+log_method (FILE *fp, const char *name)
147e83
+{
147e83
+  if (test_verbose > 0)
147e83
+    printf ("info: %s (%p) called\n", name, fp);
147e83
+}
147e83
+
147e83
+static void
147e83
+method_finish (FILE *fp, int dummy)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_finish;
147e83
+}
147e83
+
147e83
+static int
147e83
+method_overflow (FILE *fp, int ch)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_overflow;
147e83
+  shared->value = ch;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static int
147e83
+method_underflow (FILE *fp)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_underflow;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static int
147e83
+method_uflow (FILE *fp)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_uflow;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static int
147e83
+method_pbackfail (FILE *fp, int ch)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_pbackfail;
147e83
+  shared->value = ch;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static size_t
147e83
+method_xsputn (FILE *fp, const void *data, size_t n)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_xsputn;
147e83
+
147e83
+  size_t to_copy = n;
147e83
+  if (n > sizeof (shared->buffer))
147e83
+    to_copy = sizeof (shared->buffer);
147e83
+  memcpy (shared->buffer, data, to_copy);
147e83
+  shared->buffer_length = to_copy;
147e83
+  return to_copy;
147e83
+}
147e83
+
147e83
+static size_t
147e83
+method_xsgetn (FILE *fp, void *data, size_t n)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_xsgetn;
147e83
+  return 0;
147e83
+}
147e83
+
147e83
+static off64_t
147e83
+method_seekoff (FILE *fp, off64_t offset, int dir, int mode)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_seekoff;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static off64_t
147e83
+method_seekpos (FILE *fp, off64_t offset, int mode)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_seekpos;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static FILE *
147e83
+method_setbuf (FILE *fp, char *buffer, ssize_t length)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_setbuf;
147e83
+  return fp;
147e83
+}
147e83
+
147e83
+static int
147e83
+method_sync (FILE *fp)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_sync;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static int
147e83
+method_doallocate (FILE *fp)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_doallocate;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static ssize_t
147e83
+method_read (FILE *fp, void *data, ssize_t length)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_read;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static ssize_t
147e83
+method_write (FILE *fp, const void *data, ssize_t length)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_write;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static off64_t
147e83
+method_seek (FILE *fp, off64_t offset, int mode)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_seek;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static int
147e83
+method_close (FILE *fp)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_close;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static int
147e83
+method_stat (FILE *fp, void *buffer)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_stat;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static int
147e83
+method_showmanyc (FILE *fp)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_showmanyc;
147e83
+  return shared->return_value;
147e83
+}
147e83
+
147e83
+static void
147e83
+method_imbue (FILE *fp, void *locale)
147e83
+{
147e83
+  log_method (fp, __func__);
147e83
+  TEST_VERIFY (fp == shared->fp);
147e83
+  ++shared->calls;
147e83
+  ++shared->calls_imbue;
147e83
+}
147e83
+
147e83
+/* Our custom vtable.  */
147e83
+
147e83
+static const struct _IO_jump_t jumps =
147e83
+{
147e83
+  JUMP_INIT_DUMMY,
147e83
+  JUMP_INIT (finish, method_finish),
147e83
+  JUMP_INIT (overflow, method_overflow),
147e83
+  JUMP_INIT (underflow, method_underflow),
147e83
+  JUMP_INIT (uflow, method_uflow),
147e83
+  JUMP_INIT (pbackfail, method_pbackfail),
147e83
+  JUMP_INIT (xsputn, method_xsputn),
147e83
+  JUMP_INIT (xsgetn, method_xsgetn),
147e83
+  JUMP_INIT (seekoff, method_seekoff),
147e83
+  JUMP_INIT (seekpos, method_seekpos),
147e83
+  JUMP_INIT (setbuf, method_setbuf),
147e83
+  JUMP_INIT (sync, method_sync),
147e83
+  JUMP_INIT (doallocate, method_doallocate),
147e83
+  JUMP_INIT (read, method_read),
147e83
+  JUMP_INIT (write, method_write),
147e83
+  JUMP_INIT (seek, method_seek),
147e83
+  JUMP_INIT (close, method_close),
147e83
+  JUMP_INIT (stat, method_stat),
147e83
+  JUMP_INIT (showmanyc, method_showmanyc),
147e83
+  JUMP_INIT (imbue, method_imbue)
147e83
+};
147e83
+
147e83
+/* Our file implementation.  */
147e83
+
147e83
+struct my_file
147e83
+{
147e83
+  FILE f;
147e83
+  const struct _IO_jump_t *vtable;
147e83
+};
147e83
+
147e83
+struct my_file
147e83
+my_file_create (void)
147e83
+{
147e83
+  return (struct my_file)
147e83
+    {
147e83
+      /* Disable locking, so that we do not have to set up a lock
147e83
+         pointer.  */
147e83
+      .f._flags =  _IO_USER_LOCK,
147e83
+
147e83
+      /* Copy the offset from the an initialized handle, instead of
147e83
+         figuring it out from scratch.  */
147e83
+      .f._vtable_offset = stdin->_vtable_offset,
147e83
+
147e83
+      .vtable = &jumps,
147e83
+    };
147e83
+}
147e83
+
147e83
+/* Initial tests which do not enable vtable compatibility.  */
147e83
+
147e83
+/* Inhibit GCC optimization of fprintf.  */
147e83
+typedef int (*fprintf_type) (FILE *, const char *, ...);
147e83
+static const volatile fprintf_type fprintf_ptr = &fprintf;
147e83
+
147e83
+static void
147e83
+without_compatibility_fprintf (void *closure)
147e83
+{
147e83
+  /* This call should abort.  */
147e83
+  fprintf_ptr (shared->fp, " ");
147e83
+  _exit (1);
147e83
+}
147e83
+
147e83
+static void
147e83
+without_compatibility_fputc (void *closure)
147e83
+{
147e83
+  /* This call should abort.  */
147e83
+  fputc (' ', shared->fp);
147e83
+  _exit (1);
147e83
+}
147e83
+
147e83
+static void
147e83
+without_compatibility_fgetc (void *closure)
147e83
+{
147e83
+  /* This call should abort.  */
147e83
+  fgetc (shared->fp);
147e83
+  _exit (1);
147e83
+}
147e83
+
147e83
+static void
147e83
+without_compatibility_fflush (void *closure)
147e83
+{
147e83
+  /* This call should abort.  */
147e83
+  fflush (shared->fp);
147e83
+  _exit (1);
147e83
+}
147e83
+
147e83
+/* Exit status after abnormal termination.  */
147e83
+static int termination_status;
147e83
+
147e83
+static void
147e83
+init_termination_status (void)
147e83
+{
147e83
+  pid_t pid = xfork ();
147e83
+  if (pid == 0)
147e83
+    abort ();
147e83
+  xwaitpid (pid, &termination_status, 0);
147e83
+
147e83
+  TEST_VERIFY (WIFSIGNALED (termination_status));
147e83
+  TEST_COMPARE (WTERMSIG (termination_status), SIGABRT);
147e83
+}
147e83
+
147e83
+static void
147e83
+check_for_termination (const char *name, void (*callback) (void *))
147e83
+{
147e83
+  struct my_file file = my_file_create ();
147e83
+  shared->fp = &file.f;
147e83
+  shared->return_value = -1;
147e83
+  shared->calls = 0;
147e83
+  struct support_capture_subprocess proc
147e83
+    = support_capture_subprocess (callback, NULL);
147e83
+  support_capture_subprocess_check (&proc, name, termination_status,
147e83
+                                    sc_allow_stderr);
147e83
+  const char *message
147e83
+    = "Fatal error: glibc detected an invalid stdio handle\n";
147e83
+  TEST_COMPARE_BLOB (proc.err.buffer, proc.err.length,
147e83
+                     message, strlen (message));
147e83
+  TEST_COMPARE (shared->calls, 0);
147e83
+  support_capture_subprocess_free (&proc;;
147e83
+}
147e83
+
147e83
+/* The test with vtable validation disabled.  */
147e83
+
147e83
+/* This function does not have a prototype in libioP.h to prevent
147e83
+   accidental use from within the library (which would disable vtable
147e83
+   verification).  */
147e83
+void _IO_init (FILE *fp, int flags);
147e83
+
147e83
+static void
147e83
+with_compatibility_fprintf (void *closure)
147e83
+{
147e83
+  TEST_COMPARE (fprintf_ptr (shared->fp, "A%sCD", "B"), 4);
147e83
+  TEST_COMPARE (shared->calls, 3);
147e83
+  TEST_COMPARE (shared->calls_xsputn, 3);
147e83
+  TEST_COMPARE_BLOB (shared->buffer, shared->buffer_length,
147e83
+                     "CD", 2);
147e83
+}
147e83
+
147e83
+static void
147e83
+with_compatibility_fputc (void *closure)
147e83
+{
147e83
+  shared->return_value = '@';
147e83
+  TEST_COMPARE (fputc ('@', shared->fp), '@');
147e83
+  TEST_COMPARE (shared->calls, 1);
147e83
+  TEST_COMPARE (shared->calls_overflow, 1);
147e83
+  TEST_COMPARE (shared->value, '@');
147e83
+}
147e83
+
147e83
+static void
147e83
+with_compatibility_fgetc (void *closure)
147e83
+{
147e83
+  shared->return_value = 'X';
147e83
+  TEST_COMPARE (fgetc (shared->fp), 'X');
147e83
+  TEST_COMPARE (shared->calls, 1);
147e83
+  TEST_COMPARE (shared->calls_uflow, 1);
147e83
+}
147e83
+
147e83
+static void
147e83
+with_compatibility_fflush (void *closure)
147e83
+{
147e83
+  TEST_COMPARE (fflush (shared->fp), 0);
147e83
+  TEST_COMPARE (shared->calls, 1);
147e83
+  TEST_COMPARE (shared->calls_sync, 1);
147e83
+}
147e83
+
147e83
+/* Call CALLBACK in a subprocess, after setting up a custom file
147e83
+   object and updating shared->fp.  */
147e83
+static void
147e83
+check_call (const char *name, void (*callback) (void *),
147e83
+            bool initially_disabled)
147e83
+{
147e83
+  *shared = (struct shared)
147e83
+    {
147e83
+     .initially_disabled = initially_disabled,
147e83
+    };
147e83
+
147e83
+  /* Set up a custom file object.  */
147e83
+  struct my_file file = my_file_create ();
147e83
+  shared->fp = &file.f;
147e83
+  if (shared->initially_disabled)
147e83
+    _IO_init (shared->fp, file.f._flags);
147e83
+
147e83
+  if (test_verbose > 0)
147e83
+    printf ("info: calling test %s\n", name);
147e83
+  support_isolate_in_subprocess (callback, NULL);
147e83
+}
147e83
+
147e83
+/* Run the tests.  INITIALLY_DISABLED indicates whether custom vtables
147e83
+   are disabled when the test starts.  */
147e83
+static int
147e83
+run_tests (bool initially_disabled)
147e83
+{
147e83
+  /* The test relies on fatal error messages being printed to standard
147e83
+     error.  */
147e83
+  setenv ("LIBC_FATAL_STDERR_", "1", 1);
147e83
+
147e83
+  shared = support_shared_allocate (sizeof (*shared));
147e83
+  shared->initially_disabled = initially_disabled;
147e83
+  init_termination_status ();
147e83
+
147e83
+  if (initially_disabled)
147e83
+    {
147e83
+      check_for_termination ("fprintf", without_compatibility_fprintf);
147e83
+      check_for_termination ("fputc", without_compatibility_fputc);
147e83
+      check_for_termination ("fgetc", without_compatibility_fgetc);
147e83
+      check_for_termination ("fflush", without_compatibility_fflush);
147e83
+    }
147e83
+
147e83
+  check_call ("fprintf", with_compatibility_fprintf, initially_disabled);
147e83
+  check_call ("fputc", with_compatibility_fputc, initially_disabled);
147e83
+  check_call ("fgetc", with_compatibility_fgetc, initially_disabled);
147e83
+  check_call ("fflush", with_compatibility_fflush, initially_disabled);
147e83
+
147e83
+  support_shared_free (shared);
147e83
+  shared = NULL;
147e83
+
147e83
+  return 0;
147e83
+}
147e83
diff --git a/libio/tst-vtables-interposed.c b/libio/tst-vtables-interposed.c
147e83
new file mode 100644
147e83
index 0000000000000000..c8f4e8c7c386af39
147e83
--- /dev/null
147e83
+++ b/libio/tst-vtables-interposed.c
147e83
@@ -0,0 +1,37 @@
147e83
+/* Test for libio vtables and their validation.  Enabled through interposition.
147e83
+   Copyright (C) 2018 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+/* Provide an interposed definition of the standard file handles with
147e83
+   our own vtable.  stdout/stdin/stderr will not work as a result, but
147e83
+   a succesful test does not print anything, so this is fine.  */
147e83
+static const struct _IO_jump_t jumps;
147e83
+#define _IO_file_jumps jumps
147e83
+#include "stdfiles.c"
147e83
+
147e83
+#include "tst-vtables-common.c"
147e83
+
147e83
+static int
147e83
+do_test (void)
147e83
+{
147e83
+  return run_tests (false);
147e83
+}
147e83
+
147e83
+/* Calling setvbuf in the test driver is not supported with our
147e83
+   interposed file handles.  */
147e83
+#define TEST_NO_SETVBUF
147e83
+#include <support/test-driver.c>
147e83
diff --git a/libio/tst-vtables.c b/libio/tst-vtables.c
147e83
new file mode 100644
147e83
index 0000000000000000..f16acf5d23b0fff6
147e83
--- /dev/null
147e83
+++ b/libio/tst-vtables.c
147e83
@@ -0,0 +1,29 @@
147e83
+/* Test for libio vtables and their validation.  Initially disabled case.
147e83
+   Copyright (C) 2018 Free Software Foundation, Inc.
147e83
+   This file is part of the GNU C Library.
147e83
+
147e83
+   The GNU C Library is free software; you can redistribute it and/or
147e83
+   modify it under the terms of the GNU Lesser General Public
147e83
+   License as published by the Free Software Foundation; either
147e83
+   version 2.1 of the License, or (at your option) any later version.
147e83
+
147e83
+   The GNU C Library is distributed in the hope that it will be useful,
147e83
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
147e83
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
147e83
+   Lesser General Public License for more details.
147e83
+
147e83
+   You should have received a copy of the GNU Lesser General Public
147e83
+   License along with the GNU C Library; if not, see
147e83
+   <http://www.gnu.org/licenses/>.  */
147e83
+
147e83
+#include "libioP.h"
147e83
+
147e83
+#include "tst-vtables-common.c"
147e83
+
147e83
+static int
147e83
+do_test (void)
147e83
+{
147e83
+  return run_tests (true);
147e83
+}
147e83
+
147e83
+#include <support/test-driver.c>