Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libguac: nested send instruction test #487

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/libguac/tests/socket/nested_send_instruction.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <guacamole/socket.h>

#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>

/**
Expand Down Expand Up @@ -123,6 +124,7 @@ static void read_expected_instructions(int fd) {
void test_socket__nested_send_instruction() {

int fd[2];
int return_status;

/* Create pipe */
CU_ASSERT_EQUAL_FATAL(pipe(fd), 0);
Expand All @@ -141,6 +143,9 @@ void test_socket__nested_send_instruction() {
exit(0);
}

/* Wait for child to finish */
waitpid(childpid, &return_status, 0);

/* Read and verify the expected instructions within the parent process */
close(write_fd);
read_expected_instructions(read_fd);
Expand Down
Loading