Blame elf/tst-auxobj.c

Packit Service c8b949
/* Test that symbols from auxiliary filter objects are resolved to the
Packit Service c8b949
   filtee.
Packit Service c8b949
Packit Service c8b949
   Copyright (C) 2020 Free Software Foundation, Inc.
Packit Service c8b949
   This file is part of the GNU C Library.
Packit Service c8b949
Packit Service c8b949
   The GNU C Library is free software; you can redistribute it and/or
Packit Service c8b949
   modify it under the terms of the GNU Lesser General Public
Packit Service c8b949
   License as published by the Free Software Foundation; either
Packit Service c8b949
   version 2.1 of the License, or (at your option) any later version.
Packit Service c8b949
Packit Service c8b949
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service c8b949
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service c8b949
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service c8b949
   Lesser General Public License for more details.
Packit Service c8b949
Packit Service c8b949
   You should have received a copy of the GNU Lesser General Public
Packit Service c8b949
   License along with the GNU C Library; if not, see
Packit Service c8b949
   <https://www.gnu.org/licenses/>.  */
Packit Service c8b949
Packit Service c8b949
#include <stdio.h>
Packit Service c8b949
#include <support/check.h>
Packit Service c8b949
#include "tst-filterobj-filtee.h"
Packit Service c8b949
Packit Service c8b949
static int do_test (void)
Packit Service c8b949
{
Packit Service c8b949
  const char* text = get_text ();
Packit Service c8b949
  printf ("%s\n", text);
Packit Service c8b949
Packit Service c8b949
  /* Verify the text matches what we expect from the filtee */
Packit Service c8b949
  TEST_COMPARE_STRING (text, "Hello from filtee (PASS)");
Packit Service c8b949
Packit Service c8b949
  text = get_text2 ();
Packit Service c8b949
  printf ("%s\n", text);
Packit Service c8b949
Packit Service c8b949
  /* Verify the text matches what we expect from the auxiliary object */
Packit Service c8b949
  TEST_COMPARE_STRING (text, "Hello from auxiliary filter object (PASS)");
Packit Service c8b949
Packit Service c8b949
  return 0;
Packit Service c8b949
}
Packit Service c8b949
Packit Service c8b949
#include <support/test-driver.c>