Skip to content
Closed

dumpdb #5893

Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/valgrind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ check_output promises.txt
# Some of the databases have strings containing "error"
# which check_output greps for.
echo "Running cf-check dump:"
valgrind $VG_OPTS /var/cfengine/bin/cf-check dump 2>&1 | grep -E '\s*[{}"]' --invert-match | tee cf_check_dump.txt
valgrind $VG_OPTS --trace-children-skip='*/liblmdb.so*' /var/cfengine/bin/cf-check dump 2>&1 | grep -E '\s*[{}"]' --invert-match | tee cf_check_dump.txt
check_output cf_check_dump.txt

echo "Running cf-check diagnose on all databases"
Expand Down
4 changes: 3 additions & 1 deletion libpromises/bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,14 @@ bool WriteAmPolicyHubFile(bool am_policy_hub)
{
if (!GetAmPolicyHub())
{
if (creat(filename, 0600) == -1)
int fd = creat(filename, 0600);
if (fd == -1)
{
Log(LOG_LEVEL_ERR, "Error writing marker file '%s'", filename);
free(filename);
return false;
}
close(fd);
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/testall
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ DIFF=${DIFF:-} ; export DIFF
LIBTOOL=${LIBTOOL:-} ; export LIBTOOL
INCLUDE_IN_WORKDIR=${INCLUDE_IN_WORKDIR:-} ; export INCLUDE_IN_WORKDIR

VALGRIND_OPTS="${VALGRIND_OPTS:---leak-check=full --show-reachable=yes --suppressions=valgrind-suppressions}"
VALGRIND_OPTS="${VALGRIND_OPTS:---leak-check=full --show-reachable=yes --suppressions=valgrind-suppressions --track-fds=yes}"
export VALGRIND_OPTS

export MAKEFLAGS
Expand Down
4 changes: 2 additions & 2 deletions tests/valgrind-check/valgrind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ make install

/var/cfengine/bin/cf-agent --version

VG_OPTS="--leak-check=full --track-origins=yes --error-exitcode=1"
VG_OPTS="--leak-check=full --track-origins=yes --error-exitcode=1 --track-fds=yes"
BOOTSTRAP_IP="127.0.0.1"

valgrind $VG_OPTS /var/cfengine/bin/cf-key 2>&1 | tee cf-key.txt
Expand Down Expand Up @@ -157,7 +157,7 @@ check_valgrind_output promises.txt
# Some of the databases have strings containing "error"
# which check_valgrind_output greps for.
echo "Running cf-check dump:"
valgrind $VG_OPTS /var/cfengine/bin/cf-check dump 2>&1 | grep -E '\s*[{}"]' --invert-match | tee cf_check_dump.txt
valgrind $VG_OPTS --trace-children-skip='*/liblmdb.so*' /var/cfengine/bin/cf-check dump 2>&1 | grep -E '\s*[{}"]' --invert-match | tee cf_check_dump.txt
check_valgrind_output cf_check_dump.txt

echo "Running cf-check diagnose on all databases"
Expand Down
Loading