diff options
author | Lars Wirzenius <liw@liw.fi> | 2016-02-20 22:10:13 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2016-02-20 22:10:13 +0200 |
commit | 8c087e41fdda5d9508b9c95ea57fbd079142633d (patch) | |
tree | 44bbbcec3aac27d6ca26d498ac1b4f77ae15c190 /tickets/8fa3d6533bd94dc2864051eb32b5c8ba | |
parent | ea12bbd09cf9e03d4b50f139f55925aad10dcec0 (diff) | |
download | obnam-dev-distix-8c087e41fdda5d9508b9c95ea57fbd079142633d.tar.gz |
imported mails
Diffstat (limited to 'tickets/8fa3d6533bd94dc2864051eb32b5c8ba')
8 files changed, 675 insertions, 0 deletions
diff --git a/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/cur/.this-dir-not-empty/.empty/empty-file b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/cur/.this-dir-not-empty/.empty/empty-file new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/cur/.this-dir-not-empty/.empty/empty-file diff --git a/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/.this-dir-not-empty/.empty/empty-file b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/.this-dir-not-empty/.empty/empty-file new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/.this-dir-not-empty/.empty/empty-file diff --git a/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999004.M334526P17339Q141.exolobe1 b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999004.M334526P17339Q141.exolobe1 new file mode 100644 index 0000000..f24a207 --- /dev/null +++ b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999004.M334526P17339Q141.exolobe1 @@ -0,0 +1,121 @@ +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 A011321387 + for <distix@pieni.net>; Mon, 15 Dec 2014 20:41:26 +0100 (CET) +Received: from platypus.pepperfish.net (unknown [10.112.100.20]) + by bagpuss.pepperfish.net (Postfix) with ESMTP id EF5BE370B; + Mon, 15 Dec 2014 19:41:25 +0000 (GMT) +Received: from localhost ([::1] helo=platypus.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1Y0bWH-0004C8-Ro; Mon, 15 Dec 2014 19:41:25 +0000 +Received: from inmail ([10.112.100.10] helo=mx0.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1Y0bWF-0004C0-OI + for <obnam-dev@obnam.org>; Mon, 15 Dec 2014 19:41:23 +0000 +Received: from xvm-166-37.ghst.net + ([95.142.166.37] helo=pieni.net ident=postfix) + by mx0.pepperfish.net with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) + (Exim 4.80) (envelope-from <liw@liw.fi>) id 1Y0bWD-00007r-B3 + for obnam-dev@obnam.org; Mon, 15 Dec 2014 19:41:23 +0000 +Received: from exolobe1.liw.fi (82-181-8-107.bb.dnainternet.fi [82.181.8.107]) + (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by pieni.net (Postfix) with ESMTPSA id D450A2020A; + Mon, 15 Dec 2014 20:41:19 +0100 (CET) +Received: from exolobe1.liw.fi (localhost [127.0.0.1]) + by exolobe1.liw.fi (Postfix) with ESMTPS id 31A3842AAA; + Mon, 15 Dec 2014 21:41:19 +0200 (EET) +Date: Mon, 15 Dec 2014 21:41:18 +0200 +From: Lars Wirzenius <liw@liw.fi> +To: Damien =?iso-8859-1?Q?Courouss=E9?= <damien.courousse@gmail.com> +Message-ID: <20141215194117.GI5037@exolobe1.liw.fi> +References: <5474F444.40901@gmail.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=iso-8859-1 +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +In-Reply-To: <5474F444.40901@gmail.com> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Spam-Score: -3.4 +X-Spam-Score-int: -33 +X-Spam-Bar: --- +X-Scanned-By: pepperfish.net, Mon, 15 Dec 2014 19:41:23 +0000 +X-Spam-Report: Content analysis details: (-3.4 points) + pts rule name description + ---- ---------------------- -------------------------------------------------- + -1.0 PPF_USER_AGENT_MUTT User-Agent: contains Mutt (Mutt isn't a spam + tool) -0.5 PPF_USER_AGENT User-Agent: exists + -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% + [score: 0.0000] +Cc: obnam-dev@obnam.org +Subject: Re: 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 + +Hi, Damien, + +Thank you for writing scenario tests for Obnam. Yarn is not well +documented. I should fix that, some day. + +On Tue, Nov 25, 2014 at 10:27:32PM +0100, Damien Couroussé wrote: +> 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 ? + +Yarn runs short shell scripts to perform each step in a scenario. That +shell script must succeed, i.e., it must exit with a zero exit code. +The script gets run under "set -e", meaning that an error will halt it +in the middle. This means that to perform a step in which obnam fails, +you need to write some shell that exits with zero even when obnam +fails, but captures the failure in a way that can be examined later. + +If you do this, you'll find a few examples of this: + + git grep '^ *IMPLEMENTS.*attempt' + +The yarns/obnam.sh file has a shell function, attempt, that helps +implement such steps. + +In other words, you'd write the failing steps something in the +following style: + + WHEN user U attempts to back up directory L to repository R + THEN the attempt failed + +Another note: it'd be really nice if the "disk full" error could be +simulated by Obnam (in the VFS code, somehow) without requiring to +actually mount disk images. This would make it easier to run the tests +in continuous integration systems that don't want to give much +priviledges to the code being tests. + +There's already options in Obnam to allow that kind of tests to work. +Adding a --simulate-repository-disk-is-full option would be worth +thinking about, I think. + +-- +http://gtdfh.branchable.com/ -- GTD for hackers +http://obnam.org/ -- HAVE YOU BACKED UP TODAY? + +_______________________________________________ +obnam-dev mailing list +obnam-dev@obnam.org +http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org diff --git a/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999004.M675256P17339Q145.exolobe1 b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999004.M675256P17339Q145.exolobe1 new file mode 100644 index 0000000..f24a207 --- /dev/null +++ b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999004.M675256P17339Q145.exolobe1 @@ -0,0 +1,121 @@ +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 A011321387 + for <distix@pieni.net>; Mon, 15 Dec 2014 20:41:26 +0100 (CET) +Received: from platypus.pepperfish.net (unknown [10.112.100.20]) + by bagpuss.pepperfish.net (Postfix) with ESMTP id EF5BE370B; + Mon, 15 Dec 2014 19:41:25 +0000 (GMT) +Received: from localhost ([::1] helo=platypus.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1Y0bWH-0004C8-Ro; Mon, 15 Dec 2014 19:41:25 +0000 +Received: from inmail ([10.112.100.10] helo=mx0.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1Y0bWF-0004C0-OI + for <obnam-dev@obnam.org>; Mon, 15 Dec 2014 19:41:23 +0000 +Received: from xvm-166-37.ghst.net + ([95.142.166.37] helo=pieni.net ident=postfix) + by mx0.pepperfish.net with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) + (Exim 4.80) (envelope-from <liw@liw.fi>) id 1Y0bWD-00007r-B3 + for obnam-dev@obnam.org; Mon, 15 Dec 2014 19:41:23 +0000 +Received: from exolobe1.liw.fi (82-181-8-107.bb.dnainternet.fi [82.181.8.107]) + (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) + (No client certificate requested) + by pieni.net (Postfix) with ESMTPSA id D450A2020A; + Mon, 15 Dec 2014 20:41:19 +0100 (CET) +Received: from exolobe1.liw.fi (localhost [127.0.0.1]) + by exolobe1.liw.fi (Postfix) with ESMTPS id 31A3842AAA; + Mon, 15 Dec 2014 21:41:19 +0200 (EET) +Date: Mon, 15 Dec 2014 21:41:18 +0200 +From: Lars Wirzenius <liw@liw.fi> +To: Damien =?iso-8859-1?Q?Courouss=E9?= <damien.courousse@gmail.com> +Message-ID: <20141215194117.GI5037@exolobe1.liw.fi> +References: <5474F444.40901@gmail.com> +MIME-Version: 1.0 +Content-Type: text/plain; charset=iso-8859-1 +Content-Disposition: inline +Content-Transfer-Encoding: 8bit +In-Reply-To: <5474F444.40901@gmail.com> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Spam-Score: -3.4 +X-Spam-Score-int: -33 +X-Spam-Bar: --- +X-Scanned-By: pepperfish.net, Mon, 15 Dec 2014 19:41:23 +0000 +X-Spam-Report: Content analysis details: (-3.4 points) + pts rule name description + ---- ---------------------- -------------------------------------------------- + -1.0 PPF_USER_AGENT_MUTT User-Agent: contains Mutt (Mutt isn't a spam + tool) -0.5 PPF_USER_AGENT User-Agent: exists + -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% + [score: 0.0000] +Cc: obnam-dev@obnam.org +Subject: Re: 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 + +Hi, Damien, + +Thank you for writing scenario tests for Obnam. Yarn is not well +documented. I should fix that, some day. + +On Tue, Nov 25, 2014 at 10:27:32PM +0100, Damien Couroussé wrote: +> 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 ? + +Yarn runs short shell scripts to perform each step in a scenario. That +shell script must succeed, i.e., it must exit with a zero exit code. +The script gets run under "set -e", meaning that an error will halt it +in the middle. This means that to perform a step in which obnam fails, +you need to write some shell that exits with zero even when obnam +fails, but captures the failure in a way that can be examined later. + +If you do this, you'll find a few examples of this: + + git grep '^ *IMPLEMENTS.*attempt' + +The yarns/obnam.sh file has a shell function, attempt, that helps +implement such steps. + +In other words, you'd write the failing steps something in the +following style: + + WHEN user U attempts to back up directory L to repository R + THEN the attempt failed + +Another note: it'd be really nice if the "disk full" error could be +simulated by Obnam (in the VFS code, somehow) without requiring to +actually mount disk images. This would make it easier to run the tests +in continuous integration systems that don't want to give much +priviledges to the code being tests. + +There's already options in Obnam to allow that kind of tests to work. +Adding a --simulate-repository-disk-is-full option would be worth +thinking about, I think. + +-- +http://gtdfh.branchable.com/ -- GTD for hackers +http://obnam.org/ -- HAVE YOU BACKED UP TODAY? + +_______________________________________________ +obnam-dev mailing list +obnam-dev@obnam.org +http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org diff --git a/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999006.M744282P17339Q170.exolobe1 b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999006.M744282P17339Q170.exolobe1 new file mode 100644 index 0000000..37dbd20 --- /dev/null +++ b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999006.M744282P17339Q170.exolobe1 @@ -0,0 +1,175 @@ +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 8FCE320F11 + for <distix@pieni.net>; Mon, 15 Dec 2014 22:17:14 +0100 (CET) +Received: from platypus.pepperfish.net (unknown [10.112.100.20]) + by bagpuss.pepperfish.net (Postfix) with ESMTP id E56EE29E0; + Mon, 15 Dec 2014 21:17:13 +0000 (GMT) +Received: from localhost ([::1] helo=platypus.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1Y0d0z-0001yE-R9; Mon, 15 Dec 2014 21:17:13 +0000 +Received: from inmail ([10.112.100.10] helo=mx0.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1Y0d0y-0001y8-K4 + for <obnam-dev@obnam.org>; Mon, 15 Dec 2014 21:17:12 +0000 +Received: from mail-wg0-f50.google.com ([74.125.82.50]) + by mx0.pepperfish.net with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:128) + (Exim 4.80) (envelope-from <damien.courousse@gmail.com>) + id 1Y0d0w-0002vW-Cb + for obnam-dev@obnam.org; Mon, 15 Dec 2014 21:17:12 +0000 +Received: by mail-wg0-f50.google.com with SMTP id a1so15862848wgh.9 + for <obnam-dev@obnam.org>; Mon, 15 Dec 2014 13:17:04 -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:cc:subject + :references:in-reply-to:content-type:content-transfer-encoding; + bh=Sh3xjeiiX9865GuCOXIftn3ADbD8w2u5jsE0fBZWImc=; + b=EBeQN1KNDnOp4SPvAj/bBM321Df6jnqANdqcNqq1LTBSp/DRa0GkAuEbCRYjAJSLSd + r96ybDyWiwKpkT49UriN2jam+lV7yj67kEaigwiGRpB8iuFaSo+M+rKt1vLcqBAWFpne + QCwlfnPWuTf53LZKY/6yaSR80nQPU1hJKrDiE1zdDpN5elXdj8xjieMA9HmjjhynJDRL + Y+yFH9orsFfjayE9s6aroPELEh1tB+kI1OBD0h8QkmqivRCqDhxuqrkrNPZGO+vp8UHr + V5/tbQmzv+c49xW0BZXjC0Ixd2SWneS9uoPcIHNMox5YaqCwd4IgHgtLJerSedbt1c7D + A8gA== +X-Received: by 10.194.79.199 with SMTP id l7mr56415072wjx.136.1418678224784; + Mon, 15 Dec 2014 13:17:04 -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 ck7sm14447325wjb.13.2014.12.15.13.17.03 + for <multiple recipients> + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Mon, 15 Dec 2014 13:17:03 -0800 (PST) +Message-ID: <548F4FCE.6000504@gmail.com> +Date: Mon, 15 Dec 2014 22:17:02 +0100 +From: =?windows-1252?Q?Damien_Courouss=E9?= <damien.courousse@gmail.com> +User-Agent: Mozilla/5.0 (X11; Linux x86_64; + rv:31.0) Gecko/20100101 Icedove/31.3.0 +MIME-Version: 1.0 +To: Lars Wirzenius <liw@liw.fi> +References: <5474F444.40901@gmail.com> <20141215194117.GI5037@exolobe1.liw.fi> +In-Reply-To: <20141215194117.GI5037@exolobe1.liw.fi> +Content-Type: text/plain; charset=windows-1252 +Content-Transfer-Encoding: 8bit +X-Spam-Score: -0.6 +X-Spam-Score-int: -5 +X-Spam-Bar: / +X-Scanned-By: pepperfish.net, Mon, 15 Dec 2014 21:17:12 +0000 +X-Spam-Report: Content analysis details: (-0.6 points) + pts rule name description + ---- ---------------------- -------------------------------------------------- + 0.4 PPF_WINDOWS_CHARSET Content-Type is in a Windows-* charset + -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.50 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 +Cc: obnam-dev@obnam.org +Subject: Re: 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 + +Hi Lars, + +Le 15/12/2014 20:41, Lars Wirzenius a écrit : +> Hi, Damien, +> +> Thank you for writing scenario tests for Obnam. Yarn is not well +> documented. I should fix that, some day. +> +> On Tue, Nov 25, 2014 at 10:27:32PM +0100, Damien Couroussé wrote: +>> 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 ? +> +> Yarn runs short shell scripts to perform each step in a scenario. That +> shell script must succeed, i.e., it must exit with a zero exit code. +> The script gets run under "set -e", meaning that an error will halt it +> in the middle. This means that to perform a step in which obnam fails, +> you need to write some shell that exits with zero even when obnam +> fails, but captures the failure in a way that can be examined later. + +I found a workaround to test errors. It is rather ad hoc and looks like: + +===== yarns/obnam.sh ===== +fail_obnam() +{ + run_obnam() + if [ $? -eq 0 ]; then + exit 1 + else + exit 0 + fi +} + + +===== yarns/9000-implements.yarn ===== +This backup is expected to fail. + + IMPLEMENTS THEN user (\S+) fails the backup of directory (\S+) to +repository (\S+) + fail_obnam "$MATCH_1" backup -r "$DATADIR/$MATCH_3" "$DATADIR/$MATCH_2" + + +> +> If you do this, you'll find a few examples of this: +> +> git grep '^ *IMPLEMENTS.*attempt' +> +> The yarns/obnam.sh file has a shell function, attempt, that helps +> implement such steps. +> +> In other words, you'd write the failing steps something in the +> following style: +> +> WHEN user U attempts to back up directory L to repository R +> THEN the attempt failed + +I will have a look. + +> +> Another note: it'd be really nice if the "disk full" error could be +> simulated by Obnam (in the VFS code, somehow) without requiring to +> actually mount disk images. This would make it easier to run the tests +> in continuous integration systems that don't want to give much +> priviledges to the code being tests. +> +> There's already options in Obnam to allow that kind of tests to work. +> Adding a --simulate-repository-disk-is-full option would be worth +> thinking about, I think. +> + +Will also have a look. + +regards, +Damien + +_______________________________________________ +obnam-dev mailing list +obnam-dev@obnam.org +http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/obnam-dev-obnam.org diff --git a/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999011.M209315P17339Q228.exolobe1 b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999011.M209315P17339Q228.exolobe1 new file mode 100644 index 0000000..94603c2 --- /dev/null +++ b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/new/1455999011.M209315P17339Q228.exolobe1 @@ -0,0 +1,254 @@ +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 DF6ED201AC + for <distix@pieni.net>; Tue, 25 Nov 2014 22:27:43 +0100 (CET) +Received: from platypus.pepperfish.net (unknown [10.112.100.20]) + by bagpuss.pepperfish.net (Postfix) with ESMTP id A1916394A; + Tue, 25 Nov 2014 21:27:43 +0000 (GMT) +Received: from localhost ([::1] helo=platypus.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1XtNeB-0000j5-HG; Tue, 25 Nov 2014 21:27:43 +0000 +Received: from inmail ([10.112.100.10] helo=mx0.pepperfish.net) + by platypus.pepperfish.net with esmtp (Exim 4.80 #2 (Debian)) + id 1XtNeA-0000iz-V3 + for <obnam-dev@obnam.org>; Tue, 25 Nov 2014 21:27:42 +0000 +Received: from mail-wi0-f174.google.com ([209.85.212.174]) + by mx0.pepperfish.net with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:128) + (Exim 4.80) (envelope-from <damien.courousse@gmail.com>) + id 1XtNe8-0001Qq-Pj + for obnam-dev@obnam.org; Tue, 25 Nov 2014 21:27:42 +0000 +Received: by mail-wi0-f174.google.com with SMTP id h11so10509102wiw.13 + for <obnam-dev@obnam.org>; Tue, 25 Nov 2014 13:27:34 -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 + :content-type; bh=A/p5yZiCJWD5endRzmCIq9rPQD0+bMAmyl8E707I4hc=; + b=ky6W2bFTeec2D6nYfv/WWxmTrybUQB3I2JOWNHulQCg6AaSCYKlpSICwGC70Xwd0It + HhuU3LLTwAMesA9ucT/RdTlwhvOV29KMeUmu9oVLMDwhYjB6rA4lsnww8IaHeW+PdFog + U2GaH8D7OcE4GFL8iZyQGjbzo+M+98KPjJwvuxrCQ4XpmqGU3RLL4i23p20Hf2a2aIr+ + tqeufLWu38/6lOMH2umft7eIdgjt9k+2N6B4PnrshJvD5p+52ittKG5fgFBjxDt1/ojG + Q7nWwiZgVH7Erj3aMJZ4tt8s88ZaMcy1OorRKlPlLzAvhtWxiQG0GnDEpAotNhEC1G/h + dzaQ== +X-Received: by 10.181.13.7 with SMTP id eu7mr20584706wid.72.1416950854061; + Tue, 25 Nov 2014 13:27:34 -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 h8sm4486314wiy.17.2014.11.25.13.27.32 + for <obnam-dev@obnam.org> + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Tue, 25 Nov 2014 13:27:33 -0800 (PST) +Message-ID: <5474F444.40901@gmail.com> +Date: Tue, 25 Nov 2014 22:27:32 +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 +Content-Type: multipart/mixed; boundary="------------070205040009090603040709" +X-Spam-Score: -1.0 +X-Spam-Score-int: -9 +X-Spam-Bar: - +X-Scanned-By: pepperfish.net, Tue, 25 Nov 2014 21:27:42 +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.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 + -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low + trust [209.85.212.174 listed in list.dnswl.org] +Subject: 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. +--------------070205040009090603040709 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 7bit + +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/ + + + + + +--------------070205040009090603040709 +Content-Type: text/x-patch; + name="0001-wip.patch" +Content-Transfer-Encoding: 7bit +Content-Disposition: attachment; + filename="0001-wip.patch" + +diff --git a/yarns/0030-basics.yarn b/yarns/0030-basics.yarn +index 4bc8439..605671c 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: creer 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" + +--------------070205040009090603040709 +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 + +--------------070205040009090603040709-- + diff --git a/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/tmp/.this-dir-not-empty/.empty/empty-file b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/tmp/.this-dir-not-empty/.empty/empty-file new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/Maildir/tmp/.this-dir-not-empty/.empty/empty-file diff --git a/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/ticket.yaml b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/ticket.yaml new file mode 100644 index 0000000..e7a719a --- /dev/null +++ b/tickets/8fa3d6533bd94dc2864051eb32b5c8ba/ticket.yaml @@ -0,0 +1,4 @@ +ticket-id: +- 8fa3d6533bd94dc2864051eb32b5c8ba +title: +- 'Re: how to test failure with yarn?' |