1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: Use python single liner to generate data

This commit is contained in:
Marian Csontos 2020-05-06 12:10:50 +02:00
parent 70a45c44e8
commit b5811b7c9c
4 changed files with 20 additions and 12 deletions

View File

@ -22,9 +22,11 @@ mkdir -p $mnt
aux prepare_devs 6 64
for i in `seq 1 16384`; do echo -n "A" >> fileA; done
for i in `seq 1 16384`; do echo -n "B" >> fileB; done
for i in `seq 1 16384`; do echo -n "C" >> fileC; done
PYTHON="$(which python3 python2 python 2>/dev/null | head -n 1)"
test -n "$PYTHON" || skip
$PYTHON -c "print 'A'*16384" >> fileA
$PYTHON -c "print 'B'*16384" >> fileB
$PYTHON -c "print 'C'*16384" >> fileC
# generate random data
dd if=/dev/urandom of=randA bs=512K count=2

View File

@ -25,9 +25,11 @@ mkdir -p $mnt
# raid1 LV needs to be extended to 512MB to test imeta being exended
aux prepare_devs 4 600
for i in `seq 1 16384`; do echo -n "A" >> fileA; done
for i in `seq 1 16384`; do echo -n "B" >> fileB; done
for i in `seq 1 16384`; do echo -n "C" >> fileC; done
PYTHON="$(which python3 python2 python 2>/dev/null | head -n 1)"
test -n "$PYTHON" || skip
$PYTHON -c "print 'A'*16384" >> fileA
$PYTHON -c "print 'B'*16384" >> fileB
$PYTHON -c "print 'C'*16384" >> fileC
# generate random data
dd if=/dev/urandom of=randA bs=512K count=2

View File

@ -22,9 +22,11 @@ mkdir -p $mnt
aux prepare_devs 5 64
for i in `seq 1 16384`; do echo -n "A" >> fileA; done
for i in `seq 1 16384`; do echo -n "B" >> fileB; done
for i in `seq 1 16384`; do echo -n "C" >> fileC; done
PYTHON="$(which python3 python2 python 2>/dev/null | head -n 1)"
test -n "$PYTHON" || skip
$PYTHON -c "print 'A'*16384" >> fileA
$PYTHON -c "print 'B'*16384" >> fileB
$PYTHON -c "print 'C'*16384" >> fileC
# generate random data
dd if=/dev/urandom of=randA bs=512K count=2

View File

@ -23,9 +23,11 @@ mkdir -p $mnt
aux prepare_devs 5 64
for i in `seq 1 16384`; do echo -n "A" >> fileA; done
for i in `seq 1 16384`; do echo -n "B" >> fileB; done
for i in `seq 1 16384`; do echo -n "C" >> fileC; done
PYTHON="$(which python3 python2 python 2>/dev/null | head -n 1)"
test -n "$PYTHON" || skip
$PYTHON -c "print 'A'*16384" >> fileA
$PYTHON -c "print 'B'*16384" >> fileB
$PYTHON -c "print 'C'*16384" >> fileC
# generate random data
dd if=/dev/urandom of=randA bs=512K count=2