summaryrefslogtreecommitdiff
path: root/tickets/f81fb692b9e041d0839679cba7c83866
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2016-02-20 22:10:13 +0200
committerLars Wirzenius <liw@liw.fi>2016-02-20 22:10:13 +0200
commit8c087e41fdda5d9508b9c95ea57fbd079142633d (patch)
tree44bbbcec3aac27d6ca26d498ac1b4f77ae15c190 /tickets/f81fb692b9e041d0839679cba7c83866
parentea12bbd09cf9e03d4b50f139f55925aad10dcec0 (diff)
downloadobnam-dev-distix-8c087e41fdda5d9508b9c95ea57fbd079142633d.tar.gz
imported mails
Diffstat (limited to 'tickets/f81fb692b9e041d0839679cba7c83866')
-rw-r--r--tickets/f81fb692b9e041d0839679cba7c83866/Maildir/cur/.this-dir-not-empty/.empty/empty-file0
-rw-r--r--tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/.this-dir-not-empty/.empty/empty-file0
-rw-r--r--tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/1455999010.M15391P17339Q202.exolobe1287
-rw-r--r--tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/1455999010.M475156P17339Q205.exolobe1287
-rw-r--r--tickets/f81fb692b9e041d0839679cba7c83866/Maildir/tmp/.this-dir-not-empty/.empty/empty-file0
-rw-r--r--tickets/f81fb692b9e041d0839679cba7c83866/ticket.yaml4
6 files changed, 578 insertions, 0 deletions
diff --git a/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/cur/.this-dir-not-empty/.empty/empty-file b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/cur/.this-dir-not-empty/.empty/empty-file
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/cur/.this-dir-not-empty/.empty/empty-file
diff --git a/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/.this-dir-not-empty/.empty/empty-file b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/.this-dir-not-empty/.empty/empty-file
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/.this-dir-not-empty/.empty/empty-file
diff --git a/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/1455999010.M15391P17339Q202.exolobe1 b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/1455999010.M15391P17339Q202.exolobe1
new file mode 100644
index 0000000..2364b29
--- /dev/null
+++ b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/1455999010.M15391P17339Q202.exolobe1
@@ -0,0 +1,287 @@
+Return-Path: <obnam-dev-bounces@obnam.org>
+X-Original-To: distix@pieni.net
+Delivered-To: distix@pieni.net
+Received: from bagpuss.pepperfish.net (bagpuss.pepperfish.net [148.251.8.16])
+ (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
+ (No client certificate requested)
+ by pieni.net (Postfix) with ESMTPS id C21412CC1E
+ for <distix@pieni.net>; Mon, 24 Nov 2014 22:37:25 +0100 (CET)
+Received: from platypus.pepperfish.net (unknown [10.112.100.20])
+ by bagpuss.pepperfish.net (Postfix) with ESMTP id CD2B93497;
+ Mon, 24 Nov 2014 21:37:24 +0000 (GMT)
+Received: from localhost ([::1] helo=platypus.pepperfish.net)
+ by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian))
+ id 1Xt1K0-0001Xb-OK; Mon, 24 Nov 2014 21:37:24 +0000
+Received: from inmail ([10.112.100.10] helo=mx0.pepperfish.net)
+ by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian))
+ id 1Xt1Jz-0001XV-AG
+ for <obnam-dev@obnam.org>; Mon, 24 Nov 2014 21:37:23 +0000
+Received: from mail-wg0-f42.google.com ([74.125.82.42])
+ by mx0.pepperfish.net with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:128)
+ (Exim 4.80) (envelope-from <damien.courousse@gmail.com>)
+ id 1Xt1Jw-0001z9-7W
+ for obnam-dev@obnam.org; Mon, 24 Nov 2014 21:37:23 +0000
+Received: by mail-wg0-f42.google.com with SMTP id z12so13671700wgg.29
+ for <obnam-dev@obnam.org>; Mon, 24 Nov 2014 13:37:14 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
+ h=message-id:date:from:user-agent:mime-version:to:subject:references
+ :in-reply-to:content-type;
+ bh=LHyFc6AZ1vsSutR8IC783cUP/lIKn45zn75P/bHq6nk=;
+ b=yHp6u7iga3sEJS08Kw2c1b4dngeCCkbOgbPZseQPWkRJCiNkYGP97DWQcvD2U3IRlD
+ tCykv70mHWcItnHv7ZjadAkOYuKsAts242x5xGclOCW/nwehoND/vAWLGG2x6naRC7xU
+ rJVSOAiY+kEWl1U417ajhGvnwoejE5N1TAL2h3jalrPExMR2zSSgz7DCYSw7QsNiZW0K
+ JVBkyLo5Evcmj12dkTADeAeJ0Uz5TJ8y2s7x8NmLaIftDD0s2EHNJPhOBqII5ikHG8lC
+ TOtzqH2zR5Flf7g2zfc1pQatHGTHU+eoN/NDlLKPNg6ldHQN2yjGHHsEZTrch0AGBDnB
+ d3SQ==
+X-Received: by 10.194.185.167 with SMTP id fd7mr38599432wjc.108.1416865034197;
+ Mon, 24 Nov 2014 13:37:14 -0800 (PST)
+Received: from [192.168.0.2] (dra38-9-78-249-57-166.fbx.proxad.net.
+ [78.249.57.166])
+ by mx.google.com with ESMTPSA id n3sm22717205wjz.21.2014.11.24.13.37.12
+ for <obnam-dev@obnam.org>
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
+ Mon, 24 Nov 2014 13:37:12 -0800 (PST)
+Message-ID: <5473A507.2060706@gmail.com>
+Date: Mon, 24 Nov 2014 22:37:11 +0100
+From: =?UTF-8?B?RGFtaWVuIENvdXJvdXNzw6k=?= <damien.courousse@gmail.com>
+User-Agent: Mozilla/5.0 (X11; Linux x86_64;
+ rv:31.0) Gecko/20100101 Icedove/31.2.0
+MIME-Version: 1.0
+To: obnam-dev@obnam.org
+References: <5473A4C3.6010901@gmail.com>
+In-Reply-To: <5473A4C3.6010901@gmail.com>
+X-Forwarded-Message-Id: <5473A4C3.6010901@gmail.com>
+Content-Type: multipart/mixed; boundary="------------090702000209000008050509"
+X-Spam-Score: -1.0
+X-Spam-Score-int: -9
+X-Spam-Bar: -
+X-Scanned-By: pepperfish.net, Mon, 24 Nov 2014 21:37:22 +0000
+X-Spam-Report: Content analysis details: (-1.0 points)
+ pts rule name description
+ ---- ---------------------- --------------------------------------------------
+ -0.5 PPF_USER_AGENT User-Agent: exists
+ 1.0 PPF_FROM_CONTAINS_MAIL The From header contains 'mail'
+ 1.2 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
+ (damien.courousse[at]gmail.com)
+ -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low
+ trust [74.125.82.42 listed in list.dnswl.org]
+ -0.0 SPF_PASS SPF: sender matches SPF record
+ -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
+ [score: 0.0000]
+ -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
+ domain
+ 0.1 DKIM_SIGNED Message has a DKIM or DK signature,
+ not necessarily valid
+ -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
+Subject: Fwd: how to test failure with yarn ?
+X-BeenThere: obnam-dev@obnam.org
+X-Mailman-Version: 2.1.5
+Precedence: list
+List-Id: Obnam development discussions <obnam-dev-obnam.org>
+List-Unsubscribe: <http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org>,
+ <mailto:obnam-dev-request@obnam.org?subject=unsubscribe>
+List-Archive: <http://listmaster.pepperfish.net/pipermail/obnam-dev-obnam.org>
+List-Post: <mailto:obnam-dev@obnam.org>
+List-Help: <mailto:obnam-dev-request@obnam.org?subject=help>
+List-Subscribe: <http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org>,
+ <mailto:obnam-dev-request@obnam.org?subject=subscribe>
+Sender: obnam-dev-bounces@obnam.org
+Errors-To: obnam-dev-bounces@obnam.org
+
+This is a multi-part message in MIME format.
+--------------090702000209000008050509
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+Ooops sorry,
+I guess the dev mailing list was more appropriated for this.
+
+regards,
+Damien
+
+
+-------- Message transféré --------
+Sujet : how to test failure with yarn ?
+Date : Mon, 24 Nov 2014 22:36:03 +0100
+De : Damien Couroussé <damien.courousse@gmail.com>
+Pour : obnam <obnam@flarn.net>
+
+While trying to chase the "Value Error" bug that I still sometimes
+experience, I considered implementing some yarn tests for the "full
+filesystem" test case [1].
+
+As far as I understand this test case however, I would need to have
+obnam fail a backup at some point, which does not seem to be supported
+in yarn yet. Is it possible ?
+
+Please find attached a draft attempt of implementation with yarn.
+It produces the following :
+
+
+$ yarn -s yarns/obnam.sh yarns/9000-implements.yarn
+yarns/0030-basics.yarn -r "Backup over a full disk"
+ERROR: In scenario "Backup over a full disk"
+
+step "THEN user U fails the backup of directory L to repository R" failed,
+with exit code 1:
+
+(...)
+ ERROR: Can't back up
+/tmp/tmpqgZNqF/Backup_over_a_full_disk/datadir/L/0/0/0/39: RCE08AX: I/O
+error: /tmp/tmpqgZNqF/Backup_over_a_full_disk/datadir/L/0/0/0/39: 28: No
+space left on device
+ ERROR: RCE08AX: I/O error: None: 28: No space left on device
+
+>>> this error is expected
+
+
+ERROR: Test suite FAILED in 1 scenarios
+
+>>> However I would expect the test _not_ to fail :)
+
+
+regards,
+Damien
+
+[1] http://obnam.org/bugs/test-for-full-filesystem/
+
+
+
+
+
+
+--------------090702000209000008050509
+Content-Type: text/x-patch;
+ name="0001-wip.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment;
+ filename="0001-wip.patch"
+
+>From 51d12e91ddcc7aafd788bde9e5ccfd11ffb0f9cb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Damien=20Courouss=C3=A9?= <damien.courousse@gmail.com>
+Date: Sun, 23 Nov 2014 16:22:01 +0100
+Subject: [PATCH] wip
+
+---
+ yarns/0030-basics.yarn | 28 ++++++++++++++++++++++++++++
+ yarns/9000-implements.yarn | 28 ++++++++++++++++++++++++++++
+ yarns/obnam.sh | 13 +++++++++++++
+ 3 files changed, 69 insertions(+)
+
+diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn
+index 4bc8439..0711e42 100644
+--- a/yarns/0030-basics.yarn
++++ b/yarns/0030-basics.yarn
+@@ -313,3 +313,31 @@ setting to a new size, the backup should still work.
+ AND user U restores their latest generation in repository R into X
+ THEN L, restored to X, matches manifest M
+ AND user U can fsck the repository R
++
++Backup over a full disk
++-----------------------
++
++If the backup destination went full, there should be a safe way to access the
++generations that were previously correctly backuped. Obnam commands over this
++backup repository should (at least) return correct error statements.
++
++ SCENARIO Backup over a full disk
++ ASSUMING user has permissions to create and mount disk images
++ GIVEN 100kB of new data in directory L
++ AND a manifest of L in G1
++ AND a volume V of total size 1MB mounted to R
++ WHEN user U backs up directory L to repository R
++ GIVEN 1MB of new data in directory L
++ THEN user U fails the backup of directory L to repository R
++ WHEN user U restores generation 1 to R1 from repository R
++ THEN L, restored to R1, matches manifest G1
++ FINALLY umount R
++
++Points to solve
+++ how to test failure for the second backup without aborting with an error?
+++ how to create, and later delete, data in repository R?
++
+++ testing failure for the second backup
+++ autre solution: créer de nouvelles data avant le 2e backup, pour remplir le disque,
++ + puis supprimer les data
++ + obnam devrait fonctionner
+diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn
+index 1a86fbe..7a9788e 100644
+--- a/yarns/9000-implements.yarn
++++ b/yarns/9000-implements.yarn
+@@ -619,6 +619,34 @@ often is disabled on build servers.
+ touch "$DATADIR/xattr.test"
+ setfattr -n user.foo -v bar "$DATADIR/xattr.test"
+
++Check on whether user can create and mount volume images
++--------------------------------------------------------
++
++ IMPLEMENTS ASSUMING user has permissions to create and mount disk images
++ echo "TODO" 1>&2
++ exit 0
++
++ IMPLEMENTS GIVEN a volume (\S+) of total size (\S+) mounted to (\S+)
++ echo "volume name: $DATADIR/$MATCH_1" 1>&2
++ echo "size: $MATCH_2" 1>&2
++ create_disk "$DATADIR/$MATCH_1" "$MATCH_2"
++ mkdir -p "$DATADIR/$MATCH_3"
++ sudo mount -o loop,users,defaults "$DATADIR/$MATCH_1" "$DATADIR/$MATCH_3"
++ sudo chmod 777 "$DATADIR/$MATCH_3"
++
++ IMPLEMENTS WHEN fail here
++ exit 1
++
++ IMPLEMENTS FINALLY umount (\S+)
++ sudo -u root umount "$DATADIR/$MATCH_1"
++
++This backup is expected to fail.
++
++ IMPLEMENTS THEN user (\S+) fails the backup of directory (\S+) to repository (\S+)
++ run_obnam "$MATCH_1" backup -r "$DATADIR/$MATCH_3" "$DATADIR/$MATCH_2"
++ exit 0
++
++
+
+ Nagios
+ ------
+diff --git a/yarns/obnam.sh b/yarns/obnam.sh
+index 0792bce..4bca356 100644
+--- a/yarns/obnam.sh
++++ b/yarns/obnam.sh
+@@ -192,6 +192,19 @@ get_keyid()
+ }
+
+
++# Create a disk image
++create_disk()
++{
++ local DISK="$1"
++ local SIZE="$2"
++ local DEV=`sudo losetup -f`
++ dd if=/dev/zero of="$DISK" bs=1 count=0 seek="$SIZE"
++ sudo losetup "$DEV" "$DISK"
++ sudo mkfs.ext3 "$DEV"
++ sudo losetup -d "$DEV"
++}
++
++
+ # Create a dummy $HOME that actually exists.
+ export HOME="$DATADIR/home"
+ mkdir -p "$HOME"
+--
+2.1.0
+
+
+
+--------------090702000209000008050509
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+_______________________________________________
+obnam-dev mailing list
+obnam-dev@obnam.org
+http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org
+
+--------------090702000209000008050509--
+
diff --git a/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/1455999010.M475156P17339Q205.exolobe1 b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/1455999010.M475156P17339Q205.exolobe1
new file mode 100644
index 0000000..2364b29
--- /dev/null
+++ b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/new/1455999010.M475156P17339Q205.exolobe1
@@ -0,0 +1,287 @@
+Return-Path: <obnam-dev-bounces@obnam.org>
+X-Original-To: distix@pieni.net
+Delivered-To: distix@pieni.net
+Received: from bagpuss.pepperfish.net (bagpuss.pepperfish.net [148.251.8.16])
+ (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
+ (No client certificate requested)
+ by pieni.net (Postfix) with ESMTPS id C21412CC1E
+ for <distix@pieni.net>; Mon, 24 Nov 2014 22:37:25 +0100 (CET)
+Received: from platypus.pepperfish.net (unknown [10.112.100.20])
+ by bagpuss.pepperfish.net (Postfix) with ESMTP id CD2B93497;
+ Mon, 24 Nov 2014 21:37:24 +0000 (GMT)
+Received: from localhost ([::1] helo=platypus.pepperfish.net)
+ by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian))
+ id 1Xt1K0-0001Xb-OK; Mon, 24 Nov 2014 21:37:24 +0000
+Received: from inmail ([10.112.100.10] helo=mx0.pepperfish.net)
+ by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian))
+ id 1Xt1Jz-0001XV-AG
+ for <obnam-dev@obnam.org>; Mon, 24 Nov 2014 21:37:23 +0000
+Received: from mail-wg0-f42.google.com ([74.125.82.42])
+ by mx0.pepperfish.net with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:128)
+ (Exim 4.80) (envelope-from <damien.courousse@gmail.com>)
+ id 1Xt1Jw-0001z9-7W
+ for obnam-dev@obnam.org; Mon, 24 Nov 2014 21:37:23 +0000
+Received: by mail-wg0-f42.google.com with SMTP id z12so13671700wgg.29
+ for <obnam-dev@obnam.org>; Mon, 24 Nov 2014 13:37:14 -0800 (PST)
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
+ h=message-id:date:from:user-agent:mime-version:to:subject:references
+ :in-reply-to:content-type;
+ bh=LHyFc6AZ1vsSutR8IC783cUP/lIKn45zn75P/bHq6nk=;
+ b=yHp6u7iga3sEJS08Kw2c1b4dngeCCkbOgbPZseQPWkRJCiNkYGP97DWQcvD2U3IRlD
+ tCykv70mHWcItnHv7ZjadAkOYuKsAts242x5xGclOCW/nwehoND/vAWLGG2x6naRC7xU
+ rJVSOAiY+kEWl1U417ajhGvnwoejE5N1TAL2h3jalrPExMR2zSSgz7DCYSw7QsNiZW0K
+ JVBkyLo5Evcmj12dkTADeAeJ0Uz5TJ8y2s7x8NmLaIftDD0s2EHNJPhOBqII5ikHG8lC
+ TOtzqH2zR5Flf7g2zfc1pQatHGTHU+eoN/NDlLKPNg6ldHQN2yjGHHsEZTrch0AGBDnB
+ d3SQ==
+X-Received: by 10.194.185.167 with SMTP id fd7mr38599432wjc.108.1416865034197;
+ Mon, 24 Nov 2014 13:37:14 -0800 (PST)
+Received: from [192.168.0.2] (dra38-9-78-249-57-166.fbx.proxad.net.
+ [78.249.57.166])
+ by mx.google.com with ESMTPSA id n3sm22717205wjz.21.2014.11.24.13.37.12
+ for <obnam-dev@obnam.org>
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
+ Mon, 24 Nov 2014 13:37:12 -0800 (PST)
+Message-ID: <5473A507.2060706@gmail.com>
+Date: Mon, 24 Nov 2014 22:37:11 +0100
+From: =?UTF-8?B?RGFtaWVuIENvdXJvdXNzw6k=?= <damien.courousse@gmail.com>
+User-Agent: Mozilla/5.0 (X11; Linux x86_64;
+ rv:31.0) Gecko/20100101 Icedove/31.2.0
+MIME-Version: 1.0
+To: obnam-dev@obnam.org
+References: <5473A4C3.6010901@gmail.com>
+In-Reply-To: <5473A4C3.6010901@gmail.com>
+X-Forwarded-Message-Id: <5473A4C3.6010901@gmail.com>
+Content-Type: multipart/mixed; boundary="------------090702000209000008050509"
+X-Spam-Score: -1.0
+X-Spam-Score-int: -9
+X-Spam-Bar: -
+X-Scanned-By: pepperfish.net, Mon, 24 Nov 2014 21:37:22 +0000
+X-Spam-Report: Content analysis details: (-1.0 points)
+ pts rule name description
+ ---- ---------------------- --------------------------------------------------
+ -0.5 PPF_USER_AGENT User-Agent: exists
+ 1.0 PPF_FROM_CONTAINS_MAIL The From header contains 'mail'
+ 1.2 FREEMAIL_FROM Sender email is commonly abused enduser mail provider
+ (damien.courousse[at]gmail.com)
+ -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low
+ trust [74.125.82.42 listed in list.dnswl.org]
+ -0.0 SPF_PASS SPF: sender matches SPF record
+ -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
+ [score: 0.0000]
+ -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's
+ domain
+ 0.1 DKIM_SIGNED Message has a DKIM or DK signature,
+ not necessarily valid
+ -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature
+Subject: Fwd: how to test failure with yarn ?
+X-BeenThere: obnam-dev@obnam.org
+X-Mailman-Version: 2.1.5
+Precedence: list
+List-Id: Obnam development discussions <obnam-dev-obnam.org>
+List-Unsubscribe: <http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org>,
+ <mailto:obnam-dev-request@obnam.org?subject=unsubscribe>
+List-Archive: <http://listmaster.pepperfish.net/pipermail/obnam-dev-obnam.org>
+List-Post: <mailto:obnam-dev@obnam.org>
+List-Help: <mailto:obnam-dev-request@obnam.org?subject=help>
+List-Subscribe: <http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org>,
+ <mailto:obnam-dev-request@obnam.org?subject=subscribe>
+Sender: obnam-dev-bounces@obnam.org
+Errors-To: obnam-dev-bounces@obnam.org
+
+This is a multi-part message in MIME format.
+--------------090702000209000008050509
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+Ooops sorry,
+I guess the dev mailing list was more appropriated for this.
+
+regards,
+Damien
+
+
+-------- Message transféré --------
+Sujet : how to test failure with yarn ?
+Date : Mon, 24 Nov 2014 22:36:03 +0100
+De : Damien Couroussé <damien.courousse@gmail.com>
+Pour : obnam <obnam@flarn.net>
+
+While trying to chase the "Value Error" bug that I still sometimes
+experience, I considered implementing some yarn tests for the "full
+filesystem" test case [1].
+
+As far as I understand this test case however, I would need to have
+obnam fail a backup at some point, which does not seem to be supported
+in yarn yet. Is it possible ?
+
+Please find attached a draft attempt of implementation with yarn.
+It produces the following :
+
+
+$ yarn -s yarns/obnam.sh yarns/9000-implements.yarn
+yarns/0030-basics.yarn -r "Backup over a full disk"
+ERROR: In scenario "Backup over a full disk"
+
+step "THEN user U fails the backup of directory L to repository R" failed,
+with exit code 1:
+
+(...)
+ ERROR: Can't back up
+/tmp/tmpqgZNqF/Backup_over_a_full_disk/datadir/L/0/0/0/39: RCE08AX: I/O
+error: /tmp/tmpqgZNqF/Backup_over_a_full_disk/datadir/L/0/0/0/39: 28: No
+space left on device
+ ERROR: RCE08AX: I/O error: None: 28: No space left on device
+
+>>> this error is expected
+
+
+ERROR: Test suite FAILED in 1 scenarios
+
+>>> However I would expect the test _not_ to fail :)
+
+
+regards,
+Damien
+
+[1] http://obnam.org/bugs/test-for-full-filesystem/
+
+
+
+
+
+
+--------------090702000209000008050509
+Content-Type: text/x-patch;
+ name="0001-wip.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment;
+ filename="0001-wip.patch"
+
+>From 51d12e91ddcc7aafd788bde9e5ccfd11ffb0f9cb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Damien=20Courouss=C3=A9?= <damien.courousse@gmail.com>
+Date: Sun, 23 Nov 2014 16:22:01 +0100
+Subject: [PATCH] wip
+
+---
+ yarns/0030-basics.yarn | 28 ++++++++++++++++++++++++++++
+ yarns/9000-implements.yarn | 28 ++++++++++++++++++++++++++++
+ yarns/obnam.sh | 13 +++++++++++++
+ 3 files changed, 69 insertions(+)
+
+diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn
+index 4bc8439..0711e42 100644
+--- a/yarns/0030-basics.yarn
++++ b/yarns/0030-basics.yarn
+@@ -313,3 +313,31 @@ setting to a new size, the backup should still work.
+ AND user U restores their latest generation in repository R into X
+ THEN L, restored to X, matches manifest M
+ AND user U can fsck the repository R
++
++Backup over a full disk
++-----------------------
++
++If the backup destination went full, there should be a safe way to access the
++generations that were previously correctly backuped. Obnam commands over this
++backup repository should (at least) return correct error statements.
++
++ SCENARIO Backup over a full disk
++ ASSUMING user has permissions to create and mount disk images
++ GIVEN 100kB of new data in directory L
++ AND a manifest of L in G1
++ AND a volume V of total size 1MB mounted to R
++ WHEN user U backs up directory L to repository R
++ GIVEN 1MB of new data in directory L
++ THEN user U fails the backup of directory L to repository R
++ WHEN user U restores generation 1 to R1 from repository R
++ THEN L, restored to R1, matches manifest G1
++ FINALLY umount R
++
++Points to solve
+++ how to test failure for the second backup without aborting with an error?
+++ how to create, and later delete, data in repository R?
++
+++ testing failure for the second backup
+++ autre solution: créer de nouvelles data avant le 2e backup, pour remplir le disque,
++ + puis supprimer les data
++ + obnam devrait fonctionner
+diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn
+index 1a86fbe..7a9788e 100644
+--- a/yarns/9000-implements.yarn
++++ b/yarns/9000-implements.yarn
+@@ -619,6 +619,34 @@ often is disabled on build servers.
+ touch "$DATADIR/xattr.test"
+ setfattr -n user.foo -v bar "$DATADIR/xattr.test"
+
++Check on whether user can create and mount volume images
++--------------------------------------------------------
++
++ IMPLEMENTS ASSUMING user has permissions to create and mount disk images
++ echo "TODO" 1>&2
++ exit 0
++
++ IMPLEMENTS GIVEN a volume (\S+) of total size (\S+) mounted to (\S+)
++ echo "volume name: $DATADIR/$MATCH_1" 1>&2
++ echo "size: $MATCH_2" 1>&2
++ create_disk "$DATADIR/$MATCH_1" "$MATCH_2"
++ mkdir -p "$DATADIR/$MATCH_3"
++ sudo mount -o loop,users,defaults "$DATADIR/$MATCH_1" "$DATADIR/$MATCH_3"
++ sudo chmod 777 "$DATADIR/$MATCH_3"
++
++ IMPLEMENTS WHEN fail here
++ exit 1
++
++ IMPLEMENTS FINALLY umount (\S+)
++ sudo -u root umount "$DATADIR/$MATCH_1"
++
++This backup is expected to fail.
++
++ IMPLEMENTS THEN user (\S+) fails the backup of directory (\S+) to repository (\S+)
++ run_obnam "$MATCH_1" backup -r "$DATADIR/$MATCH_3" "$DATADIR/$MATCH_2"
++ exit 0
++
++
+
+ Nagios
+ ------
+diff --git a/yarns/obnam.sh b/yarns/obnam.sh
+index 0792bce..4bca356 100644
+--- a/yarns/obnam.sh
++++ b/yarns/obnam.sh
+@@ -192,6 +192,19 @@ get_keyid()
+ }
+
+
++# Create a disk image
++create_disk()
++{
++ local DISK="$1"
++ local SIZE="$2"
++ local DEV=`sudo losetup -f`
++ dd if=/dev/zero of="$DISK" bs=1 count=0 seek="$SIZE"
++ sudo losetup "$DEV" "$DISK"
++ sudo mkfs.ext3 "$DEV"
++ sudo losetup -d "$DEV"
++}
++
++
+ # Create a dummy $HOME that actually exists.
+ export HOME="$DATADIR/home"
+ mkdir -p "$HOME"
+--
+2.1.0
+
+
+
+--------------090702000209000008050509
+Content-Type: text/plain; charset="us-ascii"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+
+_______________________________________________
+obnam-dev mailing list
+obnam-dev@obnam.org
+http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org
+
+--------------090702000209000008050509--
+
diff --git a/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/tmp/.this-dir-not-empty/.empty/empty-file b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/tmp/.this-dir-not-empty/.empty/empty-file
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tickets/f81fb692b9e041d0839679cba7c83866/Maildir/tmp/.this-dir-not-empty/.empty/empty-file
diff --git a/tickets/f81fb692b9e041d0839679cba7c83866/ticket.yaml b/tickets/f81fb692b9e041d0839679cba7c83866/ticket.yaml
new file mode 100644
index 0000000..ee6da9b
--- /dev/null
+++ b/tickets/f81fb692b9e041d0839679cba7c83866/ticket.yaml
@@ -0,0 +1,4 @@
+ticket-id:
+- f81fb692b9e041d0839679cba7c83866
+title:
+- 'Fwd: how to test failure with yarn ?'