summaryrefslogtreecommitdiff
path: root/debian/tests
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2019-11-26 14:11:14 +0300
committerIgor Pashev <pashev.igor@gmail.com>2019-11-26 14:11:14 +0300
commitcf9383412494964d6188fcf08a362c0c0f313afc (patch)
treebd9e6a5b3a63cbb155b81112c855c19cb5f2b314 /debian/tests
downloadperl-debian.tar.gz
Import perl (5.30.0-9)debian/5.30.0-9debian
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/README15
-rwxr-xr-xdebian/tests/compression30
-rw-r--r--debian/tests/control31
-rw-r--r--debian/tests/data/README13
-rw-r--r--debian/tests/data/amd64/buster-ndbm.dirbin0 -> 16 bytes
-rw-r--r--debian/tests/data/amd64/buster-ndbm.pagbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/amd64/buster.gdbmbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/amd64/jessie-ndbm.pagbin0 -> 12300 bytes
-rw-r--r--debian/tests/data/amd64/jessie.gdbmbin0 -> 12300 bytes
-rw-r--r--debian/tests/data/amd64/stretch-ndbm.pagbin0 -> 12301 bytes
-rw-r--r--debian/tests/data/amd64/stretch.gdbmbin0 -> 12301 bytes
-rw-r--r--debian/tests/data/arm64/buster-ndbm.dirbin0 -> 16 bytes
-rw-r--r--debian/tests/data/arm64/buster-ndbm.pagbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/arm64/buster.gdbmbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/arm64/stretch-ndbm.pagbin0 -> 12306 bytes
-rw-r--r--debian/tests/data/arm64/stretch.gdbmbin0 -> 12301 bytes
-rw-r--r--debian/tests/data/armhf/buster-ndbm.dirbin0 -> 16 bytes
-rw-r--r--debian/tests/data/armhf/buster-ndbm.pagbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/armhf/buster.gdbmbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/buster.bz2bin0 -> 52 bytes
-rw-r--r--debian/tests/data/buster.dbbin0 -> 12288 bytes
-rw-r--r--debian/tests/data/buster.gzbin0 -> 30 bytes
-rw-r--r--debian/tests/data/buster.storablebin0 -> 29 bytes
-rw-r--r--debian/tests/data/i386/buster-ndbm.dirbin0 -> 16 bytes
-rw-r--r--debian/tests/data/i386/buster-ndbm.pagbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/i386/buster.gdbmbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/jessie.bz2bin0 -> 51 bytes
-rw-r--r--debian/tests/data/jessie.dbbin0 -> 12288 bytes
-rw-r--r--debian/tests/data/jessie.gzbin0 -> 30 bytes
-rw-r--r--debian/tests/data/jessie.storablebin0 -> 29 bytes
-rw-r--r--debian/tests/data/ppc64el/buster-ndbm.dirbin0 -> 16 bytes
-rw-r--r--debian/tests/data/ppc64el/buster-ndbm.pagbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/ppc64el/buster.gdbmbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/ppc64el/stretch-ndbm.pagbin0 -> 12306 bytes
-rw-r--r--debian/tests/data/ppc64el/stretch.gdbmbin0 -> 12301 bytes
-rw-r--r--debian/tests/data/s390x/buster-ndbm.dirbin0 -> 16 bytes
-rw-r--r--debian/tests/data/s390x/buster-ndbm.pagbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/s390x/buster.gdbmbin0 -> 16384 bytes
-rw-r--r--debian/tests/data/s390x/stretch-ndbm.pagbin0 -> 12306 bytes
-rw-r--r--debian/tests/data/s390x/stretch.gdbmbin0 -> 12301 bytes
-rw-r--r--debian/tests/data/stretch.bz2bin0 -> 53 bytes
-rw-r--r--debian/tests/data/stretch.dbbin0 -> 12288 bytes
-rw-r--r--debian/tests/data/stretch.gzbin0 -> 31 bytes
-rw-r--r--debian/tests/data/stretch.storablebin0 -> 30 bytes
-rwxr-xr-xdebian/tests/db29
-rwxr-xr-xdebian/tests/embed31
-rwxr-xr-xdebian/tests/gdbm32
-rwxr-xr-xdebian/tests/hello6
-rwxr-xr-xdebian/tests/ndbm25
-rwxr-xr-xdebian/tests/perl-base-self-contained5
-rw-r--r--debian/tests/pkg-perl/syntax-skip8
-rwxr-xr-xdebian/tests/storable9
-rwxr-xr-xdebian/tests/verify-configure5
53 files changed, 239 insertions, 0 deletions
diff --git a/debian/tests/README b/debian/tests/README
new file mode 100644
index 0000000..8f363cd
--- /dev/null
+++ b/debian/tests/README
@@ -0,0 +1,15 @@
+This directory holds rudimentary autopkgtest regression checks for
+src:perl. We mostly test backwards compatibility with things like reading
+in old binary files (zlib, Berkeley DB etc.) and making sure we can still
+retrieve their contents.
+
+We also run an existing maintainer test for checking the status of
+separately packaged dual life modules in the archive. This is expected
+to regress when somebody e.g. packages a new dual life module, and
+the fix is to add corresponding Breaks/Provides/Replaces or special
+case it in the test.
+
+This is work in progress, and suggestions for further tests are very
+welcome.
+
+ -- Niko Tyni <ntyni@debian.org> Fri, 18 May 2018 16:45:10 +0300
diff --git a/debian/tests/compression b/debian/tests/compression
new file mode 100755
index 0000000..8835ee9
--- /dev/null
+++ b/debian/tests/compression
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+DATA=debian/tests/data
+
+echo "testing gz uncompression..."
+msg="gz uncompressed OK"
+echo "$msg" | gzip -c | perl -MIO::Uncompress::Gunzip=gunzip -e 'gunzip \*STDIN => \*STDOUT' | grep "$msg"
+
+for f in $DATA/*.gz; do
+ < $f perl -MIO::Uncompress::Gunzip=gunzip -e 'gunzip \*STDIN => \*STDOUT' | grep OK
+done
+
+echo "testing gz compression..."
+msg="gz compressed OK"
+echo "$msg" | perl -MIO::Compress::Gzip=gzip -e 'gzip \*STDIN => \*STDOUT' | gzip -dc | grep "$msg"
+
+echo "testing bz2 uncompression"
+msg="bz2 uncompressed OK"
+echo "$msg" | bzip2 -c | perl -MIO::Uncompress::Bunzip2=bunzip2 -e 'bunzip2 \*STDIN => \*STDOUT' | grep "$msg"
+
+for f in $DATA/*.bz2; do
+ < $f perl -MIO::Uncompress::Bunzip2=bunzip2 -e 'bunzip2 \*STDIN => \*STDOUT' | grep OK
+done
+
+echo "testing bz2 compression..."
+msg="bz2 compressed OK"
+echo "$msg" | perl -MIO::Compress::Bzip2=bzip2 -e 'bzip2 \*STDIN => \*STDOUT' | bzip2 -dc | grep "$msg"
+
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..156871b
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,31 @@
+Tests: hello
+Depends: perl-base
+
+Tests: perl-base-self-contained
+Depends: perl-base
+
+Tests: compression db gdbm ndbm storable
+Depends: perl, db-util, gdbmtool
+Restrictions: skippable
+
+Tests: embed
+Depends: libperl-dev, build-essential
+Restrictions: allow-stderr
+
+Test-Command: prove debian/t/control.t
+Depends: perl, libapt-pkg-perl
+Features: test-name=control
+Restrictions: skip-not-installable
+
+Test-Command: prove debian/t/released-versions.t
+Depends: perl, dpkg-dev
+Features: test-name=released_versions
+
+Test-Command: /usr/share/pkg-perl-autopkgtest/runtime-deps-and-recommends.d/syntax.t
+Depends: @, pkg-perl-autopkgtest
+Restrictions: allow-stderr
+Features: test-name=syntax
+
+Tests: verify-configure
+Depends: dist (>= 3.5-236), build-essential, cpio
+Restrictions: superficial, allow-stderr
diff --git a/debian/tests/data/README b/debian/tests/data/README
new file mode 100644
index 0000000..919bc8b
--- /dev/null
+++ b/debian/tests/data/README
@@ -0,0 +1,13 @@
+Commands to regenerate these files, to be run in corresponding chroots
+
+# echo stretch OK | gzip -c > stretch.gz
+
+# echo stretch OK | bzip2 -c > stretch.bz2
+
+# perl -MDB_File -e '$d = shift; tie %h, q(DB_File), "$d.db", O_WRONLY|O_CREAT , 0640 or die "opening DB file failed: $!"; $h{foo} = "$d OK"; untie %h' stretch
+
+# perl -MGDBM_File -e '$d = shift; tie %h, q(GDBM_File), "$d.gdbm", &GDBM_WRCREAT, 0640 or die "opening GDBM file failed: $!"; $h{foo} = "$d OK"; untie %h' stretch
+
+# perl -MFcntl -MNDBM_File -e '$d = shift; tie %h, q(NDBM_File), "$d", O_RDWR|O_CREAT, 0640 or die "opening NDBM file failed: $!"; $h{foo} = "$d OK"; untie %h' stretch
+
+# perl -MStorable=nstore -e '$d=shift; $h{foo}="$d OK"; nstore \%h, "$d.storable"' stretch
diff --git a/debian/tests/data/amd64/buster-ndbm.dir b/debian/tests/data/amd64/buster-ndbm.dir
new file mode 100644
index 0000000..24248ad
--- /dev/null
+++ b/debian/tests/data/amd64/buster-ndbm.dir
Binary files differ
diff --git a/debian/tests/data/amd64/buster-ndbm.pag b/debian/tests/data/amd64/buster-ndbm.pag
new file mode 100644
index 0000000..b07fcc3
--- /dev/null
+++ b/debian/tests/data/amd64/buster-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/amd64/buster.gdbm b/debian/tests/data/amd64/buster.gdbm
new file mode 100644
index 0000000..b07fcc3
--- /dev/null
+++ b/debian/tests/data/amd64/buster.gdbm
Binary files differ
diff --git a/debian/tests/data/amd64/jessie-ndbm.pag b/debian/tests/data/amd64/jessie-ndbm.pag
new file mode 100644
index 0000000..0f7d7de
--- /dev/null
+++ b/debian/tests/data/amd64/jessie-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/amd64/jessie.gdbm b/debian/tests/data/amd64/jessie.gdbm
new file mode 100644
index 0000000..0f7d7de
--- /dev/null
+++ b/debian/tests/data/amd64/jessie.gdbm
Binary files differ
diff --git a/debian/tests/data/amd64/stretch-ndbm.pag b/debian/tests/data/amd64/stretch-ndbm.pag
new file mode 100644
index 0000000..3e61e28
--- /dev/null
+++ b/debian/tests/data/amd64/stretch-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/amd64/stretch.gdbm b/debian/tests/data/amd64/stretch.gdbm
new file mode 100644
index 0000000..3e61e28
--- /dev/null
+++ b/debian/tests/data/amd64/stretch.gdbm
Binary files differ
diff --git a/debian/tests/data/arm64/buster-ndbm.dir b/debian/tests/data/arm64/buster-ndbm.dir
new file mode 100644
index 0000000..24248ad
--- /dev/null
+++ b/debian/tests/data/arm64/buster-ndbm.dir
Binary files differ
diff --git a/debian/tests/data/arm64/buster-ndbm.pag b/debian/tests/data/arm64/buster-ndbm.pag
new file mode 100644
index 0000000..adf279f
--- /dev/null
+++ b/debian/tests/data/arm64/buster-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/arm64/buster.gdbm b/debian/tests/data/arm64/buster.gdbm
new file mode 100644
index 0000000..b07fcc3
--- /dev/null
+++ b/debian/tests/data/arm64/buster.gdbm
Binary files differ
diff --git a/debian/tests/data/arm64/stretch-ndbm.pag b/debian/tests/data/arm64/stretch-ndbm.pag
new file mode 100644
index 0000000..4664e2d
--- /dev/null
+++ b/debian/tests/data/arm64/stretch-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/arm64/stretch.gdbm b/debian/tests/data/arm64/stretch.gdbm
new file mode 100644
index 0000000..3e61e28
--- /dev/null
+++ b/debian/tests/data/arm64/stretch.gdbm
Binary files differ
diff --git a/debian/tests/data/armhf/buster-ndbm.dir b/debian/tests/data/armhf/buster-ndbm.dir
new file mode 100644
index 0000000..24248ad
--- /dev/null
+++ b/debian/tests/data/armhf/buster-ndbm.dir
Binary files differ
diff --git a/debian/tests/data/armhf/buster-ndbm.pag b/debian/tests/data/armhf/buster-ndbm.pag
new file mode 100644
index 0000000..13f5f78
--- /dev/null
+++ b/debian/tests/data/armhf/buster-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/armhf/buster.gdbm b/debian/tests/data/armhf/buster.gdbm
new file mode 100644
index 0000000..30c961b
--- /dev/null
+++ b/debian/tests/data/armhf/buster.gdbm
Binary files differ
diff --git a/debian/tests/data/buster.bz2 b/debian/tests/data/buster.bz2
new file mode 100644
index 0000000..16d0718
--- /dev/null
+++ b/debian/tests/data/buster.bz2
Binary files differ
diff --git a/debian/tests/data/buster.db b/debian/tests/data/buster.db
new file mode 100644
index 0000000..c90e829
--- /dev/null
+++ b/debian/tests/data/buster.db
Binary files differ
diff --git a/debian/tests/data/buster.gz b/debian/tests/data/buster.gz
new file mode 100644
index 0000000..a7d41ea
--- /dev/null
+++ b/debian/tests/data/buster.gz
Binary files differ
diff --git a/debian/tests/data/buster.storable b/debian/tests/data/buster.storable
new file mode 100644
index 0000000..f998743
--- /dev/null
+++ b/debian/tests/data/buster.storable
Binary files differ
diff --git a/debian/tests/data/i386/buster-ndbm.dir b/debian/tests/data/i386/buster-ndbm.dir
new file mode 100644
index 0000000..24248ad
--- /dev/null
+++ b/debian/tests/data/i386/buster-ndbm.dir
Binary files differ
diff --git a/debian/tests/data/i386/buster-ndbm.pag b/debian/tests/data/i386/buster-ndbm.pag
new file mode 100644
index 0000000..1402b6b
--- /dev/null
+++ b/debian/tests/data/i386/buster-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/i386/buster.gdbm b/debian/tests/data/i386/buster.gdbm
new file mode 100644
index 0000000..1402b6b
--- /dev/null
+++ b/debian/tests/data/i386/buster.gdbm
Binary files differ
diff --git a/debian/tests/data/jessie.bz2 b/debian/tests/data/jessie.bz2
new file mode 100644
index 0000000..1859cf2
--- /dev/null
+++ b/debian/tests/data/jessie.bz2
Binary files differ
diff --git a/debian/tests/data/jessie.db b/debian/tests/data/jessie.db
new file mode 100644
index 0000000..cb0a259
--- /dev/null
+++ b/debian/tests/data/jessie.db
Binary files differ
diff --git a/debian/tests/data/jessie.gz b/debian/tests/data/jessie.gz
new file mode 100644
index 0000000..6bdde05
--- /dev/null
+++ b/debian/tests/data/jessie.gz
Binary files differ
diff --git a/debian/tests/data/jessie.storable b/debian/tests/data/jessie.storable
new file mode 100644
index 0000000..2f6c693
--- /dev/null
+++ b/debian/tests/data/jessie.storable
Binary files differ
diff --git a/debian/tests/data/ppc64el/buster-ndbm.dir b/debian/tests/data/ppc64el/buster-ndbm.dir
new file mode 100644
index 0000000..24248ad
--- /dev/null
+++ b/debian/tests/data/ppc64el/buster-ndbm.dir
Binary files differ
diff --git a/debian/tests/data/ppc64el/buster-ndbm.pag b/debian/tests/data/ppc64el/buster-ndbm.pag
new file mode 100644
index 0000000..adf279f
--- /dev/null
+++ b/debian/tests/data/ppc64el/buster-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/ppc64el/buster.gdbm b/debian/tests/data/ppc64el/buster.gdbm
new file mode 100644
index 0000000..b07fcc3
--- /dev/null
+++ b/debian/tests/data/ppc64el/buster.gdbm
Binary files differ
diff --git a/debian/tests/data/ppc64el/stretch-ndbm.pag b/debian/tests/data/ppc64el/stretch-ndbm.pag
new file mode 100644
index 0000000..4664e2d
--- /dev/null
+++ b/debian/tests/data/ppc64el/stretch-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/ppc64el/stretch.gdbm b/debian/tests/data/ppc64el/stretch.gdbm
new file mode 100644
index 0000000..3e61e28
--- /dev/null
+++ b/debian/tests/data/ppc64el/stretch.gdbm
Binary files differ
diff --git a/debian/tests/data/s390x/buster-ndbm.dir b/debian/tests/data/s390x/buster-ndbm.dir
new file mode 100644
index 0000000..24248ad
--- /dev/null
+++ b/debian/tests/data/s390x/buster-ndbm.dir
Binary files differ
diff --git a/debian/tests/data/s390x/buster-ndbm.pag b/debian/tests/data/s390x/buster-ndbm.pag
new file mode 100644
index 0000000..63c9f44
--- /dev/null
+++ b/debian/tests/data/s390x/buster-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/s390x/buster.gdbm b/debian/tests/data/s390x/buster.gdbm
new file mode 100644
index 0000000..de13482
--- /dev/null
+++ b/debian/tests/data/s390x/buster.gdbm
Binary files differ
diff --git a/debian/tests/data/s390x/stretch-ndbm.pag b/debian/tests/data/s390x/stretch-ndbm.pag
new file mode 100644
index 0000000..fcb868f
--- /dev/null
+++ b/debian/tests/data/s390x/stretch-ndbm.pag
Binary files differ
diff --git a/debian/tests/data/s390x/stretch.gdbm b/debian/tests/data/s390x/stretch.gdbm
new file mode 100644
index 0000000..f924f69
--- /dev/null
+++ b/debian/tests/data/s390x/stretch.gdbm
Binary files differ
diff --git a/debian/tests/data/stretch.bz2 b/debian/tests/data/stretch.bz2
new file mode 100644
index 0000000..5fb6ede
--- /dev/null
+++ b/debian/tests/data/stretch.bz2
Binary files differ
diff --git a/debian/tests/data/stretch.db b/debian/tests/data/stretch.db
new file mode 100644
index 0000000..914f283
--- /dev/null
+++ b/debian/tests/data/stretch.db
Binary files differ
diff --git a/debian/tests/data/stretch.gz b/debian/tests/data/stretch.gz
new file mode 100644
index 0000000..c2de8d2
--- /dev/null
+++ b/debian/tests/data/stretch.gz
Binary files differ
diff --git a/debian/tests/data/stretch.storable b/debian/tests/data/stretch.storable
new file mode 100644
index 0000000..0c097c7
--- /dev/null
+++ b/debian/tests/data/stretch.storable
Binary files differ
diff --git a/debian/tests/db b/debian/tests/db
new file mode 100755
index 0000000..61e3d53
--- /dev/null
+++ b/debian/tests/db
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -e
+
+DB=$(mktemp).db
+DATA=debian/tests/data
+
+echo "testing DB_File reading..."
+
+msg="current DB file read OK"
+
+printf "%s\n%s\n" foo "$msg" | db_load -T -t hash $DB
+
+# also test with DB files created on jessie and stretch
+for db in $DB $DATA/*.db; do
+ perl -MDB_File -le 'tie %h, q(DB_File), shift, O_RDONLY, 0640, $DB_HASH or die "opening DB file failed: $!"; die "contents of DB file not found?" if !exists $h{foo}; print $h{foo}' $db | grep OK
+done
+
+rm $DB
+
+echo "testing DB_File writing..."
+
+msg="DB file written OK"
+
+DB=$(mktemp).db
+perl -MDB_File -e 'tie %h, q(DB_File), shift, O_WRONLY | O_CREAT, 0640, $DB_BTREE or die "opening DB file failed: $!"; $h{foo} = shift; untie %h' $DB "$msg"
+
+db_dump -p $DB | grep OK
+
+rm $DB
diff --git a/debian/tests/embed b/debian/tests/embed
new file mode 100755
index 0000000..c58621e
--- /dev/null
+++ b/debian/tests/embed
@@ -0,0 +1,31 @@
+#!/bin/sh
+set -e
+set -x
+
+# from perlembed(1)
+cat > perlembed.c <<EOF
+#include <EXTERN.h> /* from the Perl distribution */
+#include <perl.h> /* from the Perl distribution */
+
+static PerlInterpreter *my_perl; /*** The Perl interpreter ***/
+
+int main(int argc, char **argv, char **env)
+{
+ PERL_SYS_INIT3(&argc,&argv,&env);
+ my_perl = perl_alloc();
+ perl_construct(my_perl);
+ PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
+ perl_parse(my_perl, NULL, argc, argv, (char **)NULL);
+ perl_run(my_perl);
+ perl_destruct(my_perl);
+ perl_free(my_perl);
+ PERL_SYS_TERM();
+}
+EOF
+CC=$(perl -MConfig -E 'say $Config{cc}')
+CCOPTS=$(perl -MExtUtils::Embed -e ccopts)
+LDOPTS=$(perl -MExtUtils::Embed -e ldopts)
+
+$CC $CCOPTS perlembed.c -o perlembed.bin $LDOPTS -lperl
+./perlembed.bin -E 'say "OK"' | grep -q -x OK
+
diff --git a/debian/tests/gdbm b/debian/tests/gdbm
new file mode 100755
index 0000000..bb516ed
--- /dev/null
+++ b/debian/tests/gdbm
@@ -0,0 +1,32 @@
+#!/bin/sh
+set -e
+
+ARCH=$(dpkg --print-architecture)
+DB=$(mktemp).gdbm
+DATA=debian/tests/data
+
+[ -d $DATA/$ARCH ] || exit 77
+
+echo "testing GDBM reading..."
+
+msg="GDBM file read OK"
+
+printf 'open %s\nstore %s "%s"\n' $DB foo "$msg" | gdbmtool -f -
+
+for db in $DB $DATA/$ARCH/*.gdbm; do
+ perl -MGDBM_File -le 'tie %h, q(GDBM_File), shift, &GDBM_READER, 0640 or die "opening GDBM file failed: $!"; die "contents of GDBM file not found?" if !exists $h{foo}; print $h{foo}' $db | grep OK
+done
+
+rm $DB
+
+echo "testing GDBM writing..."
+
+msg="GDBM file written OK"
+
+DB=$(mktemp).db
+
+perl -MGDBM_File -e 'tie %h, q(GDBM_File), shift, &GDBM_WRCREAT, 0640 or die "opening GDBM file failed: $!"; $h{foo} = shift; untie %h' $DB "$msg"
+
+printf 'open %s\nfetch %s\n' $DB foo | gdbmtool -f - | grep "$msg"
+
+rm $DB
diff --git a/debian/tests/hello b/debian/tests/hello
new file mode 100755
index 0000000..f07776e
--- /dev/null
+++ b/debian/tests/hello
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+
+# silly test to see that perl is still working
+perl -e 'print "OK: hello, world!\n"' | grep OK
+
diff --git a/debian/tests/ndbm b/debian/tests/ndbm
new file mode 100755
index 0000000..101ff1f
--- /dev/null
+++ b/debian/tests/ndbm
@@ -0,0 +1,25 @@
+#!/bin/sh
+set -e
+
+ARCH=$(dpkg --print-architecture)
+DATA=debian/tests/data
+
+[ -d $DATA/$ARCH ] || exit 77
+
+TDIR=$(mktemp -d)
+echo "testing NDBM reading..."
+
+for pag in $DATA/$ARCH/*-ndbm.pag; do
+ base=$(basename $pag .pag)
+ cp $pag $TDIR
+ dir=$(echo $pag | sed 's/\.pag$/.dir/')
+ if [ -e $dir ]; then
+ cp $dir $TDIR
+ else
+ # NDBM compat in stretch and earlier made .dir a hardlink to .pag
+ ln $TDIR/$base.pag $TDIR/$base.dir || exit 77
+ fi
+ perl -MFcntl -MNDBM_File -le 'tie %h, q(NDBM_File), shift, O_RDWR, 0640 or die "opening NDBM file failed: $!"; die "contents of NDBM file not found?" if !$h{foo}; print $h{foo}' $TDIR/$base | grep OK
+done
+
+rm -r "$TDIR"
diff --git a/debian/tests/perl-base-self-contained b/debian/tests/perl-base-self-contained
new file mode 100755
index 0000000..d561c31
--- /dev/null
+++ b/debian/tests/perl-base-self-contained
@@ -0,0 +1,5 @@
+#!/bin/sh
+echo "Verifying that perl-base is still self contained"
+
+(cd /; find usr/lib/*/perl-base -name '*.pm') | \
+ perl debian/check-require /
diff --git a/debian/tests/pkg-perl/syntax-skip b/debian/tests/pkg-perl/syntax-skip
new file mode 100644
index 0000000..369827e
--- /dev/null
+++ b/debian/tests/pkg-perl/syntax-skip
@@ -0,0 +1,8 @@
+# needs Tk, not worth even a suggestion
+Pod/Perldoc/ToTk
+# please load Net::FTP first
+Net/FTP/
+# needs Math::BigInt loaded
+Math/BigInt/CalcEmu
+# obviously not for us
+File/Spec/VMS
diff --git a/debian/tests/storable b/debian/tests/storable
new file mode 100755
index 0000000..a559382
--- /dev/null
+++ b/debian/tests/storable
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+DATA=debian/tests/data
+
+echo "Testing reading of Storable files..."
+for f in $DATA/*.storable; do
+ perl -MStorable=retrieve -le '$h=retrieve(shift); print $h->{foo}' $f | grep OK
+done
diff --git a/debian/tests/verify-configure b/debian/tests/verify-configure
new file mode 100755
index 0000000..fe0fd91
--- /dev/null
+++ b/debian/tests/verify-configure
@@ -0,0 +1,5 @@
+#!/bin/sh
+mkdir $AUTOPKGTEST_TMP/source
+find . -print0 | cpio -p0d $AUTOPKGTEST_TMP/source
+cd $AUTOPKGTEST_TMP/source
+make -f debian/rules verify-configure-stamp