#!/bin/sh
# Copyright 2008 by Denys Vlasenko
-# Licensed under GPL v2, see file LICENSE for details.
+# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
+umask 022
+
# ls -ln shows date. Need to remove that, it's variable.
# sed: coalesce spaces
# cut: remove date
# chown on a link was affecting file, dropping its suid/sgid bits
rm -rf cpio.testdir
-optional FEATURE_CPIO_O
+optional FEATURE_CPIO_O FEATURE_STAT_FORMAT
mkdir cpio.testdir
touch cpio.testdir/file
chmod 6755 cpio.testdir/file # sets suid/sgid bits
" "" ""
SKIP=
+# avoid 'not created: newer or same age file exists' message for directories
+rm -rf cpio.testdir cpio.testdir2 2>/dev/null
+mkdir cpio.testdir
+testing "cpio extracts in existing directory" \
+"$ECHO -ne '$hexdump' | bzcat | cpio -id 2>&1; echo \$?" \
+"\
+1 blocks
+0
+" "" ""
+SKIP=
# Clean up
rm -rf cpio.testdir cpio.testdir2 2>/dev/null