You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
10-Dev: make check in mgmt2 removes files installed by make install #8792
The reason it fails is because the run of the regression tests fails because the installed traffic_server binary no longer exists at the time it tries to run them:
+ /tmp/ats/bin/traffic_server -K -k -R 1
/home/jenkins/workspace/10-Dev/coverage/src@tmp/durable-5ab76cb8/script.sh: line 4: /tmp/ats/bin/traffic_server: No such file or directory
The --prefix configure the CI uses is /tmp/ats. Experimenting with things locally, I notice that the previous make install call does indeed populate /tmp/ats/bin/traffic_server along with the other installed files, but the latter make check call deletes the files from that directory. Further, I notice that the make check call in mgmt2 removes those files.
Here's a session demonstrating this:
$ git show --no-patch --oneline
1e6620bf2 (HEAD -> fix_10dev_coverage, upstream/10-Dev) Fixes the cache unit tests by removing an undeclared class function, (#8782)
$ make install > /dev/null 2>&1
$ ls /tmp/ats
bin etc include lib libexec share var
$ make check > /dev/null 2>&1
$ ls /tmp/ats
lib
Notice that after make check, only lib remains in the install directory.
This problem does not happen on master. Only for 10-Dev.
With some further experimentation, it looks like the mgmt2's test_jsonrpcserver test removes the installed files:
$ make install > /dev/null 2>&1
$ ls /tmp/ats
bin etc include lib libexec share var
$ ./mgmt2/rpc/.libs/test_jsonrpcserver > /dev/null 2>&1
$ ls /tmp/ats
lib
Rather it should use getTemporaryDir() (or something like it) which returns a temporary directory (i.e., not /tmp/ but something from mkdtemp) like here:
Activity
bneradt commentedon Apr 13, 2022
With some further experimentation, it looks like the
mgmt2'stest_jsonrpcservertest removes the installed files:bneradt commentedon Apr 13, 2022
I see. The problem is setting sandboxDir to
fs::temp_directory_pathhere which will be/tmp/trafficserver/mgmt2/rpc/server/unit_tests/test_rpcserver.cc
Line 506 in 1e6620b
Then removing it here:
trafficserver/mgmt2/rpc/server/unit_tests/test_rpcserver.cc
Line 536 in 1e6620b
Rather it should use
getTemporaryDir()(or something like it) which returns a temporary directory (i.e., not/tmp/but something frommkdtemp) like here:trafficserver/proxy/http/remap/unit-tests/test_PluginFactory.cc
Line 105 in 1e6620b
test_jsonrpcserver: do not remove files from /tmp
test_jsonrpcserver: do not remove files from /tmp (#8794)