INCDIR = $(srcdir)/../include
# include libctf for swap.h
-AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../libctf
+AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../libctf
AM_CFLAGS = @ac_libsframe_warn_cflags@
libsframe_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
# libsframe does not restrict the set of exported symbols. So, if linker does
testsuite_libsframe_decode_be_flipping_OBJECTS = \
$(am_testsuite_libsframe_decode_be_flipping_OBJECTS)
testsuite_libsframe_decode_be_flipping_DEPENDENCIES = \
- ${top_builddir}/libsframe.la
+ $(testsuite_LDADD)
am_testsuite_libsframe_decode_frecnt_1_OBJECTS = testsuite/libsframe.decode/testsuite_libsframe_decode_frecnt_1-frecnt-1.$(OBJEXT)
testsuite_libsframe_decode_frecnt_1_OBJECTS = \
$(am_testsuite_libsframe_decode_frecnt_1_OBJECTS)
-testsuite_libsframe_decode_frecnt_1_DEPENDENCIES = \
- ${top_builddir}/libsframe.la
+testsuite_libsframe_decode_frecnt_1_DEPENDENCIES = $(testsuite_LDADD)
am_testsuite_libsframe_decode_frecnt_2_OBJECTS = testsuite/libsframe.decode/testsuite_libsframe_decode_frecnt_2-frecnt-2.$(OBJEXT)
testsuite_libsframe_decode_frecnt_2_OBJECTS = \
$(am_testsuite_libsframe_decode_frecnt_2_OBJECTS)
-testsuite_libsframe_decode_frecnt_2_DEPENDENCIES = \
- ${top_builddir}/libsframe.la
+testsuite_libsframe_decode_frecnt_2_DEPENDENCIES = $(testsuite_LDADD)
am_testsuite_libsframe_encode_encode_1_OBJECTS = testsuite/libsframe.encode/testsuite_libsframe_encode_encode_1-encode-1.$(OBJEXT)
testsuite_libsframe_encode_encode_1_OBJECTS = \
$(am_testsuite_libsframe_encode_encode_1_OBJECTS)
-testsuite_libsframe_encode_encode_1_DEPENDENCIES = \
- ${top_builddir}/libsframe.la
+testsuite_libsframe_encode_encode_1_DEPENDENCIES = $(testsuite_LDADD)
am_testsuite_libsframe_find_findfre_1_OBJECTS = testsuite/libsframe.find/testsuite_libsframe_find_findfre_1-findfre-1.$(OBJEXT)
testsuite_libsframe_find_findfre_1_OBJECTS = \
$(am_testsuite_libsframe_find_findfre_1_OBJECTS)
-testsuite_libsframe_find_findfre_1_DEPENDENCIES = \
- ${top_builddir}/libsframe.la
+testsuite_libsframe_find_findfre_1_DEPENDENCIES = $(testsuite_LDADD)
am_testsuite_libsframe_find_findfunc_1_OBJECTS = testsuite/libsframe.find/testsuite_libsframe_find_findfunc_1-findfunc-1.$(OBJEXT)
testsuite_libsframe_find_findfunc_1_OBJECTS = \
$(am_testsuite_libsframe_find_findfunc_1_OBJECTS)
-testsuite_libsframe_find_findfunc_1_DEPENDENCIES = \
- ${top_builddir}/libsframe.la
+testsuite_libsframe_find_findfunc_1_DEPENDENCIES = $(testsuite_LDADD)
am_testsuite_libsframe_find_plt_findfre_1_OBJECTS = testsuite/libsframe.find/testsuite_libsframe_find_plt_findfre_1-plt-findfre-1.$(OBJEXT)
testsuite_libsframe_find_plt_findfre_1_OBJECTS = \
$(am_testsuite_libsframe_find_plt_findfre_1_OBJECTS)
testsuite_libsframe_find_plt_findfre_1_DEPENDENCIES = \
- ${top_builddir}/libsframe.la
+ $(testsuite_LDADD)
am_testsuite_libsframe_find_plt_findfre_2_OBJECTS = testsuite/libsframe.find/testsuite_libsframe_find_plt_findfre_2-plt-findfre-2.$(OBJEXT)
testsuite_libsframe_find_plt_findfre_2_OBJECTS = \
$(am_testsuite_libsframe_find_plt_findfre_2_OBJECTS)
testsuite_libsframe_find_plt_findfre_2_DEPENDENCIES = \
- ${top_builddir}/libsframe.la
+ $(testsuite_LDADD)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
MAINTAINERCLEANFILES = $(am__append_3)
INCDIR = $(srcdir)/../include
# include libctf for swap.h
-AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/../include -I$(srcdir)/../libctf
+AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../libctf
AM_CFLAGS = @ac_libsframe_warn_cflags@
libsframe_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
@HAVE_LD_VERSION_SCRIPT_TRUE@@HAVE_SOLARIS_LD_FALSE@libsframe_version_script = -Wl,--version-script=$(srcdir)/libsframe.ver
EXPECT = expect
RUNTEST = runtest
RUNTESTFLAGS =
+testsuite_LDADD = $(top_builddir)/libsframe.la
+testsuite_CPPFLAGS = -I$(srcdir)/testsuite -I$(srcdir)/../include
testsuite_libsframe_decode_be_flipping_SOURCES = testsuite/libsframe.decode/be-flipping.c
-testsuite_libsframe_decode_be_flipping_LDADD = ${top_builddir}/libsframe.la
-testsuite_libsframe_decode_be_flipping_CPPFLAGS = -I${top_srcdir}/../include -Wall
+testsuite_libsframe_decode_be_flipping_LDADD = $(testsuite_LDADD)
+testsuite_libsframe_decode_be_flipping_CPPFLAGS = $(testsuite_CPPFLAGS)
testsuite_libsframe_decode_frecnt_1_SOURCES = testsuite/libsframe.decode/frecnt-1.c
-testsuite_libsframe_decode_frecnt_1_LDADD = ${top_builddir}/libsframe.la
-testsuite_libsframe_decode_frecnt_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+testsuite_libsframe_decode_frecnt_1_LDADD = $(testsuite_LDADD)
+testsuite_libsframe_decode_frecnt_1_CPPFLAGS = $(testsuite_CPPFLAGS)
testsuite_libsframe_decode_frecnt_2_SOURCES = testsuite/libsframe.decode/frecnt-2.c
-testsuite_libsframe_decode_frecnt_2_LDADD = ${top_builddir}/libsframe.la
-testsuite_libsframe_decode_frecnt_2_CPPFLAGS = -I${top_srcdir}/../include -Wall
+testsuite_libsframe_decode_frecnt_2_LDADD = $(testsuite_LDADD)
+testsuite_libsframe_decode_frecnt_2_CPPFLAGS = $(testsuite_CPPFLAGS)
testsuite_libsframe_encode_encode_1_SOURCES = testsuite/libsframe.encode/encode-1.c
-testsuite_libsframe_encode_encode_1_LDADD = ${top_builddir}/libsframe.la
-testsuite_libsframe_encode_encode_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+testsuite_libsframe_encode_encode_1_LDADD = $(testsuite_LDADD)
+testsuite_libsframe_encode_encode_1_CPPFLAGS = $(testsuite_CPPFLAGS)
testsuite_libsframe_find_findfre_1_SOURCES = testsuite/libsframe.find/findfre-1.c
-testsuite_libsframe_find_findfre_1_LDADD = ${top_builddir}/libsframe.la
-testsuite_libsframe_find_findfre_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+testsuite_libsframe_find_findfre_1_LDADD = $(testsuite_LDADD)
+testsuite_libsframe_find_findfre_1_CPPFLAGS = $(testsuite_CPPFLAGS)
testsuite_libsframe_find_findfunc_1_SOURCES = testsuite/libsframe.find/findfunc-1.c
-testsuite_libsframe_find_findfunc_1_LDADD = ${top_builddir}/libsframe.la
-testsuite_libsframe_find_findfunc_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+testsuite_libsframe_find_findfunc_1_LDADD = $(testsuite_LDADD)
+testsuite_libsframe_find_findfunc_1_CPPFLAGS = $(testsuite_CPPFLAGS)
testsuite_libsframe_find_plt_findfre_1_SOURCES = testsuite/libsframe.find/plt-findfre-1.c
-testsuite_libsframe_find_plt_findfre_1_LDADD = ${top_builddir}/libsframe.la
-testsuite_libsframe_find_plt_findfre_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+testsuite_libsframe_find_plt_findfre_1_LDADD = $(testsuite_LDADD)
+testsuite_libsframe_find_plt_findfre_1_CPPFLAGS = $(testsuite_CPPFLAGS)
testsuite_libsframe_find_plt_findfre_2_SOURCES = testsuite/libsframe.find/plt-findfre-2.c
-testsuite_libsframe_find_plt_findfre_2_LDADD = ${top_builddir}/libsframe.la
-testsuite_libsframe_find_plt_findfre_2_CPPFLAGS = -I${top_srcdir}/../include -Wall
+testsuite_libsframe_find_plt_findfre_2_LDADD = $(testsuite_LDADD)
+testsuite_libsframe_find_plt_findfre_2_CPPFLAGS = $(testsuite_CPPFLAGS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-am
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#include "sframe-api.h"
-
-/* DejaGnu should not use gnulib's vsnprintf replacement here. */
-#undef vsnprintf
-#include <dejagnu.h>
+#include "sframe-test.h"
/* SFrame info from the following source (1 fde 5 fres):
static int cnt;
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#include "sframe-api.h"
-
-/* DejaGnu should not use gnulib's vsnprintf replacement here. */
-#undef vsnprintf
-#include <dejagnu.h>
+#include "sframe-test.h"
/*
* SFrame info from the following source (1 fde 4 fres):
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#include "sframe-api.h"
-
-/* DejaGnu should not use gnulib's vsnprintf replacement here. */
-#undef vsnprintf
-#include <dejagnu.h>
+#include "sframe-test.h"
/*
* SFrame info from the following source (2 fde 8 fres):
endif
%C%_be_flipping_SOURCES = %D%/be-flipping.c
-%C%_be_flipping_LDADD = ${top_builddir}/libsframe.la
-%C%_be_flipping_CPPFLAGS = -I${top_srcdir}/../include -Wall
+%C%_be_flipping_LDADD = $(testsuite_LDADD)
+%C%_be_flipping_CPPFLAGS = $(testsuite_CPPFLAGS)
%C%_frecnt_1_SOURCES = %D%/frecnt-1.c
-%C%_frecnt_1_LDADD = ${top_builddir}/libsframe.la
-%C%_frecnt_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+%C%_frecnt_1_LDADD = $(testsuite_LDADD)
+%C%_frecnt_1_CPPFLAGS = $(testsuite_CPPFLAGS)
%C%_frecnt_2_SOURCES = %D%/frecnt-2.c
-%C%_frecnt_2_LDADD = ${top_builddir}/libsframe.la
-%C%_frecnt_2_CPPFLAGS = -I${top_srcdir}/../include -Wall
+%C%_frecnt_2_LDADD = $(testsuite_LDADD)
+%C%_frecnt_2_CPPFLAGS = $(testsuite_CPPFLAGS)
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include "sframe-api.h"
-
-/* DejaGnu should not use gnulib's vsnprintf replacement here. */
-#undef vsnprintf
-#include <dejagnu.h>
+#include "sframe-test.h"
static int
add_fde1 (sframe_encoder_ctx *encode, uint32_t start_pc_vaddr,
endif
%C%_encode_1_SOURCES = %D%/encode-1.c
-%C%_encode_1_LDADD = ${top_builddir}/libsframe.la
-%C%_encode_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+%C%_encode_1_LDADD = $(testsuite_LDADD)
+%C%_encode_1_CPPFLAGS = $(testsuite_CPPFLAGS)
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include "sframe-api.h"
-
-/* DejaGnu should not use gnulib's vsnprintf replacement here. */
-#undef vsnprintf
-#include <dejagnu.h>
+#include "sframe-test.h"
static int
add_fde1 (sframe_encoder_ctx *encode, uint32_t start_pc_vaddr,
The tests in here stress the sframe_get_funcdesc_with_addr API via calls to
the sframe_find_fre (). */
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include "sframe-api.h"
-
-/* DejaGnu should not use gnulib's vsnprintf replacement here. */
-#undef vsnprintf
-#include <dejagnu.h>
+#include "sframe-test.h"
static int
add_fde1 (sframe_encoder_ctx *encode, uint32_t start_pc_vaddr,
endif
%C%_findfre_1_SOURCES = %D%/findfre-1.c
-%C%_findfre_1_LDADD = ${top_builddir}/libsframe.la
-%C%_findfre_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+%C%_findfre_1_LDADD = $(testsuite_LDADD)
+%C%_findfre_1_CPPFLAGS = $(testsuite_CPPFLAGS)
%C%_findfunc_1_SOURCES = %D%/findfunc-1.c
-%C%_findfunc_1_LDADD = ${top_builddir}/libsframe.la
-%C%_findfunc_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+%C%_findfunc_1_LDADD = $(testsuite_LDADD)
+%C%_findfunc_1_CPPFLAGS = $(testsuite_CPPFLAGS)
%C%_plt_findfre_1_SOURCES = %D%/plt-findfre-1.c
-%C%_plt_findfre_1_LDADD = ${top_builddir}/libsframe.la
-%C%_plt_findfre_1_CPPFLAGS = -I${top_srcdir}/../include -Wall
+%C%_plt_findfre_1_LDADD = $(testsuite_LDADD)
+%C%_plt_findfre_1_CPPFLAGS = $(testsuite_CPPFLAGS)
%C%_plt_findfre_2_SOURCES = %D%/plt-findfre-2.c
-%C%_plt_findfre_2_LDADD = ${top_builddir}/libsframe.la
-%C%_plt_findfre_2_CPPFLAGS = -I${top_srcdir}/../include -Wall
+%C%_plt_findfre_2_LDADD = $(testsuite_LDADD)
+%C%_plt_findfre_2_CPPFLAGS = $(testsuite_CPPFLAGS)
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include "sframe-api.h"
-
-/* DejaGnu should not use gnulib's vsnprintf replacement here. */
-#undef vsnprintf
-#include <dejagnu.h>
+#include "sframe-test.h"
static int
add_plt_fde1 (sframe_encoder_ctx *ectx, uint32_t plt_vaddr,
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include "sframe-api.h"
-
-/* DejaGnu should not use gnulib's vsnprintf replacement here. */
-#undef vsnprintf
-#include <dejagnu.h>
+#include "sframe-test.h"
/* s390x-specific size in bytes of plt0 and pltN. */
#define PLT_SIZE 32
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
+testsuite_LDADD = $(top_builddir)/libsframe.la
+testsuite_CPPFLAGS = -I$(srcdir)/testsuite -I$(srcdir)/../include
+
# libsframe encoder/decoder/find testsuite
include %D%/libsframe.decode/local.mk
include %D%/libsframe.encode/local.mk
--- /dev/null
+/* sframe-test.h -- Common libsframe testsuite header.
+
+ Copyright (C) 2022-2025 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _SFRAME_TEST_H
+#define _SFRAME_TEST_H
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "sframe-api.h"
+
+/* DejaGnu should not use gnulib's vsnprintf replacement here. */
+#undef vsnprintf
+
+/* PR 33168: Solaris <sys/wait.h> with __EXTENSIONS__ defined gets a
+ declaration of wait(). This conflicts with <dejagnu.h>'s wait
+ definition that is only removed after DejaGnu 1.6.3. */
+
+#define wait dg_wait
+/* Add prototype to avoid warning. */
+void wait (void);
+#include <dejagnu.h>
+#undef wait
+
+#endif /* _SFRAME_TEST_H */