linux_process_test.cpp File Reference
`#include <core/posix/fork.h>`
`#include <core/posix/this_process.h>`
`#include <core/posix/linux/proc/process/stat.h>`
`#include <core/posix/linux/proc/process/oom_adj.h>`
`#include <core/posix/linux/proc/process/oom_score.h>`
`#include <core/posix/linux/proc/process/oom_score_adj.h>`
`#include <gtest/gtest.h>`
`#include <map>`
Include dependency graph for linux_process_test.cpp:

Go to the source code of this file.

## Functions

| TEST (LinuxProcess, accessing_proc_stats_works)
| TEST (LinuxProcess, accessing_proc_oom_score_works)
| TEST (LinuxProcess, accessing_proc_oom_score_adj_works)
| TEST (LinuxProcess, adjusting_proc_oom_score_adj_works)
| TEST (LinuxProcess, adjusting_proc_oom_score_adj_to_privileged_values_only_works_if_root)
| TEST (LinuxProcess, trying_to_write_an_invalid_oom_score_adj_throws)
| TEST (LinuxProcess, adjusting_proc_oom_adj_works)
| TEST (LinuxProcess, adjusting_proc_oom_adj_to_privileged_values_does_not_work)
| TEST (LinuxProcess, trying_to_write_an_invalid_oom_adj_throws)

## Function Documentation

## TEST() [1/9]

TEST | ( | LinuxProcess | ,
|  | accessing_proc_oom_score_adj_works |
| ) |  |

Definition at line 48 of file linux_process_test.cpp.

References core::posix::this_process::instance().

Here is the call graph for this function:

## TEST() [2/9]

TEST | ( | LinuxProcess | ,
|  | accessing_proc_oom_score_works |
| ) |  |

Definition at line 42 of file linux_process_test.cpp.

References core::posix::this_process::instance().

Here is the call graph for this function:

## TEST() [3/9]

TEST | ( | LinuxProcess | ,
|  | accessing_proc_stats_works |
| ) |  |

Definition at line 31 of file linux_process_test.cpp.

References core::posix::empty, core::posix::fork(), core::posix::linux::proc::process::running, and core::posix::exit::success.

Here is the call graph for this function:

## TEST() [4/9]

TEST | ( | LinuxProcess | ,
|  | adjusting_proc_oom_adj_to_privileged_values_does_not_work |
| ) |  |

Definition at line 108 of file linux_process_test.cpp.

References core::posix::this_process::instance(), and core::posix::linux::proc::process::OomAdj::min_value().

Here is the call graph for this function:

## TEST() [5/9]

TEST | ( | LinuxProcess | ,
|  | adjusting_proc_oom_adj_works |
| ) |  |

Definition at line 94 of file linux_process_test.cpp.

References core::posix::this_process::instance(), and core::posix::linux::proc::process::OomAdj::max_value().

Here is the call graph for this function:

## TEST() [6/9]

TEST | ( | LinuxProcess | ,
|  | adjusting_proc_oom_score_adj_to_privileged_values_only_works_if_root |
| ) |  |

Definition at line 68 of file linux_process_test.cpp.

References core::posix::this_process::instance(), and core::posix::linux::proc::process::OomScoreAdj::min_value().

Here is the call graph for this function:

## TEST() [7/9]

TEST | ( | LinuxProcess | ,
|  | adjusting_proc_oom_score_adj_works |
| ) |  |

Definition at line 54 of file linux_process_test.cpp.

References core::posix::this_process::instance(), and core::posix::linux::proc::process::OomScoreAdj::max_value().

Here is the call graph for this function:

## TEST() [8/9]

TEST | ( | LinuxProcess | ,
|  | trying_to_write_an_invalid_oom_adj_throws |
| ) |  |

Definition at line 124 of file linux_process_test.cpp.

References EXPECT_ANY_THROW(), core::posix::this_process::instance(), and core::posix::linux::proc::process::OomAdj::min_value().

Here is the call graph for this function:

## TEST() [9/9]

TEST | ( | LinuxProcess | ,
|  | trying_to_write_an_invalid_oom_score_adj_throws |
| ) |  |

Definition at line 84 of file linux_process_test.cpp.

References EXPECT_ANY_THROW(), core::posix::this_process::instance(), and core::posix::linux::proc::process::OomScoreAdj::min_value().

Here is the call graph for this function: