diff options
Diffstat (limited to 't/recipes/checks/libraries/shared/exit/shared-libs-exit')
8 files changed, 62 insertions, 0 deletions
diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/compat.in b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/control.in b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/control.in new file mode 100644 index 0000000..86a2064 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/control.in @@ -0,0 +1,15 @@ +Source: [% $source %] +Priority: optional +Section: libs +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libexecbit1 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/libexecbit1.symbols b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/libexecbit1.symbols new file mode 100644 index 0000000..0b26833 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/libexecbit1.symbols @@ -0,0 +1,2 @@ +libexecbit.so.1 libexecbit1 #MINVER# + e@Base 1.0 diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/fill-values b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/fill-values new file mode 100644 index 0000000..99c4585 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-exit +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to libs invoking exit(3) diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/orig/Makefile b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/orig/Makefile new file mode 100644 index 0000000..68d5863 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/orig/Makefile @@ -0,0 +1,22 @@ +CC=gcc +CFLAGS+= -fPIC + +SONAMES:= libexecbit.so.1 +LIBFILES:= $(patsubst %,%.0.1, $(SONAMES)) + +all: $(LIBFILES) + +$(LIBFILES): code.o + $(CC) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc + +clean: + rm -f *.a *.o *.so* + +install: all + install -m 0755 -d $(DESTDIR)/usr/lib + install -m 0755 *.so* $(DESTDIR)/usr/lib + for FILE in $(SONAMES) ; do \ + ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \ + done + +.PHONY: install clean diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/orig/code.c b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/orig/code.c new file mode 100644 index 0000000..297a4e8 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/orig/code.c @@ -0,0 +1,13 @@ +#include <stdlib.h> + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + if (x < 0.0) { + exit(1); + } else { + return x; + } +} diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit/eval/desc b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/eval/desc new file mode 100644 index 0000000..58e693f --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/eval/desc @@ -0,0 +1,2 @@ +Testname: shared-libs-exit +Check: libraries/shared/exit diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit/eval/hints b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/eval/hints new file mode 100644 index 0000000..ac335c0 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit/eval/hints @@ -0,0 +1 @@ +libexecbit1 (binary): exit-in-shared-library [usr/lib/libexecbit.so.1.0.1] |