Subject: bug#5945 closed by Pádraig Brady <[email-masked]> (Re: bug#5945: [PATCH] tests: avoid spurious failure of root-only ls/capability test)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 15 Apr 2010 23:52:02 +0000

This is an automatic notification regarding your bug report
which was filed against the coreutils package:

#5945: [PATCH] tests: avoid spurious failure of root-only ls/capability test

It has been closed by Pádraig Brady <[email-masked]>.

Their explanation is attached below along with your original report.
If this explanation is unsatisfactory and you have not received a
better one in a separate message then please contact Pádraig Brady <[email-masked]> by
replying to this email.

-- 
5945: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5945
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#5945: [PATCH] tests: avoid spurious failure of root-only ls/capability test
From: Pádraig Brady <[email-masked]>
To: [email-masked]
Date: Fri, 16 Apr 2010 00:51:12 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

On 14/04/10 15:37, Pádraig Brady wrote:
> On 14/04/10 14:52, Jim Meyering wrote:
>> tests: avoid spurious failure of root-only ls/capability test
> 
> Here's another ls test failure that happens on SELinux enabled systems.
> I'll push the following shortly.
> 
>>>From 2d9e9408f74f39f4c2817ea028a7a6ad64fb4b45 Mon Sep 17 00:00:00 2001
> From: =?utf-8?q?P=C3=A1draig=20Brady?= <[email-masked]>
> Date: Wed, 14 Apr 2010 15:32:27 +0100
> Subject: [PATCH] tests: avoid spurious failure of ls/color-norm test
> 
> * tests/ls/color-norm: Ensure that the file size is output
> consistently as 1 block.  Previously we used "empty" files which
> could have some space allocated depending on whether SELinux was
> enabled for example.

I actually pused a different method to fix ls/color-norm since
I was worried that a 1 byte file might not use extra
allocation on some file systems. Instead I output a specific
time string to test the normal style attribute.

http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=3a1595a3

I'm marking these ls test issues as done.

cheers,
Pádraig.

Subject: [PATCH] tests: avoid spurious failure of root-only ls/capability test
From: Jim Meyering <[email-masked]>
To: [email-masked]
Date: Wed, 14 Apr 2010 15:52:19 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hmm... you can tell I haven't been running the root-only tests
on capability-enabled systems.  This showed up as a root-only failure:

  $ sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER make -k check-root
  PASS: chown/basic
  ...
  PASS: install/install-C-root
  FAIL: ls/capability           <<<<==== oops
  PASS: ls/nameless-uid
  ...
  PASS: touch/now-owned-by-other

Here's the fix:

>From 05bee6f116d81084f5796b2ab1ec12135fb72fc2 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email-masked]>
Date: Wed, 14 Apr 2010 15:48:31 +0200
Subject: [PATCH] tests: avoid spurious failure of root-only ls/capability test

* tests/ls/capability: Adjust this test not to expect the no-op escape
sequence that was removed from all other tests by 2010-01-30 commit
5d43617e, "ls --color: don't emit a final no-op escape sequence".
---
 tests/ls/capability |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tests/ls/capability b/tests/ls/capability
index df91aa5..3997c73 100755
--- a/tests/ls/capability
+++ b/tests/ls/capability
@@ -59,7 +59,7 @@ for ex in '' ex=:; do
 dir:
 \e[${code}mcap_neg\e[0m
 cap_pos
-\e[m" > out_ok || framework_failure
+" > out_ok || framework_failure

   compare out out_ok || fail=1
 done
--
1.7.1.rc1.248.gcefbb