[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[patch] Proposals for a better chroot test in jenkins



Hi, Holger.

Here are two patches for jenkins, which I believe would make it more
robust.

I hope I got the git patch generation and sending working as it should.
Let me know if I should do it differently.

-- 
Happy hacking
Petter Reinholdtsen
>From 82a5bac06331763a77e98b82917489ad84761e91 Mon Sep 17 00:00:00 2001
From: Petter Reinholdtsen <pere@hungry.com>
Date: Sun, 2 Dec 2012 23:23:46 +0100
Subject: [PATCH 1/2] Report processes using the chroot partition at the end of each run.

---
 bin/chroot_tester.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/bin/chroot_tester.sh b/bin/chroot_tester.sh
index 01e10a2..44e0be9 100755
--- a/bin/chroot_tester.sh
+++ b/bin/chroot_tester.sh
@@ -40,6 +40,8 @@ export TMPFILE=$(mktemp -u)
 export CTMPFILE=$CHROOT_TARGET/$TMPFILE
 
 cleanup_all() {
+	# List the processes using the partition
+	fuser -mv $CHROOT_TARGET
 	# test if $CHROOT_TARGET starts with /chroots/
 	if [ "${CHROOT_TARGET:0:9}" != "/chroots/" ] ; then
 		echo "HALP. CHROOT_TARGET = $CHROOT_TARGET"
-- 
1.7.2.5

>From 286a90fefb7240da907d6b622ba9d12880042226 Mon Sep 17 00:00:00 2001
From: Petter Reinholdtsen <pere@hungry.com>
Date: Sun, 2 Dec 2012 23:24:50 +0100
Subject: [PATCH 2/2] Add apt workaround to make sure apt and squid do not fail to talk to each other.

---
 bin/chroot_tester.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/bin/chroot_tester.sh b/bin/chroot_tester.sh
index 44e0be9..ab3ab67 100755
--- a/bin/chroot_tester.sh
+++ b/bin/chroot_tester.sh
@@ -67,6 +67,8 @@ mount /proc -t proc /proc
 echo -e '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d
 chmod +x /usr/sbin/policy-rc.d
 echo 'Acquire::http::Proxy "http://localhost:3128";;' > /etc/apt/apt.conf.d/80proxy
+# Disable pipelining to avoid triggering <URL: http://bugs.debian.org/565555 >
+echo 'Aquire::http::Pipeline-Depth 0;' >> /etc/apt/apt.conf.d/80proxy
 echo "deb-src $MIRROR $1 main contrib non-free" >> /etc/apt/sources.list
 apt-get update
 EOF
-- 
1.7.2.5


Reply to: