PKUOS - Pintos
Pintos source browser for PKU Operating System course
Macros | Functions | Variables
syn-rw.c File Reference
#include <random.h>
#include <syscall.h>
#include "tests/filesys/extended/syn-rw.h"
#include "tests/lib.h"
#include "tests/main.h"
Include dependency graph for syn-rw.c:

Go to the source code of this file.

Macros

#define CHILD_CNT   4
 

Functions

void test_main (void)
 tests/main.h More...
 

Variables

char buf [BUF_SIZE]
 Grows a file in chunks while subprocesses read the growing file. More...
 

Macro Definition Documentation

◆ CHILD_CNT

#define CHILD_CNT   4

Definition at line 12 of file syn-rw.c.

Function Documentation

◆ test_main()

void test_main ( void  )

tests/main.h

tests/main.h

tests/main.h

This must fail, because that directory is non-empty.

tests/main.h

This must fail.

tests/main.h

Then delete most of them, for two reasons. First, "tar" limits file names to 100 characters (which could be extended to 256 without much trouble). Second, a full disk has no room for the tar archive.

Definition at line 15 of file syn-rw.c.

References buf, BUF_SIZE, CHECK, CHILD_CNT, CHUNK_SIZE, create(), exec_children(), file_name, open(), quiet, random_bytes(), wait_children(), and write().

Here is the call graph for this function:

Variable Documentation

◆ buf

char buf[BUF_SIZE]

Grows a file in chunks while subprocesses read the growing file.

Definition at line 10 of file syn-rw.c.

Referenced by test_main().