summaryrefslogtreecommitdiff
path: root/tests/xattrs.script
blob: c9959dabddce90e14389cbf7c16c429335b4375e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -eux

umask 0002
mkdir -m 0775 "$DATADIR/xattrs"
touch "$DATADIR/xattrs/file"
if setfattr -n user.foo -v "$(printf '\177')" "$DATADIR/xattrs/file" 2> /dev/null &&
   setfattr -n user.empty -v '""' "$DATADIR/xattrs/file" 2> /dev/null
then
    ./summain --exclude=mtime --exclude=uid --exclude=username \
        --exclude=gid --exclude=group --exclude=ino --exclude=dev \
        --exclude=nlink --exclude=size --exclude=sha1 \
        --relative "$DATADIR/xattrs"
else
    # Fake results when xattrs not available.
    cat "$SRCDIR/tests/xattrs.stdout"
fi