1
0

thesis: Incorporate feedback

This commit is contained in:
2025-08-13 12:23:20 +02:00
parent a4378a7c8e
commit b48c5b4921
3 changed files with 39 additions and 38 deletions

View File

@@ -2,9 +2,9 @@
\chapter{Manipulating Function Calls}\label{ch:manipulating-function-calls}
This chapter discusses how to manipulate function calls and how this may be used to test programs.
For how function calls may be intercepted at all, see Chapter~\ref{ch:intercepting-function-calls}.
How function calls may be intercepted at all is discussed in Chapter~\ref{ch:intercepting-function-calls}.
This chapter builds on the basis of the previous one and expands its functions.
``Manipulation'' in this context means to change the arguments of a function then running it normally, or skipping the execution of the real function completely and simply returning a given value (``mocking'').
``Manipulation'' in this context means to change the arguments of a function then calling it with those changed arguments, or skipping the execution of the real function completely and simply returning a given value (``mocking'').
These techniques allow in-depth testing of programs.
In contrast to simply recording and logging function calls which may be controlled via environment variables, manipulation of such function calls requires some other process to indicate how to handle each call.
@@ -62,7 +62,7 @@ Figure~\ref{fig:control-flow} illustrates the control flow for manipulating func
\section{Defining a Protocol}\label{sec:defining-a-protocol}
When using a socket to communicate with another process, a protocol definition is needed.
This works defines a text-based protocol in which line breaks denote the end of a message.
This work defines a text-based protocol in which line breaks denote the end of a message.
The following subsections describe the defined message types.
\subsection{\textit{Init} Message (Client \textrightarrow{} Server)}\label{subsec:init-message}
@@ -72,7 +72,7 @@ The client (\texttt{intercept.so}) uses it to identify the running program to th
\subsection{\textit{Call} Message (Client \textrightarrow{} Server)}\label{subsec:call-message}
For each function call the client sends this message to the server and waits for a reply (\textit{Action} message).
For each function call, the client sends this message to the server and waits for a reply (\textit{Action} message).
The contents of this message type correspond to the first line of an intercepted function call (see Section~\ref{sec:automated-testing-on-intercepted-function-calls}).
\subsection{\textit{Action} Message (Server \textrightarrow{} Client)}\label{subsec:action-message}