Cancelado

C programming

Deadline 24 hours

details below:

some of the test case just chose random 10 and do it

1. Initialize disk

1) delete simulated disk file "[url removed, login to view]"

2) run program "sfstest"

3) type command "i" -> "1"

2. Create file

1) (positive case)type command "m" -> "0" -> "/file1" -> success

2) (positive case)type command "m" -> "0" -> "/file2" -> success

3) (negative case)type command "m" -> "0" -> "/aaabbbccc" -> exceed maximal characters

4) (negative case)type command "m" -> "0" -> "aaa" -> error -> invalid path

3. Open file

1) (positive case)type command "o" -> "/file1" -> get file descriptor "0"

2) (positive case)type command "o" -> "/file2" -> get file descriptor "1"

3) (negative case)type command "o" -> "/abc" -> file not exist

4. Read/Write file

1) (positive case)type command "w" -> file descriptor "0" -> start location "-1" -> length "5" -> "12345" -> success

2) (positive case)type comamnd "r" -> file descriptor "0" -> start location "0" -> length "5" -> show "12345"

3) (positive case)type command "w" -> file descriptor "0" -> start location "2" -> length "2" -> "aa" -> success

4) (positive case)type comamnd "r" -> file descriptor "0" -> start location "0" -> length "5" -> show "12aa5"

5) (negative case)type command "w" -> file descriptor "0" -> start location "10" -> length "2" -> "aa" -> file is not long enough

5. Close file

1) (positive case)type command "c" -> get file descriptor "0" -> success

2) (negative case)type command "c" -> get file descriptor "5" -> invalid file descriptor

6. Delete file

1) (positive case)type command "d" -> "file1"-> success

2) (negative case)type command "d" -> "file2" -> file is in use

1. Create hierarchy directories and files as following structure

/

|---/dir1

|---/sub1

|---file1

|---file2

|---/dir2

|---file3

1) Create directory "/dir1"

2) Create directory "/dir2"

3) Create directory "/dir1/sub1"

4) Create regular file "/dir1/sub1/file1"

5) Create regular file "/dir1/file2"

6) Create regular file "/file3"

7) (negative case) type command "m" -> "/dir3/sub2" -> 1 -> give error msg

8) (negative case) type command "m" -> "/dir3/file4" -> 0 -> give error msg

2. Open directories and files

1) Open root directory: "o" -> "/" -> get file descriptor "0"

2) Open directory: "o" -> "/dir1" -> get file descriptor "1"

3) Open sub directory: "o" -> "/dir1/sub1" -> get file descriptor "2"

4) Open regular file: "o" -> "/dir1/sub1/file1" -> get file descriptor "3"

5) (negative case): "o" -> "/dir3" -> not exist

3. Read directory

1) Read root directory: "R" -> "0" -> display the first entry "dir1" -> "R" -> "0" -> display the second entry "dir2" -> "R" -> "0" -> display the third entry "file3"

2) Read directory "/dir1": "R" -> "1" -> display the first entry "sub1" -> "R" -> "1" -> display the second entry "file2" -> "R" -> "1" -> display no more entry

4. File type

1) Type of root directory: "t" -> "/" -> DIRECTORY

2) Type of regular file: "t" -> "/dir1/sub1/file1" -> REGULAR

3) (negative case): "t" -> "/dir1/file4" -> not exist

5 File size

1) Size of root directory: "s" -> "/" -> should be 3 in this case

2) Size of "/dir1": "s" -> "/dir1" -> should be 2 in this case

3) Size of regular file: "w" -> "3" -> "-1" -> "5" -> "12345" -> "w" -> "3" -> "-1" -> "2" -> "ab" -> "s" -> "/dir1/sub1/file1" -> should be 7

4) Repeat test 3) through overwriting some chars

5) (negative case) give a file not exist

6. Close and delete directory

1) (negative case): "d" -> "/dir1" -> give error of directory/file in use

2) (negative case): close all directory and files -> "d" -> "/dir1" -> give error of directory not empty

3) (positive case): "c" -> "3" -> "d" -> "/dir1/sub1/file1" -> "c" -> 2 -> "d" -> "/dir1/sub1" -> "d" -> "/dir1/file2" -> "c" -> "1" -> "d" -> "/dir1"

7. No data lost after restarting

1) create some files/directories; kill the file system program and restart it; files/directories still exist

8. All test cases listed in part 2 are also required in final evaluation.

Habilidades: Programação C

Ver mais: use data structure programming, programming structure, programming error, programming data structure, d programming, data structure programming, programming get, abc programming, abc data entry, abc 11, m ab, file2, ab test, test ab, programming r, kill random, c w, c r, c programming, create simulated file system, test cases system, msg files, command programming, part msg file, create file msg

Acerca do Empregador:
( 126 comentários ) Lahore, Pakistan

ID do Projeto: #6823163

3 freelancers estão ofertando em média $50 para este trabalho

Venky117

hi... i can do this. Please let me know to start immediately. i can deliver you on time. Please initiate communication to discuss further. thanks

$55 USD em 1 dia
(16 Comentários)
3.9
romanuwa

Hi, I am expert in C programming language and well experienced in Linux environment. I can do this task for you. Looking forward to hear from you. Thank you.

$55 USD em 1 dia
(9 Comentários)
3.5
Keshav4427

A proposal has not yet been provided

$40 USD in 2 dias
(2 Comentários)
0.8