Skip to content

Commit e975da1

Browse files
committed
[C] Fix shouldSupportSigTerm test on Rocky.
1 parent 2b31cfa commit e975da1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

aeron-driver/src/test/c/aeronmd_signal_test.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,13 @@ TEST_F(AeronmdSignalTest, shouldSupportSigTerm)
5858
FILE *psgrepOutput = popen("/usr/bin/pgrep -xn aeronmd", "r");
5959

6060
char buf[1024] = {};
61-
ASSERT_NE(nullptr, fgets(buf, sizeof(buf) - 1, psgrepOutput));
61+
if (nullptr == fgets(buf, sizeof(buf) - 1, psgrepOutput))
62+
{
63+
FAIL() << "pgrep does not exist";
64+
}
6265

6366
int pid = atoi(buf);
64-
ASSERT_LT(0, pid);
67+
ASSERT_LT(0, pid) << "aeronmd is not running";
6568

6669
kill(pid, SIGTERM);
6770

cppbuild/rocky/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN yum update -y && yum install -y https://cdn.azul.com/zulu/bin/zulu-repo-1.0.
99
git \
1010
findutils \
1111
openssl-devel \
12+
pgrep \
1213
zulu17-jdk
1314

1415
RUN yum groupinstall 'Development Tools' -y

0 commit comments

Comments
 (0)