CS318 - Pintos
Pintos source browser for JHU CS318 course
Functions | Variables
grow-tell.c File Reference
#include <syscall.h>
#include "tests/filesys/seq-test.h"
#include "tests/lib.h"
#include "tests/main.h"
Include dependency graph for grow-tell.c:

Go to the source code of this file.

Functions

static size_t return_block_size (void)
 
static void check_tell (int fd, long ofs)
 
void test_main (void)
 tests/main.h More...
 

Variables

static char buf [2134]
 Checks that growing a file updates the file position correctly. More...
 

Function Documentation

◆ check_tell()

static void check_tell ( int  fd,
long  ofs 
)
static

Definition at line 18 of file grow-tell.c.

References fail(), and tell().

Referenced by test_main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ return_block_size()

static size_t return_block_size ( void  )
static

Definition at line 12 of file grow-tell.c.

Referenced by test_main().

Here is the caller graph for this function:

◆ 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

and an ordinary file in each of them, until we fill up the disk.

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 27 of file grow-tell.c.

References buf, check_tell(), return_block_size(), and seq_test().

Here is the call graph for this function:

Variable Documentation

◆ buf

char buf[2134]
static

Checks that growing a file updates the file position correctly.

Definition at line 9 of file grow-tell.c.

Referenced by test_main().