summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/libraries/shared/exit
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/libraries/shared/exit')
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/debian/control.in15
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/debian/libexecbit1.symbols2
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/fill-values6
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/orig/Makefile22
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/build-spec/orig/code.c12
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/eval/desc4
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/eval/hints1
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/control.in15
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/debian/libexecbit1.symbols2
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/fill-values6
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/orig/Makefile22
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit/build-spec/orig/code.c13
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit/eval/desc2
-rw-r--r--t/recipes/checks/libraries/shared/exit/shared-libs-exit/eval/hints1
16 files changed, 125 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;
+}
diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/eval/desc b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/eval/desc
new file mode 100644
index 0000000..f983298
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/eval/desc
@@ -0,0 +1,4 @@
+Testname: shared-libs-exit-fork
+Test-Against:
+ exit-in-shared-library
+Check: libraries/shared/exit
diff --git a/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/eval/hints b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/eval/hints
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/t/recipes/checks/libraries/shared/exit/shared-libs-exit-fork/eval/hints
@@ -0,0 +1 @@
+
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]