PKUOS - Pintos
Pintos source browser for PKU Operating System course
Functions | Variables
stdio.c File Reference
#include <limits.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "threads/test.h"
Include dependency graph for stdio.c:

Go to the source code of this file.

Functions

static void checkf (const char *expect, const char *format,...)
 
void test (void)
 Test printf() implementation. More...
 

Variables

static int failure_cnt
 Test program for printf() in lib/stdio.c. More...
 

Function Documentation

◆ checkf()

static void checkf ( const char *  expect,
const char *  format,
  ... 
)
static

Definition at line 23 of file stdio.c.

References failure_cnt, printf(), strcmp(), va_end, va_start, and vsnprintf().

Referenced by test().

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

◆ test()

void test ( void  )

Test printf() implementation.

Definition at line 45 of file stdio.c.

References checkf(), failure_cnt, and printf().

Here is the call graph for this function:

Variable Documentation

◆ failure_cnt

int failure_cnt
static

Test program for printf() in lib/stdio.c.

Attempts to test printf() functionality that is not sufficiently tested elsewhere in Pintos.

This is not a test we will run on your submitted projects. It is here for completeness. Number of failures so far.

Definition at line 20 of file stdio.c.

Referenced by checkf(), and test().