Commit 0c7fdf70 authored by Wayne Davison's avatar Wayne Davison

Add solaris xattr support to the tests.

Change the xattr case statements to use $HOST_OS.
(Slightly tweaked version of a Ben Walton patch.)
parent 439d5d89
......@@ -18,14 +18,25 @@ case $0 in
$RSYNC --version | grep ", xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests"
RSYNC="$RSYNC --fake-super"
TLS_ARGS="$TLS_ARGS --fake-super"
case "`xattr 2>&1 || true`" in
*--list:*)
case "$HOST_OS" in
darwin*)
chown() {
own=$1
shift
xattr -s 'rsync.%stat' "100644 0,0 $own" "${@}"
}
;;
solaris*)
chown() {
own=$1
shift
for fn in "${@}"; do
runat "$fn" "$SHELL_PATH" <<EOF
echo "100644 0,0 $own" > rsync.%stat
EOF
done
}
;;
*)
chown() {
own=$1
......
......@@ -19,8 +19,8 @@ case $0 in
$RSYNC --version | grep ", xattrs" >/dev/null || test_skipped "Rsync needs xattrs for fake device tests"
RSYNC="$RSYNC --fake-super"
TLS_ARGS="$TLS_ARGS --fake-super"
case "`xattr 2>&1 || true`" in
*--list:*)
case "$HOST_OS" in
darwin*)
mknod() {
fn="$1"
case "$2" in
......@@ -34,6 +34,22 @@ case $0 in
xattr -s 'rsync.%stat' "$mode $maj,$min 0:0" "$fn"
}
;;
solaris*)
mknod() {
fn="$1"
case "$2" in
p) mode=10644 ;;
c) mode=20644 ;;
b) mode=60644 ;;
esac
maj="${3:-0}"
min="${4:-0}"
touch "$fn"
runat "$fn" "$SHELL_PATH" <<EOF
echo "$mode $maj,$min 0:0" > rsync.%stat
EOF
}
;;
*)
mknod() {
fn="$1"
......
......@@ -10,8 +10,8 @@ lnkdir="$tmpdir/lnk"
$RSYNC --version | grep ", xattrs" >/dev/null || test_skipped "Rsync is configured without xattr support"
case "`xattr 2>&1 || true`" in
*--list:*)
case "$HOST_OS" in
darwin*)
xset() {
xnam="$1"
xval="$2"
......@@ -24,6 +24,27 @@ case "`xattr 2>&1 || true`" in
RSYNC_PREFIX='rsync'
RUSR='rsync.nonuser'
;;
solaris*)
xset() {
xnam="$1"
xval="$2"
shift 2
for fn in "${@}"; do
runat "$fn" "$SHELL_PATH" <<EOF
echo "${xval}" > "${xnam}"
EOF
done
}
xls() {
for fn in "${@}"; do
runat "$fn" "$SHELL_PATH" <<EOF
for x in *; do echo "\$x=\`cat \$x\`"; done
EOF
done
}
RSYNC_PREFIX='rsync'
RUSR='rsync.nonuser'
;;
*)
xset() {
xnam="$1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment