• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if ! test -x $DEBUGFS_EXE; then
2	echo "$test_name: $test_description: skipped (no debugfs)"
3	return 0
4fi
5
6SKIP_GUNZIP="true"
7TEST_DATA="$test_name.tmp"
8
9echo "/ Murphy Magic.  The SeCrEt of the UnIvErSe is 43, NOT 42" > $TEST_DATA
10
11touch $TMPFILE
12$MKE2FS -N 32 -F -o Linux -b 1024 $TMPFILE 100 > /dev/null 2>&1
13$DEBUGFS -w $TMPFILE << EOF > /dev/null 2>&1
14set_current_time 20070410210000
15set_super_value lastcheck 0
16set_super_value hash_seed null
17set_super_value mkfs_time 0
18mkdir dir
19mkdir dir2
20mkdir dir3
21mkdir dir4
22cd /dir
23write $TEST_DATA foo
24cd /dir2
25write $TEST_DATA bar
26cd /dir3
27write $TEST_DATA baz
28cd /dir4
29write $TEST_DATA quux
30mkdir /dir/fee
31mkdir /dir2/fie
32mkdir /dir3/foe
33mkdir /dir4/fum
34link /dir/foo /dir2/foo1
35link /dir/foo /dir3/foo2
36link /dir2/bar /dir3/bar1
37link /dir4/quux /dir/quux1
38link /dir4/quux /dir2/quux2
39set_inode_field /dir/foo block[0] 30
40set_inode_field /dir2/bar block[0] 30
41set_inode_field /dir3/baz block[0] 30
42set_inode_field /dir/fee block[0] 34
43set_inode_field /dir2/fie block[0] 34
44set_inode_field /dir3/foe block[0] 34
45q
46EOF
47
48E2FSCK_TIME=200704102100
49export E2FSCK_TIME
50
51. $cmd_dir/run_e2fsck
52
53rm -f $TEST_DATA
54
55unset E2FSCK_TIME TEST_DATA
56