forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request torvalds#212 from opurdila/lklfuse-tests
Disable multithreaded support in lklfuse
- Loading branch information
Showing
7 changed files
with
169 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/sh -e | ||
|
||
if ! [ -x ../lklfuse ]; then | ||
echo "lklfuse not available, skipping tests" | ||
exit 0 | ||
fi | ||
|
||
if ! [ -e /dev/fuse ]; then | ||
echo "fuse not available, skipping tests" | ||
exit 0 | ||
fi | ||
|
||
if [ "$1" = "-t" ]; then | ||
shift | ||
fstype=$1 | ||
shift | ||
fi | ||
|
||
if [ -z "$fstype" ]; then | ||
fstype="ext4" | ||
fi | ||
|
||
file=`mktemp` | ||
dir=`mktemp -d` | ||
|
||
cleanup() | ||
{ | ||
cd $olddir | ||
sleep 1 | ||
fusermount -u $dir | ||
rm $file | ||
rmdir $dir | ||
} | ||
|
||
basic() | ||
{ | ||
touch a | ||
if ! [ -e ]; then exit 1; fi | ||
rm a | ||
mkdir a | ||
if ! [ -d ]; then exit 1; fi | ||
rmdir a | ||
} | ||
|
||
trap cleanup EXIT | ||
|
||
olddir=`pwd` | ||
|
||
# create empty filesystem | ||
dd if=/dev/zero of=$file bs=1024 seek=500000 count=1 | ||
yes | mkfs.$fstype $file | ||
|
||
# mount with fuse | ||
../lklfuse $file $dir -o type=$fstype | ||
|
||
cd $dir | ||
|
||
# run basic tests | ||
basic | ||
|
||
# run stress-ng | ||
if which stress-ng; then | ||
if [ "$fstype" = "vfat" ]; then | ||
exclude="chmod,filename,link,mknod,symlink,xattr" | ||
fi | ||
stress-ng --class filesystem --all 0 --timeout 10 \ | ||
--exclude fiemap,$exclude --fallocate-bytes 50m \ | ||
--sync-file-bytes 50m | ||
else | ||
echo "could not find stress-ng, skipping" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters