Josh Kilmer writes: > On Tue, May 19, 2026 at 12:21 AM Janneke Nieuwenhuizen <[email protected]> > wrote: > [..] >> >> Find a patch attached. Indeed, get/list xattrs return r >=0 upon >> success; so !r should be changed to r >0 even. Please find a patch >> attached. >> > > Patch fixes it for me
Great, thanks! Attached is a patch to test the problem I found. Greetings, Janneke
>From 201a38e6f771801593613b18b44e367a5580b52c Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen <[email protected]> Date: Wed, 20 May 2026 06:42:54 +0200 Subject: [PATCH] test: Add t.xattr2: Does fakeroot setfattr user.* change the file-system? --- test/Makefile.am | 3 ++- test/t.xattr2 | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 test/t.xattr2 diff --git a/test/Makefile.am b/test/Makefile.am index 2445277..bdf9b4d 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -15,7 +15,8 @@ TESTS = \ t.tar \ t.touchinstall \ t.truereturn \ - t.xattr + t.xattr \ + t.xattr2 suffix = diff --git a/test/t.xattr2 b/test/t.xattr2 new file mode 100755 index 0000000..20076e5 --- /dev/null +++ b/test/t.xattr2 @@ -0,0 +1,29 @@ +#!/bin/sh +. ./defs || exit 1 + +# Skip the test if we can't find getfattr +PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin +getfattr --version 2>/dev/null +res=$? +test "$res" -le 1 || exit 77 + +mkdir $tmp +touch $tmp/foo +cat > $tmp/sh <<EOF +setfattr --name=user.test --value=test $tmp/foo +setfattr --name=gnu.translator --value=/hurd/pflocal $tmp/foo +EOF +run_fakeroot -- \ + ${posixshell} $tmp/sh >$tmp/set.out + +# Did fakeroot setfattr actually make it onto the file-system? +cat > $tmp/sh <<EOF +getfattr --name=user.test $tmp/foo +getfattr --name=gnu.translator $tmp/foo +EOF +run_fakeroot -- \ + ${posixshell} $tmp/sh >$tmp/get.out + +cat $tmp/get.out +grep '^user.test="test"' $tmp/get.out +grep '^gnu.translator="/hurd/pflocal"' $tmp/get.out -- 2.54.0
-- Janneke Nieuwenhuizen <[email protected]> | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

