Skip to content

10-Dev: make check in mgmt2 removes files installed by make install #8792

Closed

Description

@bneradt

The 10-Dev coverage builds are failing in opensource CI. Here's a current example:
https://ci.trafficserver.apache.org/view/10-Dev/job/10-Dev/job/coverage/13/console

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.

Activity

  1. added this to the 10-Dev milestone on Apr 13, 2022
  2. bneradt commented on Apr 13, 2022

    @bneradt
    ContributorAuthor

    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
    
  3. bneradt commented on Apr 13, 2022

    @bneradt
    ContributorAuthor

    I see. The problem is setting sandboxDir to fs::temp_directory_path here which will be /tmp/

    fs::path sandboxDir = fs::temp_directory_path();

    Then removing it here:

    REQUIRE(fs::remove(sandboxDir, ec));

    Rather it should use getTemporaryDir() (or something like it) which returns a temporary directory (i.e., not /tmp/ but something from mkdtemp) like here:

    static fs::path sandboxDir = getTemporaryDir();

  4. added 2 commits that reference this issue on Apr 13, 2022
    8a0c3a9
    fc7787d
  5. modified the milestones: 10-Dev, 10.0.0 on Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions