diff options
Diffstat (limited to '')
6 files changed, 58 insertions, 0 deletions
diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/debian/compat.in b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/debian/control.in b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/debian/control.in new file mode 100644 index 0000000..86a2064 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/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-fork/build-spec/debian/libexecbit1.symbols b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/debian/libexecbit1.symbols new file mode 100644 index 0000000..0b26833 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/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-fork/build-spec/fill-values b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/fill-values new file mode 100644 index 0000000..8c30582 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: shared-libs-exit-fork +Package-Architecture: any +Default-Build-Depends: debhelper (>= 9.20151004~) +Dh-Compat-Level: 9 +Description: Test checks related to libs invoking both exit(3) and fork(2) diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/orig/Makefile b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/orig/Makefile new file mode 100644 index 0000000..68d5863 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/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-fork/build-spec/orig/code.c b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/orig/code.c new file mode 100644 index 0000000..df63394 --- /dev/null +++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/orig/code.c @@ -0,0 +1,12 @@ +#include <stdlib.h> +#include <unistd.h> + +double e(void (*f)(char *)){ + char tmp[10]; + double x; + f(tmp); + x = atof(tmp); + if (fork() != 0) + exit(1); + return x; +} |