}
rm -f $PREFIX/largefile
-dd if=/dev/zero of=$PREFIX/largefile seek=$((20 * 1024 * 1024)) count=1 bs=1
+LD_PRELOAD='' dd if=/dev/zero of=$PREFIX/largefile seek=$((20 * 1024 * 1024)) count=1 bs=1
incdir=$(dirname $0)/../../../testprogs/blackbox
. $incdir/subunit.sh
if have_command "od"; then # Use random file sizes
local RND_COUNT
for RND_COUNT in $(od -An -N$NUM_FILES -tu1 </dev/urandom); do
- if ! dd if=/dev/urandom of="$DIR/file.$I" bs=$BS count=$RND_COUNT >/dev/null 2>&1; then
+ if ! LD_PRELOAD='' dd if=/dev/urandom of="$DIR/file.$I" bs=$BS count=$RND_COUNT >/dev/null 2>&1; then
echo "Couldn't create test file '$DIR/file.$I' (random size)"
false
return
done
else # Fallback to same file sizes
while [ $I -le $NUM_FILES ]; do
- if ! dd if=/dev/urandom of="$DIR/file.$I" bs=$BS count=$NORND_COUNT >/dev/null 2>&1; then
+ if ! LD_PRELOAD='' dd if=/dev/urandom of="$DIR/file.$I" bs=$BS count=$NORND_COUNT >/dev/null 2>&1; then
echo "Couldn't create test file '$DIR/file.$I' (static size)"
false
return
create_test_data()
{
pushd $WORKDIR
- dd if=/dev/urandom bs=1024 count=128 of=testfile
+ # Do not preload anything for dd
+ LD_PRELOAD='' dd if=/dev/urandom bs=1024 count=128 of=testfile
chmod 644 testfile
mkdir dir1
- dd if=/dev/urandom bs=1024 count=128 of=dir1/testfile1
+ LD_PRELOAD='' dd if=/dev/urandom bs=1024 count=128 of=dir1/testfile1
mkdir dir2
- dd if=/dev/urandom bs=1024 count=128 of=dir2/testfile2
+ LD_PRELOAD='' dd if=/dev/urandom bs=1024 count=128 of=dir2/testfile2
popd
}
test_resume_modified()
{
clear_download_area
- dd if=/dev/urandom bs=1024 count=2 of=testfile
+ # Do not preload anything for dd
+ LD_PRELOAD='' dd if=/dev/urandom bs=1024 count=2 of=testfile
$SMBGET --verbose --resume -U${SERVER}/${USERNAME}%$PASSWORD smb://$SERVER_IP/smbget/testfile
if [ $? -ne 1 ]; then
echo 'ERROR: RC does not match, expected: 1'
mkdir -p $TESTDIR
chmod 777 p $TESTDIR
-dd if=/dev/urandom of=$TESTDIR/testfile bs=1024 count=128
+# Do not preload anything for dd
+LD_PRELOAD='' dd if=/dev/urandom of=$TESTDIR/testfile bs=1024 count=128
chmod 777 $TESTDIR/testfile
alloc_kb=$(du -k $TESTDIR/testfile | sed -e 's/\t.*//')
{
rm -f "${PREFIX}/zero_read_testfile"
rm -f "${PREFIX}/zero_read_testfile_get"
- dd if=/dev/zero of="${PREFIX}/zero_read_testfile" bs=1024 count=1
+ LD_PRELOAD='' dd if=/dev/zero of="${PREFIX}/zero_read_testfile" bs=1024 count=1
global_inject_conf="$(dirname "${SERVERCONFFILE}")/global_inject.conf"
echo "smb2 max read = 0" >"$global_inject_conf"
${SMBCONTROL} ${CONF} smbd reload-config
destpath=${SELFTEST_TMPDIR}/$destfile
# Create a source file with arbitrary contents
-dd if=$DD of=$sourcepath bs=1024 count=50 >/dev/null
+LD_PRELOAD='' dd if=$DD of=$sourcepath bs=1024 count=50 >/dev/null
ls -l $sourcepath
exit 0
fi
-HOSTNAME=$(dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
+HOSTNAME=$(LD_PRELOAD='' dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
RUNDIR=$(pwd)
cd $BASEDIR
DC_PASSWORD=$3
BASEDIR=$4
-HOSTNAME=$(dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
+HOSTNAME=$(LD_PRELOAD='' dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
RUNDIR=$(pwd)
cd $BASEDIR
DC_PASSWORD=$3
BASEDIR=$4
-HOSTNAME=$(dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
+HOSTNAME=$(LD_PRELOAD='' dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
RUNDIR=$(pwd)
cd $BASEDIR
DC_PASSWORD=$3
BASEDIR=$4
-HOSTNAME=$(dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
+HOSTNAME=$(LD_PRELOAD='' dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
RUNDIR=$(pwd)
cd $BASEDIR
DC_PASSWORD=$3
BASEDIR=$4
-HOSTNAME=$(dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
+HOSTNAME=$(LD_PRELOAD='' dd if=/dev/urandom bs=1 count=32 2>/dev/null | sha1sum | cut -b 1-10)
RUNDIR=$(pwd)
cd $BASEDIR