Your message dated Mon, 06 May 2013 21:50:43 +0200
with message-id <[email protected]>
and subject line Re: please add DEP-8 autopkgtest
has caused the Debian Bug report #705934,
regarding please add DEP-8 autopkgtest
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
705934: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705934
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lxc
Version: 0.8.0~rc1-4
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu raring ubuntu-patch
Dear Maintainer,
The attached debdiff adds a basic DEP-8 autopkgtest for lxc. See:
- https://code.launchpad.net/~jamesodhunt/ubuntu/raring/lxc/dep-8-tests
-
https://code.launchpad.net/~jamesodhunt/ubuntu/raring/lxc/dep-8-tests/+merge/157938
In Ubuntu, the attached patch was generated to achieve the following:
* Ensure a container can be created, started, stopped and cloned.
This is a very basic test, but I plan to add further checks soon.
Thanks for considering the patch.
-- System Information:
Debian Release: wheezy/sid
APT prefers raring-updates
APT policy: (500, 'raring-updates'), (500, 'raring-security'), (500, 'raring')
Architecture: i386 (i686)
Kernel: Linux 3.8.0-19-generic (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Kind regards,
James.
--
James Hunt
____________________________________
#upstart on freenode
http://upstart.ubuntu.com/cookbook
https://lists.ubuntu.com/mailman/listinfo/upstart-devel
=== modified file 'debian/changelog'
=== modified file 'debian/control'
--- debian/control 2013-02-18 22:12:13 +0000
+++ debian/control 2013-04-12 13:31:57 +0000
@@ -16,6 +16,7 @@
Standards-Version: 3.9.4
Homepage: http://lxc.sourceforge.net/
X-Python3-Version: >= 3.2
+XS-Testsuite: autopkgtest
Package: lxc
Architecture: linux-any
=== added directory 'debian/tests'
=== added file 'debian/tests/control'
--- debian/tests/control 1970-01-01 00:00:00 +0000
+++ debian/tests/control 2013-04-12 13:32:11 +0000
@@ -0,0 +1,3 @@
+Tests: exercise
+Depends: @, cgroup-lite
+Restrictions: needs-root
=== added file 'debian/tests/exercise'
--- debian/tests/exercise 1970-01-01 00:00:00 +0000
+++ debian/tests/exercise 2013-04-22 13:22:33 +0000
@@ -0,0 +1,80 @@
+#!/bin/sh
+#---------------------------------------------------------------------
+# Some very basic tests to run in a DEP-8 environment.
+#---------------------------------------------------------------------
+
+template_dir=/usr/share/lxc/templates
+
+# Exit with error message.
+#
+# @msg: message to display.
+die()
+{
+ msg="$*"
+ echo "ERROR: $msg" >&2
+ exit 1
+}
+
+# seconds to wait for container to be running/stopped
+boot_secs=10
+shutdown_secs=10
+
+distro=$(lsb_release --id|cut -d: -f2-|awk '{print $1}'|tr '[A-Z]' '[a-z]')
+[ -z "$distro" ] && die "failed to determine distro"
+
+[ ! -d "$template_dir" ] && die "template directory does not exist"
+
+file=$(ls "${template_dir}/lxc-${distro}" 2>/dev/null)
+[ -z "$file" ] && die "template does not exist for distro '$distro'"
+template="$distro"
+
+release=$(lsb_release -c|awk '{print $2}')
+[ -z "$release" ] && die "failed to establish release"
+
+orig_name="${release}-dep8"
+new_name="${orig_name}-clone"
+
+name="$orig_name"
+
+# flush cache to ensure we always get the latest bootstrap image
+lxc-create -n "$name" -t "$template" -- "$release" --flush-cache || \
+ die "failed to create container '$name' using template '$template' for
release '$release'"
+
+lxc-ls -1 | grep -q "^${name}$" || \
+ die "container not known"
+
+lxc-start -n "$name" --daemon || die "failed to initiate container start"
+
+lxc-wait -n "$name" -s RUNNING -t $boot_secs || \
+ die "container $name: did not start after $boot_secs seconds"
+
+lxc-stop -n "$name" || die "container $name: failed to initiate shutdown"
+
+lxc-wait -n "$name" -s STOPPED -t $shutdown_secs || \
+ die "container $name: did not stop within $shutdown_secs seconds"
+
+lxc-clone -o "$orig_name" -n "$new_name" || \
+ die "failed to clone container '$orig_name' to '$new_name'"
+
+# switch attention to the clone
+name="$new_name"
+
+lxc-start -n "$name" --daemon || die "container $name: failed to initiate
start"
+
+lxc-wait -n "$name" -s RUNNING -t $boot_secs || \
+ die "container $name: did not start after $boot_secs seconds"
+
+lxc-stop -n "$name" || die "container $new_nam: failed to initiate shutdown"
+
+lxc-wait -n "$name" -s STOPPED -t $shutdown_secs || \
+ die "container $name: did not stop within $shutdown_secs seconds"
+
+# clean up
+for name in "$orig_name" "$new_name"
+do
+ lxc-destroy -n "$name" || die "container: $name: cannot delete"
+done
+
+echo SUCCESS
+
+exit 0
--- End Message ---
--- Begin Message ---
feel free to reopen if you have a new patch.
--
Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email: [email protected]
Internet: http://people.progress-technologies.net/~daniel.baumann/
--- End Message ---