1*49cdfc7eSAndroid Build Coastguard WorkerThe ReadOnly Bind mount tests, uses the filesystems tests from 2*49cdfc7eSAndroid Build Coastguard Workerthe {LTPROOT}/testcases/kernel/fs . 3*49cdfc7eSAndroid Build Coastguard Worker 4*49cdfc7eSAndroid Build Coastguard WorkerEXECUTING TESTS 5*49cdfc7eSAndroid Build Coastguard Worker================== 6*49cdfc7eSAndroid Build Coastguard WorkerThe tests can be executed through runltp like: 7*49cdfc7eSAndroid Build Coastguard Worker 8*49cdfc7eSAndroid Build Coastguard Worker./runltp -f fs_readonly 9*49cdfc7eSAndroid Build Coastguard Worker 10*49cdfc7eSAndroid Build Coastguard WorkerFollowing tests are executed when the above is invoked: 11*49cdfc7eSAndroid Build Coastguard Worker 12*49cdfc7eSAndroid Build Coastguard WorkerIOGEN & DOIO 13*49cdfc7eSAndroid Build Coastguard Worker | 14*49cdfc7eSAndroid Build Coastguard Worker ----- iogen 15*49cdfc7eSAndroid Build Coastguard Worker | 16*49cdfc7eSAndroid Build Coastguard Worker ----- doio 17*49cdfc7eSAndroid Build Coastguard Worker | 18*49cdfc7eSAndroid Build Coastguard Worker ----- rwtest 19*49cdfc7eSAndroid Build Coastguard Worker | 20*49cdfc7eSAndroid Build Coastguard Worker ----- growfiles 21*49cdfc7eSAndroid Build Coastguard WorkerFS_INOD 22*49cdfc7eSAndroid Build Coastguard WorkerLINKTEST 23*49cdfc7eSAndroid Build Coastguard WorkerOPENFILE 24*49cdfc7eSAndroid Build Coastguard WorkerINODE 25*49cdfc7eSAndroid Build Coastguard WorkerSTREAM 26*49cdfc7eSAndroid Build Coastguard WorkerFTEST 27*49cdfc7eSAndroid Build Coastguard WorkerLFTEST 28*49cdfc7eSAndroid Build Coastguard WorkerWRITETEST. 29*49cdfc7eSAndroid Build Coastguard Worker 30*49cdfc7eSAndroid Build Coastguard WorkerIOGEN & DOIO 31*49cdfc7eSAndroid Build Coastguard Worker============= 32*49cdfc7eSAndroid Build Coastguard Worker 33*49cdfc7eSAndroid Build Coastguard Worker This is a pair of programs that does basic I/O operations on a set of files. 34*49cdfc7eSAndroid Build Coastguard WorkerThe file offset, I/O length, I/O operation, and what open(2) flags are 35*49cdfc7eSAndroid Build Coastguard Workerselected randomly from a pre-defined or commandline given set. All data 36*49cdfc7eSAndroid Build Coastguard Workerwritten can be verified (this is the usual method). 37*49cdfc7eSAndroid Build Coastguard Worker 38*49cdfc7eSAndroid Build Coastguard WorkerRWTest 39*49cdfc7eSAndroid Build Coastguard Worker----- 40*49cdfc7eSAndroid Build Coastguard Workerrwtest is a shell script that is a wrapper of iogen and doio. 41*49cdfc7eSAndroid Build Coastguard Worker 42*49cdfc7eSAndroid Build Coastguard WorkerGrowfiles 43*49cdfc7eSAndroid Build Coastguard Worker-------- 44*49cdfc7eSAndroid Build Coastguard WorkerGrowfiles will create and truncate files in gradual steps using write and lseek. 45*49cdfc7eSAndroid Build Coastguard WorkerThe system calls are checked for proper returns. 46*49cdfc7eSAndroid Build Coastguard Worker 47*49cdfc7eSAndroid Build Coastguard WorkerFS_INOD 48*49cdfc7eSAndroid Build Coastguard Worker============ 49*49cdfc7eSAndroid Build Coastguard Worker 50*49cdfc7eSAndroid Build Coastguard WorkerFile system stress - inode allocation/deallocation. 51*49cdfc7eSAndroid Build Coastguard WorkerRapidly creates and deletes files through multiple processes running in the 52*49cdfc7eSAndroid Build Coastguard Workerbackground. 53*49cdfc7eSAndroid Build Coastguard Worker 54*49cdfc7eSAndroid Build Coastguard Worker 55*49cdfc7eSAndroid Build Coastguard WorkerLINKTEST 56*49cdfc7eSAndroid Build Coastguard Worker=========== 57*49cdfc7eSAndroid Build Coastguard Worker 58*49cdfc7eSAndroid Build Coastguard WorkerLinktest.pl is a simple test that attempts to create a given number of hard 59*49cdfc7eSAndroid Build Coastguard Workerlinks and symbolic links to a single file. 60*49cdfc7eSAndroid Build Coastguard Worker 61*49cdfc7eSAndroid Build Coastguard Worker 62*49cdfc7eSAndroid Build Coastguard WorkerOPENFILE 63*49cdfc7eSAndroid Build Coastguard Worker=========== 64*49cdfc7eSAndroid Build Coastguard Worker 65*49cdfc7eSAndroid Build Coastguard WorkerCreate files and open simultaneously. 66*49cdfc7eSAndroid Build Coastguard Worker 67*49cdfc7eSAndroid Build Coastguard WorkerINODE 68*49cdfc7eSAndroid Build Coastguard Worker================== 69*49cdfc7eSAndroid Build Coastguard Worker 70*49cdfc7eSAndroid Build Coastguard WorkerDoes the File system managment and I/O functions work. 71*49cdfc7eSAndroid Build Coastguard WorkerThis Construct a directory tree, create files in it, and verify 72*49cdfc7eSAndroid Build Coastguard Workerthat this was done as expected. It uses the syscalls mkdir, stat, open 73*49cdfc7eSAndroid Build Coastguard Worker 74*49cdfc7eSAndroid Build Coastguard Worker 75*49cdfc7eSAndroid Build Coastguard WorkerSTREAM 76*49cdfc7eSAndroid Build Coastguard Worker============ 77*49cdfc7eSAndroid Build Coastguard Worker 78*49cdfc7eSAndroid Build Coastguard WorkerPerforms different tests on the stream syscalls. 79*49cdfc7eSAndroid Build Coastguard WorkerThis uses the syscalls freopen, fopen, mknod, ftell, fwrite, fread, ferror, 80*49cdfc7eSAndroid Build Coastguard Workerfeof, clearerr and fileno. 81*49cdfc7eSAndroid Build Coastguard Worker 82*49cdfc7eSAndroid Build Coastguard WorkerFTEST 83*49cdfc7eSAndroid Build Coastguard Worker========= 84*49cdfc7eSAndroid Build Coastguard WorkerTests the file I/O, Inodes. 85*49cdfc7eSAndroid Build Coastguard WorkerUses the syscalls 86*49cdfc7eSAndroid Build Coastguard Worker * lseek, read, write, truncate, ftruncate, fsync, sync, fstat 87*49cdfc7eSAndroid Build Coastguard Worker * open, close, unlink, chdir, readv, writev, lseek64, llseek 88*49cdfc7eSAndroid Build Coastguard Worker 89*49cdfc7eSAndroid Build Coastguard WorkerLFTEST 90*49cdfc7eSAndroid Build Coastguard Worker========== 91*49cdfc7eSAndroid Build Coastguard Worker 92*49cdfc7eSAndroid Build Coastguard WorkerUses the lseek64. 93*49cdfc7eSAndroid Build Coastguard WorkerThis writes one buffer at a time and lseeks from the beginning of the file to the 94*49cdfc7eSAndroid Build Coastguard Workerend of the last write position 95*49cdfc7eSAndroid Build Coastguard Worker 96*49cdfc7eSAndroid Build Coastguard Worker 97*49cdfc7eSAndroid Build Coastguard WorkerWRITETEST 98*49cdfc7eSAndroid Build Coastguard Worker============= 99*49cdfc7eSAndroid Build Coastguard Worker 100*49cdfc7eSAndroid Build Coastguard WorkerThis test verifies that writes to disk occur without corruption. 101*49cdfc7eSAndroid Build Coastguard WorkerOnce done , the file is re-opened, the random number generator 102*49cdfc7eSAndroid Build Coastguard Workeris re-seeded, and the file is verified. 103*49cdfc7eSAndroid Build Coastguard Worker 104*49cdfc7eSAndroid Build Coastguard WorkerIOCTL 105*49cdfc7eSAndroid Build Coastguard Worker======== 106*49cdfc7eSAndroid Build Coastguard Worker( Note: Writing the tests to include tests on the ioctl system calls.) 107*49cdfc7eSAndroid Build Coastguard Worker 108