Skip to content

Commit

Permalink
Fix failing appsec tests on pipeline (#2874)
Browse files Browse the repository at this point in the history
Co-authored-by: Anil Mahtani <929854+Anilm3@users.noreply.github.com>
  • Loading branch information
estringana and Anilm3 authored Oct 4, 2024
1 parent bb96a53 commit c1fd94c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
4 changes: 3 additions & 1 deletion .circleci/continue_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,9 @@ jobs:
command: |
export DEBIAN_FRONTEND=noninteractive
apt update
apt install -y wget sudo git g++ gcc gcovr cmake make curl libcurl4-gnutls-dev clang clang-tidy clang-format git php-dev php8.2-xml php-cgi cargo
apt install -y wget sudo git g++ gcc gcovr cmake make curl libcurl4-gnutls-dev clang clang-tidy clang-format git php-dev php8.2-xml php-cgi
curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y --default-toolchain "1.76.0"
echo 'export PATH=${PATH}:$HOME/.cargo/bin' >> $BASH_ENV
- run: git config --global --add safe.directory /home/circleci/datadog/appsec/third_party/libddwaf
- run:
name: CMake
Expand Down
6 changes: 4 additions & 2 deletions appsec/src/extension/helper_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,10 @@ dd_conn *nullable dd_helper_mgr_cur_conn(void)
return NULL;
}

// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
bool dd_on_runtime_path_update(zval *nullable old_val, zval *nonnull new_val, zend_string *nonnull new_str)
bool dd_on_runtime_path_update(
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
zval *nullable old_val, zval *nonnull new_val,
zend_string *nullable new_str)
{
UNUSED(old_val);
UNUSED(new_str);
Expand Down
5 changes: 3 additions & 2 deletions appsec/src/extension/helper_process.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ dd_conn *nullable dd_helper_mgr_acquire_conn(client_init_func nonnull, void *uns
dd_conn *nullable dd_helper_mgr_cur_conn(void);
void dd_helper_close_conn(void);

bool dd_on_runtime_path_update(
zval *nullable old_value, zval *nonnull new_value, zend_string *nonnull new_str);
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
bool dd_on_runtime_path_update(zval *nullable old_value,
zval *nonnull new_value, zend_string *nullable new_str);

#endif // DD_HELPER_MGR_H
1 change: 1 addition & 0 deletions appsec/tests/extension/report_backtrace_01.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Report backtrace
--ENV--
DD_TRACE_GENERATE_ROOT_SPAN=0
DD_TRACE_AUTO_FLUSH_ENABLED=0
--INI--
extension=ddtrace.so
--FILE--
Expand Down
1 change: 1 addition & 0 deletions appsec/tests/extension/report_backtrace_05.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Trace are reported when helper indicates so
--ENV--
DD_TRACE_GENERATE_ROOT_SPAN=0
DD_TRACE_AUTO_FLUSH_ENABLED=0
--INI--
extension=ddtrace.so
datadog.appsec.enabled=1
Expand Down
1 change: 1 addition & 0 deletions appsec/tests/extension/root_span_add_tag.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Test ddtrace_root_span_add_tag
--ENV--
DD_TRACE_GENERATE_ROOT_SPAN=0
DD_TRACE_AUTO_FLUSH_ENABLED=0
DD_SERVICE=appsec_tests
--INI--
extension=ddtrace.so
Expand Down

0 comments on commit c1fd94c

Please sign in to comment.