Bug#812420: Please add autopkg tests

2016-01-24 Thread Guido Günther
Hi,
On Sat, Jan 23, 2016 at 10:06:02PM +, James Cowgill wrote:
> Hi,
> 
> On Sat, 2016-01-23 at 17:03 +0100, Guido Günther wrote:
> > Source: polarssl
> > Severity: wishlist
> > 
> > Hi,
> > Please add some simple autopkg test so that when working on
> > e.g. security updates one can easily verify that one didn't break things
> > totally.
> > 
> > Attached patch does two things:
> > 
> > * Exercise some of the shipped helpers
> > * Link one example to the _installed_ library so we know the dev
> >   package is sane
> > 
> > Would be great if this could be applied (maybe to mbed TLS as well).
> 
> mbed TLS already has some autopkgtests which do something similar I
> think:
> https://sources.debian.net/src/mbedtls/2.2.1-2/debian/tests/

Yeah, most of this does the same. The polarssl ones do some more checks
but I leave it up to you if you want to pull these over or close the bug.

> I hoping to be able to remove polarssl at some point once everything's
> transitioned over, so this probably won't be fixed in polarssl
> unstable.

That's fine. It would be great if you could consider them for point
release or security updates though.

Cheers,
 -- Guido



Bug#812420: Please add autopkg tests

2016-01-23 Thread Guido Günther
Source: polarssl
Severity: wishlist

Hi,
Please add some simple autopkg test so that when working on
e.g. security updates one can easily verify that one didn't break things
totally.

Attached patch does two things:

* Exercise some of the shipped helpers
* Link one example to the _installed_ library so we know the dev
  package is sane

Would be great if this could be applied (maybe to mbed TLS as well).
Cheers
 -- Guido
>From 812c4051dab47c97a46ec19759b5021bf75485e4 Mon Sep 17 00:00:00 2001
Message-Id: <812c4051dab47c97a46ec19759b5021bf75485e4.1453564830.git@sigxcpu.org>
From: =?UTF-8?q?Guido=20G=C3=BCnther?= 
Date: Sat, 23 Jan 2016 16:14:17 +0100
Subject: [PATCH] Add simple smoe test

---
 debian/tests/build-test | 10 ++
 debian/tests/control|  5 +
 debian/tests/smoke  | 17 +
 3 files changed, 32 insertions(+)
 create mode 100755 debian/tests/build-test
 create mode 100644 debian/tests/control
 create mode 100755 debian/tests/smoke

diff --git a/debian/tests/build-test b/debian/tests/build-test
new file mode 100755
index 000..42b7127
--- /dev/null
+++ b/debian/tests/build-test
@@ -0,0 +1,10 @@
+#!/usr/bin/make -f
+
+CFLAGS	= -O2 -D_FILE_OFFSET_BITS=64 -Wall
+LDFLAGS	+= -lpolarssl
+
+a.out: programs/hash/hello.c
+	$(CC) $(CFLAGS) $(OFLAGS) $< $(LDFLAGS)
+	@echo "Build test of $< succeeded"
+	./a.out
+	@rm -f a.out
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 000..9b777fd
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,5 @@
+Tests: smoke
+Depends: libpolarssl-runtime
+
+Tests: build-test
+Depends: libpolarssl-dev
diff --git a/debian/tests/smoke b/debian/tests/smoke
new file mode 100755
index 000..03df087
--- /dev/null
+++ b/debian/tests/smoke
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+set -e
+
+# Excercise some of the demos
+polarssl_hello
+polarssl_mpi_demo
+
+# Make sure output is identical to coreutil versions
+[ "$(polarssl_sha1sum /etc/passwd)" = "$(sha1sum /etc/passwd)" ]
+[ "$(polarssl_md5sum /etc/passwd)" = "$(md5sum /etc/passwd)" ]
+
+# Run the selftest
+polarssl_selftest
+
+echo 'Smoke test of polarssl succesful'
+exit 0
-- 
2.7.0.rc3



Bug#812420: Please add autopkg tests

2016-01-23 Thread James Cowgill
Hi,

On Sat, 2016-01-23 at 17:03 +0100, Guido Günther wrote:
> Source: polarssl
> Severity: wishlist
> 
> Hi,
> Please add some simple autopkg test so that when working on
> e.g. security updates one can easily verify that one didn't break things
> totally.
> 
> Attached patch does two things:
> 
> * Exercise some of the shipped helpers
> * Link one example to the _installed_ library so we know the dev
>   package is sane
> 
> Would be great if this could be applied (maybe to mbed TLS as well).

mbed TLS already has some autopkgtests which do something similar I
think:
https://sources.debian.net/src/mbedtls/2.2.1-2/debian/tests/

I hoping to be able to remove polarssl at some point once everything's
transitioned over, so this probably won't be fixed in polarssl
unstable.

James

signature.asc
Description: This is a digitally signed message part