Created
February 10, 2015 15:08
-
-
Save minad/f177075ab38d29dbdf57 to your computer and use it in GitHub Desktop.
9ptest.sh for smoothieboard
This file contains hidden or 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
#!/bin/bash | |
mkdir -p /mnt/smoothie | |
echo -n "rename test subdirectory" | |
for ((i=0;i<3;++i)); do | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
for ((j=0;j<3;++j)); do | |
touch /mnt/smoothie/sd/test-file | |
mkdir /mnt/smoothie/sd/test-dir | |
mv /mnt/smoothie/sd/test-file /mnt/smoothie/sd/test-dir/test | |
rm /mnt/smoothie/sd/test-dir/test | |
rmdir /mnt/smoothie/sd/test-dir | |
done | |
umount /mnt/smoothie | |
echo -n "." | |
done | |
rmdir /mnt/smoothie | |
echo | |
mkdir -p /mnt/smoothie | |
echo -n "rename test" | |
for ((i=0;i<3;++i)); do | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
for ((j=0;j<3;++j)); do | |
touch /mnt/smoothie/sd/test-file | |
mv /mnt/smoothie/sd/test-file /mnt/smoothie/sd/test-file2 | |
rm /mnt/smoothie/sd/test-file2 | |
done | |
umount /mnt/smoothie | |
echo -n "." | |
done | |
rmdir /mnt/smoothie | |
echo | |
mkdir -p /mnt/smoothie | |
echo -n "copy with cat test" | |
for ((i=0;i<3;++i)); do | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
for ((j=0;j<3;++j)); do | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 2000 > /tmp/test-file | |
#echo "hello world" > /tmp/test-file | |
cat /tmp/test-file > /mnt/smoothie/sd/test-file | |
diff /tmp/test-file /mnt/smoothie/sd/test-file | |
umount /mnt/smoothie | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
diff /tmp/test-file /mnt/smoothie/sd/test-file | |
rm /tmp/test-file /mnt/smoothie/sd/test-file | |
done | |
umount /mnt/smoothie | |
echo -n "." | |
done | |
rmdir /mnt/smoothie | |
echo | |
mkdir -p /mnt/smoothie | |
echo -n "copy test" | |
for ((i=0;i<3;++i)); do | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
for ((j=0;j<3;++j)); do | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 2000 > /tmp/test-file | |
#echo "hello world" > /tmp/test-file | |
cp /tmp/test-file /mnt/smoothie/sd | |
diff /tmp/test-file /mnt/smoothie/sd/test-file | |
umount /mnt/smoothie | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
diff /tmp/test-file /mnt/smoothie/sd/test-file | |
rm /tmp/test-file /mnt/smoothie/sd/test-file | |
done | |
umount /mnt/smoothie | |
echo -n "." | |
done | |
rmdir /mnt/smoothie | |
echo | |
mkdir -p /mnt/smoothie | |
echo -n "touch test" | |
for ((i=0;i<3;++i)); do | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
for ((j=0;j<3;++j)); do | |
touch /mnt/smoothie/sd/test-file | |
ls -lah /mnt/smoothie/sd | |
rm /mnt/smoothie/sd/test-file | |
done | |
umount /mnt/smoothie | |
echo -n "." | |
done | |
rmdir /mnt/smoothie | |
echo | |
mkdir -p /mnt/smoothie | |
echo -n "mkdir test" | |
for ((i=0;i<3;++i)); do | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
for ((j=0;j<3;++j)); do | |
mkdir /mnt/smoothie/sd/test-dir | |
mkdir /mnt/smoothie/sd/test-dir/test2 | |
mkdir /mnt/smoothie/sd/test-dir/test3 | |
mkdir /mnt/smoothie/sd/config/test | |
#ls -lah /mnt/smoothie/sd | |
rmdir /mnt/smoothie/sd/test-dir/test2 | |
rmdir /mnt/smoothie/sd/test-dir/test3 | |
rmdir /mnt/smoothie/sd/test-dir | |
done | |
umount /mnt/smoothie | |
echo -n "." | |
done | |
rmdir /mnt/smoothie | |
echo | |
mkdir -p /mnt/smoothie | |
echo -n "cat test" | |
for ((i=0;i<3;++i)); do | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
for ((j=0;j<3;++j)); do | |
cat /mnt/smoothie/sd/config > /dev/null | |
cat /mnt/smoothie/sd/config-override > /dev/null | |
cat /mnt/smoothie/sd/not-existing/123/456 > /dev/null | |
cat /mnt/smoothie/sd/not-existing/123 > /dev/null | |
cat /mnt/smoothie/sd/not-existing > /dev/null | |
cat /mnt/smoothie/sd/config/not-existing > /dev/null | |
done | |
umount /mnt/smoothie | |
echo -n "." | |
done | |
rmdir /mnt/smoothie | |
echo | |
mkdir -p /mnt/smoothie | |
echo -n "Mount test" | |
for ((i=0;i<3;++i)); do | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
umount /mnt/smoothie | |
echo -n "." | |
done | |
rmdir /mnt/smoothie | |
echo | |
mkdir -p /mnt/smoothie | |
echo -n "LS test" | |
for ((i=0;i<3;++i)); do | |
mount -t 9p -o debug=0x204 192.168.1.6 /mnt/smoothie | |
for ((j=0;j<3;++j)); do | |
ls -lah /mnt/smoothie > /dev/null | |
ls -lah /mnt/smoothie/not-existing > /dev/null | |
ls -lah /mnt/smoothie/sd/config/not-existing > /dev/null | |
ls -lah /mnt/smoothie/sd/not-existing > /dev/null | |
ls -lah /mnt/smoothie/sd > /dev/null | |
ls -lah /mnt/smoothie/sd/* > /dev/null | |
#ls -lah /mnt/smoothie/sd/*/* > /dev/null | |
done | |
umount /mnt/smoothie | |
echo -n "." | |
done | |
rmdir /mnt/smoothie | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment