Skip to content

tests: build and run path_containment_test - #322

Open
andreeapid wants to merge 1 commit into
google:masterfrom
andreeapid:run-path-containment-test
Open

andreeapid wants to merge 1 commit into
google:masterfrom
andreeapid:run-path-containment-test

Conversation

@andreeapid

Copy link
Copy Markdown
Contributor

tests/path_containment_test.cc is not listed in TEST_BINS, so make test
never builds or runs it. It also does not compile with the project's own flags:
the two system("rm -rf ...") cleanup calls trip -Werror=unused-result.

Add it to TEST_BINS and to the test target, and give it a private temporary
directory from mkdtemp instead of the fixed /tmp/nsj_path_test and
/tmp/nsj_sym_stage paths, so the test cannot be influenced by whatever is
already at those names.

Tested on Ubuntu 26.04, kernel 7.0.0-15-generic, gcc 15.2.0: builds and passes.

@google-cla

google-cla Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

tests/path_containment_test.cc is not listed in TEST_BINS, so "make test" never
builds or runs it. It also does not compile with the project's own flags: the
two system("rm -rf ...") cleanup calls trip -Werror=unused-result.

Add it to TEST_BINS and to the test target, and give it a private temporary
directory created with mkdtemp instead of the fixed /tmp paths it cleaned up
with system().
@andreeapid

Copy link
Copy Markdown
Contributor Author

Rebased on master after #316 added nstun_udp_peer_test to the Makefile. No other change.

@andreeapid
andreeapid force-pushed the run-path-containment-test branch from 1c2a7c2 to 676aea1 Compare October 9, 2026 05:35

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant