|
Crinit -- Configurable Rootfs Init
|
Unit test for crinitExpandPIDVariablesInSingleCommand(), successful execution. More...
#include <stdlib.h>#include <string.h>#include "common.h"#include "confhdl.h"#include "unit_test.h"#include "utest-crinit-expand-pid-variables.h"
Functions | |
| int | crinitExpandPIDVariablesInSingleCommand (char *input, const pid_t pid, char **result) |
| void | crinitExpandPIDVariablesInCommands (crinitTaskCmd_t *commands, size_t cmdsSize, const pid_t pid) |
| Expands variable ${TASK_PID} in a command with the task's PID. | |
| void | crinitExpandPIDVariablesInSingleCommandOneVariableReplaced (void **state) |
| void | crinitExpandPIDVariablesInSingleCommandTwoVariablesReplaced (void **state) |
| void | crinitExpandPIDVariablesInCommandsOneVariableInThreeArgv (void **state) |
| void | crinitExpandPIDVariablesInCommandsOneVariableInThreeCommands (void **state) |
Unit test for crinitExpandPIDVariablesInSingleCommand(), successful execution.
| void crinitExpandPIDVariablesInCommands | ( | crinitTaskCmd_t * | commands, |
| size_t | cmdsSize, | ||
| const pid_t | pid | ||
| ) |
Expands variable ${TASK_PID} in a command with the task's PID.
Please note that this makes only sense for a STOP_COMMAND. Currently this is the only variable that can be expanded here.
| commands | Pointer to task command structure |
| cmdsSize | Number of elements in commands |
| pid | PID of task |
| void crinitExpandPIDVariablesInCommandsOneVariableInThreeArgv | ( | void ** | state | ) |
Tests successful parsing and replacement of a command task structure
| void crinitExpandPIDVariablesInCommandsOneVariableInThreeCommands | ( | void ** | state | ) |
Tests successful parsing and replacement of a command task structure
| int crinitExpandPIDVariablesInSingleCommand | ( | char * | input, |
| const pid_t | pid, | ||
| char ** | result | ||
| ) |
| void crinitExpandPIDVariablesInSingleCommandOneVariableReplaced | ( | void ** | state | ) |
Tests successful replacing one variable in a command.
| void crinitExpandPIDVariablesInSingleCommandTwoVariablesReplaced | ( | void ** | state | ) |
Tests successful replacing two variables in a command.