File: fsync.sh

package info (click to toggle)
unionfs 1.4%2Bdebian-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 924 kB
  • ctags: 929
  • sloc: ansic: 9,905; sh: 2,787; makefile: 253; perl: 200
file content (34 lines) | stat: -rw-r--r-- 476 bytes parent folder | download
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
29
30
31
32
33
34
#!/bin/sh
# TEST: Branches: b0,b1=ro and b0,b1
# TEST: flock(F_WRLCK) a file on b1

source scaffold

function files {
cat <<FILES
d $LOWER_DIR
d $LOWER_DIR/b0
d $LOWER_DIR/b1
f $LOWER_DIR/b0/a
FILES
}

function rw {
	( files ) | create_hierarchy
	mount_union "" $LOWER_DIR/b0 $LOWER_DIR/b1
	./progs/fsync $MOUNTPOINT/a
	unmount_union
	( files ) | check_hierarchy $LOWER_DIR
}

if [ -z "$FXNS" ] ; then
	FXNS="rw"
fi

for x in $FXNS
do
	$x
	echo -n "[$x] "
done

complete_test