• Home
  • Raw
  • Download

Lines Matching +full:ls +full:- +full:files

21 test -x "${SCRIPT_DIR}/fuse2fs" && HAS_FUSE2FS=1
25 echo "-b: FS block size is this. (${BLK_SZ})"
26 echo "-B: Corrupt this many bytes per run."
27 echo "-d: Create test files in this directory. (${DIR})"
28 echo "-E: Extended mke2fs options."
29 echo "-f: Do not run e2fsck after each pass."
30 echo "-F: Extended e2fsck options."
31 echo "-I: Create inodes of this size. (${INODE_SZ})"
32 echo "-n: Run this many passes. (${PASSES})"
33 echo "-O: Create FS with these features."
34 echo "-p: Use system's mke2fs/e2fsck/tune2fs tools."
35 echo "-s: Create FS images of this size. (${SZ})"
36 echo "-S: Copy files from this dir. (${SRCDIR})"
37 echo "-x: Run e2fsck at most this many times. (${MAX_FSCK})"
38 test "${HAS_FUSE2FS}" -gt 0 && echo "-u: Use fuse2fs instead of the kernel."
48 E2FUZZ_ARGS="${E2FUZZ_ARGS} -b ${OPTARG}"
72 EXTENDED_FSCK_OPTS="-E ${OPTARG}"
95 if [ "${OVERRIDE_PATH}" -gt 0 ]; then
122 rm -rf "${TESTDIR}"
123 rm -rf "${TESTMNT}"
124 mkdir -p "${TESTDIR}"
125 mkdir -p "${TESTMNT}"
126 rm -rf "${BASE_IMG}"
127 truncate -s "${SZ}" "${BASE_IMG}"
128 mke2fs -F -v "${BASE_IMG}"
129 if [ $? -ne 0 ]; then
136 mount "${BASE_IMG}" "${TESTMNT}" -o loop
137 if [ $? -ne 0 ]; then
140 SRC_SZ="$(du -ks "${SRCDIR}" | awk '{print $1}')"
141 FS_SZ="$(( $(stat -f "${TESTMNT}" -c '%a * %S') / 1024 ))"
143 if [ "${NR}" -lt 1 ]; then
148 cp -pRdu "${SRCDIR}" "${TESTMNT}/test.${nr}" 2> /dev/null
151 e2fsck -fn "${BASE_IMG}"
152 if [ $? -ne 0 ]; then
162 PASS_IMG="${TESTDIR}/e2fuzz-${pass}.img"
163 FSCK_IMG="${TESTDIR}/e2fuzz-${pass}.fsck"
164 FUZZ_LOG="${TESTDIR}/e2fuzz-${pass}.fuzz.log"
165 OPS_LOG="${TESTDIR}/e2fuzz-${pass}.ops.log"
169 if [ $? -ne 0 ]; then
172 tune2fs -L "e2fuzz-${pass}" "${PASS_IMG}"
173 e2fuzz -v "${PASS_IMG}" ${E2FUZZ_ARGS} > "${FUZZ_LOG}"
174 if [ $? -ne 0 ]; then
179 if [ "${USE_FUSE2FS}" -gt 0 ]; then
183 mount "${PASS_IMG}" "${TESTMNT}" -o loop
187 if [ "${res}" -eq 0 ]; then
188 echo "+++ ls -laR"
189 ls -laR "${TESTMNT}/test.1/" > /dev/null 2> "${OPS_LOG}"
191 echo "+++ cat files"
192 …find "${TESTMNT}/test.1/" -type f -size -1048576k -print0 | xargs -0 cat > /dev/null 2>> "${OPS_LO…
195 find "${TESTMNT}/" -type f 2> /dev/null | head -n 50000 | while read f; do
196 attr -l "$f" > /dev/null 2>> "${OPS_LOG}"
197 if [ -f "$f" -a -w "$f" ]; then
204 echo "+++ create files"
205 cp -pRdu "${SRCDIR}" "${TESTMNT}/test.moo" 2>> "${OPS_LOG}"
208 echo "+++ remove files"
209 rm -rf "${TESTMNT}/test.moo" 2>> "${OPS_LOG}"
213 if [ "${res}" -ne 0 ]; then
218 test "${USE_FUSE2FS}" -gt 0 && sleep 2
220 if [ "${RUN_FSCK}" -gt 0 ]; then
222 pass_img_sz="$(stat -c '%s' "${PASS_IMG}")"
225 echo "++ fsck pass ${fsck_pass}: $(which e2fsck) -fy ${FSCK_IMG} ${EXTENDED_FSCK_OPTS}"
226 FSCK_LOG="${TESTDIR}/e2fuzz-${pass}-${fsck_pass}.log"
227 e2fsck -fy "${FSCK_IMG}" ${EXTENDED_FSCK_OPTS} > "${FSCK_LOG}" 2>&1
230 if [ "${res}" -eq 0 ]; then
232 elif [ "${fsck_pass}" -eq "${MAX_FSCK}" ]; then
236 if [ "${res}" -gt 0 -a \
237 "$(grep 'Memory allocation failed' "${FSCK_LOG}" | wc -l)" -gt 0 ]; then
241 if [ "${res}" -gt 0 -a \
242 "$(grep 'Could not allocate block' "${FSCK_LOG}" | wc -l)" -gt 0 -a \
243 "$(dumpe2fs -h "${FSCK_IMG}" | grep '^Free blocks:' | awk '{print $3}')0" -eq 0 ]; then
247 if [ "${fsck_pass}" -gt 1 ]; then
248 diff -u "${TESTDIR}/e2fuzz-${pass}-$((fsck_pass - 1)).log" "${FSCK_LOG}"
249 if [ $? -eq 0 ]; then
255 fsck_img_sz="$(stat -c '%s' "${FSCK_IMG}")"
256 if [ "${fsck_img_sz}" -ne "${pass_img_sz}" ]; then
262 if [ "${fsck_loop_ret}" -gt 0 ]; then
268 FSCK_LOG="${TESTDIR}/e2fuzz-${pass}-round2.log"
269 e2fsck -fn "${FSCK_IMG}" ${EXTENDED_FSCK_OPTS} >> "${FSCK_LOG}" 2>&1
271 if [ "${res}" -ne 0 ]; then
277 mount "${FSCK_IMG}" "${TESTMNT}" -o loop
280 if [ "${res}" -eq 0 ]; then
281 echo "+++ ls -laR (2)"
282 ls -laR "${TESTMNT}/test.1/" > /dev/null 2> "${OPS_LOG}"
284 echo "+++ cat files (2)"
285 …find "${TESTMNT}/test.1/" -type f -size -1048576k -print0 | xargs -0 cat > /dev/null 2>> "${OPS_LO…
288 find "${TESTMNT}/" -type f 2> /dev/null | head -n 50000 | while read f; do
289 attr -l "$f" > /dev/null 2>> "${OPS_LOG}"
290 if [ -f "$f" -a -w "$f" ]; then
297 echo "+++ create files (2)"
298 cp -pRdu "${SRCDIR}" "${TESTMNT}/test.moo" 2>> "${OPS_LOG}"
301 echo "+++ remove files (2)"
302 rm -rf "${TESTMNT}/test.moo" 2>> "${OPS_LOG}"
306 if [ "${res}" -ne 0 ]; then
311 test "${USE_FUSE2FS}" -gt 0 && sleep 2
314 e2fsck -fn "${FSCK_IMG}" >> "${FSCK_LOG}" 2>&1
316 if [ "${res}" -ne 0 ]; then
324 rm -rf "${FSCK_IMG}" "${PASS_IMG}" "${FUZZ_LOG}" "${TESTDIR}"/e2fuzz*.log