CS318 - Pintos
Pintos source browser for JHU CS318 course
Functions
dir-vine.c File Reference
#include <string.h>
#include <stdio.h>
#include <syscall.h>
#include "tests/lib.h"
#include "tests/main.h"
Include dependency graph for dir-vine.c:

Go to the source code of this file.

Functions

void test_main (void)
 Create a very deep "vine" of directories: /dir0/dir1/dir2/... More...
 

Function Documentation

◆ test_main()

void test_main ( void  )

Create a very deep "vine" of directories: /dir0/dir1/dir2/...

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 17 of file dir-vine.c.

References chdir(), CHECK, close(), create(), file_name, mkdir(), msg(), name, open(), quiet, readdir(), READDIR_MAX_LEN, remove(), snprintf(), strcmp(), strlen(), and write().

Here is the call graph for this function: