File: basic

package info (click to toggle)
ocfs2-tools 1.8.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,272 kB
  • sloc: ansic: 87,146; sh: 5,782; python: 2,380; makefile: 1,302
file content (28 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

set -e

DISK=$AUTOPKGTEST_TMP/disk

cleanup () {
  rm -f $DISK || true
}

trap "cleanup" 0 2 3 15

# create test disk
printf "\n=== disk ===\n"
dd if=/dev/zero of=$DISK bs=1M count=200 2>&1

# test tools
printf "\n=== mkfs ===\n"
if ! mkfs.ocfs2 --force --mount local --block-size 4096 $DISK 2>&1; then
  # skip the test if the open fails with invalid argument
  exit 77
fi

printf "\n=== fsck ===\n"
echo y | fsck.ocfs2 -f -y -F $DISK 2>&1

printf "\n=== debugfs ===\n"
debugfs.ocfs2 -R stats $DISK