Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Failed kyua tests with regular users

Received: by 10.204.129.15 with SMTP id m15mr248749bks.2.1331131404914;
        Wed, 07 Mar 2012 06:43:24 -0800 (PST)
X-BeenThere: kyua-discuss@googlegroups.com
Received: by 10.204.50.142 with SMTP id z14ls2359046bkf.3.gmail; Wed, 07 Mar
 2012 06:43:24 -0800 (PST)
Received: by 10.205.123.6 with SMTP id gi6mr247034bkc.5.1331131404157;
        Wed, 07 Mar 2012 06:43:24 -0800 (PST)
Received: by 10.205.123.6 with SMTP id gi6mr247033bkc.5.1331131404134;
        Wed, 07 Mar 2012 06:43:24 -0800 (PST)
Return-Path: <j...@julipedia.org>
Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54])
        by gmr-mx.google.com with ESMTPS id 20si26032072bko.3.2012.03.07.06.43.23
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 07 Mar 2012 06:43:23 -0800 (PST)
Received-SPF: neutral (google.com: 209.85.214.54 is neither permitted nor denied by best guess record for domain of j...@julipedia.org) client-ip=209.85.214.54;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.214.54 is neither permitted nor denied by best guess record for domain of j...@julipedia.org) smtp.mail=j...@julipedia.org
Received: by bkcjc3 with SMTP id jc3so9658729bkc.27
        for <kyua-discuss@googlegroups.com>; Wed, 07 Mar 2012 06:43:23 -0800 (PST)
Received: by 10.205.133.13 with SMTP id hw13mr994950bkc.25.1331131403662;
        Wed, 07 Mar 2012 06:43:23 -0800 (PST)
Return-Path: <j...@julipedia.org>
Received: from [172.16.158.79] ([172.16.158.79])
        by mx.google.com with ESMTPS id m3sm31036691bkz.0.2012.03.07.06.43.22
        (version=SSLv3 cipher=OTHER);
        Wed, 07 Mar 2012 06:43:22 -0800 (PST)
Message-ID: <4F577409.8070706@julipedia.org>
Date: Wed, 07 Mar 2012 14:43:21 +0000
From: Julio Merino <j...@julipedia.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
MIME-Version: 1.0
To: kyua-discuss@googlegroups.com
Subject: Re: Failed kyua tests with regular users
References: <8dbbc49f-aba8-478a-b72f-1ac4951da807@t15g2000yqi.googlegroups.com> <4F5765A4.70...@julipedia.org> <6188c02e-8775-4861-99dd-f679921eb...@t15g2000yqi.googlegroups.com> <4F576906.9050...@julipedia.org> <b42c91bd-bb31-4b13-b14c-4f57f8df9...@p12g2000yqe.googlegroups.com>
In-Reply-To: <b42c91bd-bb31-4b13-b14c-4f57f8df9...@p12g2000yqe.googlegroups.com>
Content-Type: multipart/mixed;
 boundary="------------080407000101090308040802"
X-Gm-Message-State: ALoCoQn+P/kq/+CBxd4nfXHfKOq+c1U7xkky+Nf4Q4WuM4nj8FxaxidCuq9qwxJCUeWJy/64+iOm

This is a multi-part message in MIME format.
--------------080407000101090308040802
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

On 3/7/12 2:06 PM, Juan RP wrote:
>
>
> On 7 mar, 14:56, Julio Merino<j...@julipedia.org>  wrote:
>> Yeah, a few more things please:
[...]
>> Also, please run this:
>>
>> kyua --logfile=some-name.log --loglevel=debug debug
>> utils/process/children_test:exec__relative_path
>
> Showing the last useful lines:
>
> 20120307-140149 W 728 utils/fs/operations.cpp:301: Failed to chmod '/
> tmp/kyua.drvg3i/run/root/helpers' to 448: Operation not permitted
[...]

Ah hah.  I haven't tried to reproduce it here yet, but I think I know 
why this happens.  Can you try with the attached patch please?

Also, are any of the tests under utils/fs failing?

--------------080407000101090308040802
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
 name="patch.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="patch.diff"

diff --git a/utils/fs/operations.cpp b/utils/fs/operations.cpp
index a4461c1..bdc23b9 100644
--- a/utils/fs/operations.cpp
+++ b/utils/fs/operations.cpp
@@ -356,7 +356,10 @@ recursive_cleanup(const fs::path& current_path, const struct ::stat& parent_sb)
 {
     bool ok = true;
 
-    ok &= try_unprotect(current_path);
+    // Weakening the protections of a file is just a best-effort operation.
+    // If this fails, we may still be able to do the file/directory removal
+    // later on, so ignore any failures from try_unprotect().
+    (void)try_unprotect(current_path);
 
     const optional< struct ::stat > current_sb = try_stat(current_path);
     if (!current_sb)

--------------080407000101090308040802--