├── .gitattributes
├── .github
└── workflows
│ ├── docs-ci.yml
│ └── pypi-release.yml
├── .gitignore
├── .readthedocs.yml
├── AUTHORS.rst
├── CHANGELOG.rst
├── CODE_OF_CONDUCT.rst
├── CONTRIBUTING.rst
├── MANIFEST.in
├── Makefile
├── NOTICE
├── README-build-tracing.rst
├── README.rst
├── TODO.txt
├── apache-2.0.LICENSE
├── azure-pipelines.yml
├── configure
├── configure.bat
├── docs
├── Makefile
├── example_outputs
│ ├── graph_bash.pdf
│ ├── graph_cups.pdf
│ ├── graph_patchelf.pdf
│ └── graph_strace.pdf
├── make.bat
├── scripts
│ ├── doc8_style_check.sh
│ └── sphinx_build_link_check.sh
├── source
│ ├── _static
│ │ └── theme_overrides.css
│ ├── conf.py
│ ├── contribute
│ │ └── contrib_doc.rst
│ ├── index.rst
│ └── skeleton-usage.rst
└── tutorial
│ ├── build-patchelf.rst
│ └── patchelf-build-graph.pdf
├── etc
├── ci
│ ├── azure-container-deb.yml
│ ├── azure-container-rpm.yml
│ ├── azure-posix.yml
│ ├── azure-win.yml
│ ├── install_sudo.sh
│ ├── macports-ci
│ ├── macports-ci.ABOUT
│ └── mit.LICENSE
└── scripts
│ ├── README.rst
│ ├── check_thirdparty.py
│ ├── fetch_thirdparty.py
│ ├── gen_pypi_simple.py
│ ├── gen_pypi_simple.py.ABOUT
│ ├── gen_pypi_simple.py.NOTICE
│ ├── gen_requirements.py
│ ├── gen_requirements_dev.py
│ ├── requirements.txt
│ ├── test_utils_pip_compatibility_tags.py
│ ├── test_utils_pip_compatibility_tags.py.ABOUT
│ ├── test_utils_pypi_supported_tags.py
│ ├── test_utils_pypi_supported_tags.py.ABOUT
│ ├── utils_dejacode.py
│ ├── utils_pip_compatibility_tags.py
│ ├── utils_pip_compatibility_tags.py.ABOUT
│ ├── utils_pypi_supported_tags.py
│ ├── utils_pypi_supported_tags.py.ABOUT
│ ├── utils_requirements.py
│ ├── utils_thirdparty.py
│ └── utils_thirdparty.py.ABOUT
├── pyproject.toml
├── requirements-dev.txt
├── requirements.txt
├── setup.cfg
├── setup.py
├── src
└── tracecode
│ ├── __init__.py
│ ├── _vendor
│ ├── __init__.py
│ ├── altgraph-0.17.3.dist-info
│ │ ├── INSTALLER
│ │ ├── LICENSE
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── REQUESTED
│ │ ├── WHEEL
│ │ ├── top_level.txt
│ │ └── zip-safe
│ ├── altgraph
│ │ ├── Dot.py
│ │ ├── Graph.py
│ │ ├── GraphAlgo.py
│ │ ├── GraphStat.py
│ │ ├── GraphUtil.py
│ │ ├── ObjectGraph.py
│ │ └── __init__.py
│ ├── docopt-0.6.2.dist-info
│ │ ├── INSTALLER
│ │ ├── LICENSE-MIT
│ │ ├── METADATA
│ │ ├── RECORD
│ │ ├── REQUESTED
│ │ ├── WHEEL
│ │ └── top_level.txt
│ └── docopt.py
│ ├── conf.py
│ ├── pathutils.py
│ ├── tracecode.py
│ └── tracer.py
├── tests
├── data
│ ├── analy_patchelf
│ │ └── trace-archive.tar.bz2
│ ├── analy_patchelf_settings
│ │ └── trace-archive.tar.bz2
│ ├── analy_patchelf_settings2
│ │ └── trace-archive.tar.bz2
│ ├── as_ops
│ │ └── trace
│ │ │ └── t.2799712
│ ├── as_ops_multiplexed
│ │ ├── expected
│ │ └── trace-archive.tar.bz2
│ ├── bug1
│ │ └── t.2461545
│ ├── can_parse_dup_call
│ │ └── trace
│ │ │ └── bash-build01.70793
│ ├── d2d_cups_settings
│ │ ├── expected
│ │ ├── sources
│ │ └── trace-archive.tar.bz2
│ ├── d2d_multiplexed_cp
│ │ ├── expected
│ │ ├── src.lst
│ │ ├── tgt.lst
│ │ └── trace-archive.tar.bz2
│ ├── d2d_patchelf_settings
│ │ ├── expected
│ │ └── trace-archive.tar.bz2
│ ├── d2d_strace_settings
│ │ ├── expected
│ │ ├── sources
│ │ └── trace-archive.tar.bz2
│ ├── dump_patchelf
│ │ ├── expected.csv
│ │ └── trace-archive.tar.bz2
│ ├── file_graph_analysis_patchelf
│ │ ├── expected_ints
│ │ ├── expected_srcs
│ │ ├── expected_tgts
│ │ └── trace-archive.tar.bz2
│ ├── filtering
│ │ └── t
│ │ │ └── trace.70676
│ ├── grep
│ │ └── trace
│ │ │ └── t.2799712
│ ├── grep2
│ │ └── trace
│ │ │ ├── t.2799712
│ │ │ └── t.2799713
│ ├── grep3
│ │ └── trace
│ │ │ ├── t.2799712
│ │ │ ├── t.2799713
│ │ │ └── t.2799714
│ ├── interleaving
│ │ └── trace
│ │ │ ├── cp-trace.1
│ │ │ ├── cp-trace.2
│ │ │ ├── same_name.15480
│ │ │ └── t.15480
│ ├── inventory
│ │ ├── expected
│ │ └── trace-archive.tar.bz2
│ ├── lists
│ │ └── trace
│ │ │ └── t.2799712
│ ├── lists_patchelf
│ │ ├── expected
│ │ └── trace-archive.tar.bz2
│ ├── match_path_long
│ │ ├── expected.lst
│ │ ├── paths1.lst
│ │ └── paths2.lst
│ ├── parse_does_not_hang
│ │ └── trace-archive.tar.bz2
│ ├── parse_entry
│ │ ├── basic.trace
│ │ └── space.trace
│ ├── parse_error
│ │ └── trace.1
│ ├── patchelf_command
│ │ └── trace-archive.tar.bz2
│ ├── patchelf_command2
│ │ ├── expected_pformats.tar.bz2
│ │ ├── ignored_reads.lst
│ │ └── trace-archive.tar.bz2
│ ├── pformat_cups
│ │ ├── expected_pformats.tar.bz2
│ │ └── trace-archive.tar.bz2
│ ├── pformat_grep2
│ │ ├── expected_pformats.tar.bz2
│ │ └── trace-archive.tar.bz2
│ ├── pformat_grep3
│ │ ├── expected_pformats.tar.bz2
│ │ └── trace-archive.tar.bz2
│ ├── pformat_patchelf
│ │ ├── expected_pformats.tar.bz2
│ │ └── trace-archive.tar.bz2
│ ├── pformat_strace_cleaning
│ │ ├── expected_pformats.tar.bz2
│ │ └── trace-archive.tar.bz2
│ ├── pformat_strace_cleaning_dir
│ │ ├── expected_pformats.tar.bz2
│ │ └── trace-archive.tar.bz2
│ ├── pformat_strace_full
│ │ ├── expected_pformats.tar.bz2
│ │ └── trace-archive.tar.bz2
│ ├── pformat_strace_saved
│ │ ├── expected_pformats.tar.bz2
│ │ └── trace-archive.tar.bz2
│ ├── render_graph
│ │ ├── expected.dot
│ │ └── trace
│ │ │ └── t.2799712
│ ├── render_graph_bash
│ │ ├── expected.dot
│ │ └── trace-archive.tar.bz2
│ ├── render_graph_cups
│ │ ├── expected.dot
│ │ └── trace-archive.tar.bz2
│ ├── render_graph_patchelf
│ │ ├── expected.dot
│ │ └── trace-archive.tar.bz2
│ ├── render_graph_patchelf2
│ │ ├── expected.dot
│ │ └── trace-archive.tar.bz2
│ ├── render_graph_strace
│ │ ├── expected.dot
│ │ └── trace-archive.tar.bz2
│ ├── stats_patchelf
│ │ ├── expected
│ │ └── trace-archive.tar.bz2
│ ├── strace2
│ │ └── trace
│ │ │ ├── strace.2453402
│ │ │ └── strace2.2453403
│ ├── strace3
│ │ └── trace
│ │ │ └── dir
│ │ │ └── not_a_trace_file
│ ├── strace_mini
│ │ └── trace
│ │ │ ├── strace.2453402
│ │ │ └── strace.2453403
│ ├── strace_mini2
│ │ └── trace
│ │ │ ├── strace.2453402
│ │ │ └── strace.2453403
│ ├── validate
│ │ └── trace-archive.tar.bz2
│ └── validate_out_of_order
│ │ └── trace-archive.tar.bz2
├── test_skeleton_codestyle.py
└── test_tracecode.py
└── vendorize.toml
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Ignore all Git auto CR/LF line endings conversions
2 | * -text
3 | pyproject.toml export-subst
4 |
--------------------------------------------------------------------------------
/.github/workflows/docs-ci.yml:
--------------------------------------------------------------------------------
1 | name: CI Documentation
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 | runs-on: ubuntu-20.04
8 |
9 | strategy:
10 | max-parallel: 4
11 | matrix:
12 | python-version: [3.9]
13 |
14 | steps:
15 | - name: Checkout code
16 | uses: actions/checkout@v2
17 |
18 | - name: Set up Python ${{ matrix.python-version }}
19 | uses: actions/setup-python@v2
20 | with:
21 | python-version: ${{ matrix.python-version }}
22 |
23 | - name: Give permission to run scripts
24 | run: chmod +x ./docs/scripts/doc8_style_check.sh
25 |
26 | - name: Install Dependencies
27 | run: pip install -e .[docs]
28 |
29 | - name: Check Sphinx Documentation build minimally
30 | working-directory: ./docs
31 | run: sphinx-build -E -W source build
32 |
33 | - name: Check for documentation style errors
34 | working-directory: ./docs
35 | run: ./scripts/doc8_style_check.sh
36 |
37 |
38 |
--------------------------------------------------------------------------------
/.github/workflows/pypi-release.yml:
--------------------------------------------------------------------------------
1 | name: Create library release archives, create a GH release and publish PyPI wheel and sdist on tag in main branch
2 |
3 |
4 | # This is executed automatically on a tag in the main branch
5 |
6 | # Summary of the steps:
7 | # - build wheels and sdist
8 | # - upload wheels and sdist to PyPI
9 | # - create gh-release and upload wheels and dists there
10 | # TODO: smoke test wheels and sdist
11 | # TODO: add changelog to release text body
12 |
13 | # WARNING: this is designed only for packages building as pure Python wheels
14 |
15 | on:
16 | workflow_dispatch:
17 | push:
18 | tags:
19 | - "v*.*.*"
20 |
21 | jobs:
22 | build-pypi-distribs:
23 | name: Build and publish library to PyPI
24 | runs-on: ubuntu-20.04
25 |
26 | steps:
27 | - uses: actions/checkout@master
28 | - name: Set up Python
29 | uses: actions/setup-python@v1
30 | with:
31 | python-version: 3.9
32 |
33 | - name: Install pypa/build
34 | run: python -m pip install build --user
35 |
36 | - name: Build a binary wheel and a source tarball
37 | run: python -m build --sdist --wheel --outdir dist/
38 |
39 | - name: Upload built archives
40 | uses: actions/upload-artifact@v3
41 | with:
42 | name: pypi_archives
43 | path: dist/*
44 |
45 |
46 | create-gh-release:
47 | name: Create GH release
48 | needs:
49 | - build-pypi-distribs
50 | runs-on: ubuntu-20.04
51 |
52 | steps:
53 | - name: Download built archives
54 | uses: actions/download-artifact@v3
55 | with:
56 | name: pypi_archives
57 | path: dist
58 |
59 | - name: Create GH release
60 | uses: softprops/action-gh-release@v1
61 | with:
62 | draft: true
63 | files: dist/*
64 |
65 |
66 | create-pypi-release:
67 | name: Create PyPI release
68 | needs:
69 | - create-gh-release
70 | runs-on: ubuntu-20.04
71 |
72 | steps:
73 | - name: Download built archives
74 | uses: actions/download-artifact@v3
75 | with:
76 | name: pypi_archives
77 | path: dist
78 |
79 | - name: Publish to PyPI
80 | if: startsWith(github.ref, 'refs/tags')
81 | uses: pypa/gh-action-pypi-publish@master
82 | with:
83 | password: ${{ secrets.PYPI_API_TOKEN }}
84 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Python compiled files
2 | *.py[cod]
3 |
4 | # virtualenv and other misc bits
5 | /src/*.egg-info
6 | *.egg-info
7 | /dist
8 | /build
9 | /bin
10 | /lib
11 | /scripts
12 | /Scripts
13 | /Lib
14 | /pip-selfcheck.json
15 | /tmp
16 | /venv
17 | .Python
18 | /include
19 | /Include
20 | /local
21 | */local/*
22 | /local/
23 | /share/
24 | /tcl/
25 | /.eggs/
26 |
27 | # Installer logs
28 | pip-log.txt
29 |
30 | # Unit test / coverage reports
31 | .cache
32 | .coverage
33 | .coverage.*
34 | nosetests.xml
35 | htmlcov
36 |
37 | # Translations
38 | *.mo
39 |
40 | # IDEs
41 | .project
42 | .pydevproject
43 | .idea
44 | org.eclipse.core.resources.prefs
45 | .vscode
46 | .vs
47 |
48 | # Sphinx
49 | docs/_build
50 | docs/bin
51 | docs/build
52 | docs/include
53 | docs/Lib
54 | doc/pyvenv.cfg
55 | pyvenv.cfg
56 |
57 | # Various junk and temp files
58 | .DS_Store
59 | *~
60 | .*.sw[po]
61 | .build
62 | .ve
63 | *.bak
64 | /.cache/
65 |
66 | # pyenv
67 | /.python-version
68 | /man/
69 | /.pytest_cache/
70 | lib64
71 | tcl
72 |
73 | # Ignore Jupyter Notebook related temp files
74 | .ipynb_checkpoints/
75 |
--------------------------------------------------------------------------------
/.readthedocs.yml:
--------------------------------------------------------------------------------
1 | # .readthedocs.yml
2 | # Read the Docs configuration file
3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4 |
5 | # Required
6 | version: 2
7 |
8 | # Where the Sphinx conf.py file is located
9 | sphinx:
10 | configuration: docs/source/conf.py
11 |
12 | # Setting the python version and doc build requirements
13 | python:
14 | install:
15 | - method: pip
16 | path: .
17 | extra_requirements:
18 | - docs
19 |
--------------------------------------------------------------------------------
/AUTHORS.rst:
--------------------------------------------------------------------------------
1 | The following organization or individuals have contributed to TraceCode:
2 |
3 | - nexB Inc.
4 | - Philippe Ombredanne
5 | - Dong-hee Na
6 |
--------------------------------------------------------------------------------
/CHANGELOG.rst:
--------------------------------------------------------------------------------
1 |
2 | Changelog
3 | =========
4 |
5 | 0.21.0 (2023-01-11)
6 | -------------------
7 |
8 | * Correct file write handling in CLI
9 | * Add tests
10 | * Vendor dependencies
11 |
12 |
13 |
14 | 0.10.0 (2022-10-20)
15 | -------------------
16 |
17 | * Update to Python 3, drop Python 2
18 | * Adopt skeleton
19 |
20 |
21 | 0.9.0 (2017-02-05)
22 | ------------------
23 |
24 | * Initial release.
25 |
26 | * support for tracing a dynamic build with strace on Linux
27 |
28 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.rst:
--------------------------------------------------------------------------------
1 | Contributor Covenant Code of Conduct
2 | ====================================
3 |
4 | Our Pledge
5 | ----------
6 |
7 | In the interest of fostering an open and welcoming environment, we as
8 | contributors and maintainers pledge to making participation in our
9 | project and our community a harassment-free experience for everyone,
10 | regardless of age, body size, disability, ethnicity, gender identity and
11 | expression, level of experience, education, socio-economic status,
12 | nationality, personal appearance, race, religion, or sexual identity and
13 | orientation.
14 |
15 | Our Standards
16 | -------------
17 |
18 | Examples of behavior that contributes to creating a positive environment
19 | include:
20 |
21 | - Using welcoming and inclusive language
22 | - Being respectful of differing viewpoints and experiences
23 | - Gracefully accepting constructive criticism
24 | - Focusing on what is best for the community
25 | - Showing empathy towards other community members
26 |
27 | Examples of unacceptable behavior by participants include:
28 |
29 | - The use of sexualized language or imagery and unwelcome sexual
30 | attention or advances
31 | - Trolling, insulting/derogatory comments, and personal or political
32 | attacks
33 | - Public or private harassment
34 | - Publishing others’ private information, such as a physical or
35 | electronic address, without explicit permission
36 | - Other conduct which could reasonably be considered inappropriate in a
37 | professional setting
38 |
39 | Our Responsibilities
40 | --------------------
41 |
42 | Project maintainers are responsible for clarifying the standards of
43 | acceptable behavior and are expected to take appropriate and fair
44 | corrective action in response to any instances of unacceptable behavior.
45 |
46 | Project maintainers have the right and responsibility to remove, edit,
47 | or reject comments, commits, code, wiki edits, issues, and other
48 | contributions that are not aligned to this Code of Conduct, or to ban
49 | temporarily or permanently any contributor for other behaviors that they
50 | deem inappropriate, threatening, offensive, or harmful.
51 |
52 | Scope
53 | -----
54 |
55 | This Code of Conduct applies both within project spaces and in public
56 | spaces when an individual is representing the project or its community.
57 | Examples of representing a project or community include using an
58 | official project e-mail address, posting via an official social media
59 | account, or acting as an appointed representative at an online or
60 | offline event. Representation of a project may be further defined and
61 | clarified by project maintainers.
62 |
63 | Enforcement
64 | -----------
65 |
66 | Instances of abusive, harassing, or otherwise unacceptable behavior may
67 | be reported by contacting the project team at pombredanne@gmail.com
68 | or on the Gitter chat channel at https://gitter.im/aboutcode-org/discuss .
69 | All complaints will be reviewed and investigated and will result in a
70 | response that is deemed necessary and appropriate to the circumstances.
71 | The project team is obligated to maintain confidentiality with regard to
72 | the reporter of an incident. Further details of specific enforcement
73 | policies may be posted separately.
74 |
75 | Project maintainers who do not follow or enforce the Code of Conduct in
76 | good faith may face temporary or permanent repercussions as determined
77 | by other members of the project’s leadership.
78 |
79 | Attribution
80 | -----------
81 |
82 | This Code of Conduct is adapted from the `Contributor Covenant`_ ,
83 | version 1.4, available at
84 | https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
85 |
86 | .. _Contributor Covenant: https://www.contributor-covenant.org
87 |
--------------------------------------------------------------------------------
/CONTRIBUTING.rst:
--------------------------------------------------------------------------------
1 | ============
2 | Contributing
3 | ============
4 |
5 | Contributions are welcome and appreciated!
6 | Every little bit helps, and credit will always be given.
7 |
8 | When contributing to TraceCode (such as code, bugs, documentation, etc.) you
9 | agree to the Developer Certificate of Origin http://developercertificate.org/
10 | and the TraceCode license (see the NOTICE file)
11 |
12 |
13 | Feature requests and feedback
14 | =============================
15 |
16 | To send feedback, file an issue at
17 | https://github.com/aboutcode-org/tracecode-build/issues
18 |
19 | If you are proposing a feature:
20 |
21 | * Explain how it would work.
22 | * Keep the scope simple possible to make it easier to implement.
23 | * Remember that your contributions are welcomed to implement this feature!
24 |
25 |
26 | Bug reports
27 | ===========
28 |
29 | When reporting a bug at https://github.com/aboutcode-org/tracecode-build/issues please
30 | include:
31 |
32 | * Your operating system name, version and architecture (32 or 64 bits).
33 | * Your Python version.
34 | * Your TraceCode version.
35 | * Any additional details about your local setup that might be helpful to
36 | diagnose this bug.
37 | * Detailed steps to reproduce the bug, such as the commands you ran and a link
38 | to the code you are scanning.
39 | * The errors messages or failure trace if any.
40 | * If helpful, you can add a screenshot as an issue attachment when relevant or
41 | some extra file as a link to a Gist https://gist.github.com
42 |
43 |
44 | Documentation improvements
45 | ==========================
46 |
47 | Documentation can come in the form of wiki pages, docstrings, blog posts,
48 | articles, etc. Even a minor typo fix is welcomed.
49 |
50 |
51 | Development
52 | ===========
53 |
54 | To set up TraceCode for local development:
55 |
56 | 1. Fork tracecode-build on GitHub at
57 | https://github.com/aboutcode-org/tracecode-build
58 |
59 | 2. Clone your fork locally::
60 |
61 | git clone git@github.com:your_name_here/tracecode-build.git
62 |
63 | 3. Create a branch for local development::
64 |
65 | git checkout -b name-of-your-bugfix-or-feature
66 |
67 | 4. Configure your local environment for development, run the configure script.
68 | The configure script creates an isolated Python `virtual environment` in
69 | your checkout directory, the Python `pip` tool, and installs the thirdparty
70 | libraries (from the `thirdparty/ directory`), setup the paths, etc.
71 | See https://virtualenv.pypa.io/en/latest/ for more details.
72 |
73 | Run this command to configure TraceCode::
74 |
75 | source configure
76 |
77 | On Windows use instead::
78 |
79 | configure
80 |
81 | When you create a new terminal/shell to work on TraceCode, either rerun the
82 | configure script or `source bin/activate` (or run `bin\\activate` on Windows)
83 |
84 | 5. Now you can make your code changes in your local clone.
85 | Please create new unit tests for your code.
86 |
87 | 6. When you are done with your changes, run all the tests.
88 | Use this command::
89 |
90 | py.test
91 |
92 |
93 | 7. Commit your changes and push your branch to your GitHub fork::
94 |
95 | git add .
96 | git commit -m "Your detailed description of your changes."
97 | git push origin name-of-your-bugfix-or-feature
98 |
99 | 8. Submit a pull request through the GitHub website for this branch.
100 |
101 |
102 | Pull Request Guidelines
103 | -----------------------
104 |
105 | If you need a code review or feedback while you are developing the code just
106 | create a pull request. You can add new commits to your branch as needed.
107 |
108 | For merging, your request would need to:
109 |
110 | 1. Include unit tests that are passing (run ``py.test``).
111 | 2. Update documentation as needed for new API, functionality etc.
112 | 3. Add a note to ``CHANGELOG.rst`` about the changes.
113 | 4. Add your name to ``AUTHORS.rst``.
114 |
115 |
116 | Test tips
117 | ---------
118 |
119 | To run a subset of test functions containing test_myfeature in their name use::
120 |
121 | py.test -k test_myfeature
122 |
123 | To run tests verbosely, displaying all print statements to terminal::
124 |
125 | py.test -vvs
126 |
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | graft src
2 | graft tests
3 |
4 | include *.LICENSE
5 | include NOTICE
6 | include *.ABOUT
7 | include *.toml
8 | include *.yml
9 | include *.rst
10 | include setup.*
11 | include configure*
12 | include requirements*
13 | include .git*
14 |
15 | recursive-include etc *
16 | recursive-include docs *
17 |
18 | global-exclude *.py[co] __pycache__ *.*~
19 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | # SPDX-License-Identifier: Apache-2.0
2 | #
3 | # Copyright (c) nexB Inc. and others. All rights reserved.
4 | # ScanCode is a trademark of nexB Inc.
5 | # SPDX-License-Identifier: Apache-2.0
6 | # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7 | # See https://github.com/aboutcode-org/skeleton for support or download.
8 | # See https://aboutcode.org for more information about nexB OSS projects.
9 | #
10 |
11 | # Python version can be specified with `$ PYTHON_EXE=python3.x make conf`
12 | PYTHON_EXE?=python3
13 | VENV=venv
14 | ACTIVATE?=. ${VENV}/bin/activate;
15 |
16 | dev:
17 | @echo "-> Configure the development envt."
18 | ./configure --dev
19 |
20 | isort:
21 | @echo "-> Apply isort changes to ensure proper imports ordering"
22 | ${VENV}/bin/isort --sl -l 100 src tests setup.py
23 |
24 | black:
25 | @echo "-> Apply black code formatter"
26 | ${VENV}/bin/black -l 100 src tests setup.py
27 |
28 | doc8:
29 | @echo "-> Run doc8 validation"
30 | @${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/
31 |
32 | valid: isort black
33 |
34 | check:
35 | @echo "-> Run pycodestyle (PEP8) validation"
36 | @${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache .
37 | @echo "-> Run isort imports ordering validation"
38 | @${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests .
39 | @echo "-> Run black validation"
40 | @${ACTIVATE} black --check --check -l 100 src tests setup.py
41 |
42 | clean:
43 | @echo "-> Clean the Python env"
44 | ./configure --clean
45 |
46 | test:
47 | @echo "-> Run the test suite"
48 | ${VENV}/bin/pytest -vvs
49 |
50 | docs:
51 | rm -rf docs/_build/
52 | @${ACTIVATE} sphinx-build docs/ docs/_build/
53 |
54 | .PHONY: conf dev check valid black isort clean test docs
55 |
--------------------------------------------------------------------------------
/NOTICE:
--------------------------------------------------------------------------------
1 | TraceCode Licenses
2 | ==================
3 |
4 | Copyright (c) nexB Inc. and others. All rights reserved.
5 | TraceCode is a trademark of nexB Inc.
6 |
7 | SPDX-License-Identifier: Apache-2.0
8 |
9 | TraceCode software is licensed under the Apache License version 2.0.
10 |
11 | See https://www.apache.org/licenses/LICENSE-2.0 for the Apache-2.0 license text.
12 |
13 | See https://github.com/aboutcode-org/tracecode-toolkit-strace for support or download.
14 | See https://aboutcode.org for more information about nexB OSS projects
15 |
16 |
17 | Third-party software licenses
18 | =============================
19 |
20 | TraceCode embeds third-party free and open source software packages under various
21 | licenses including permissive, limited copyleft and copyleft licenses. The
22 | origin and license of each package is documented by a .ABOUT file included
23 | in the TraceCode codetree and the releases archive.
24 |
25 | The corresponding source code for pre-compiled third-party software is available
26 | for immediate download from the same release page where you obtained TraceCode,
27 | including:
28 |
29 | - https://github.com/aboutcode-org/tracecode-toolkit-strace
30 | - https://thirdparty.aboutcode.org/pypi/
31 | - https://github.com/aboutcode-org/thirdparty-packages/pypi/
32 | - https://github.com/aboutcode-org/scancode-plugins/
33 | - https://github.com/aboutcode-org/scancode-thirdparty-src/
34 | - https://github.com/aboutcode-org/thirdparty-packages/
35 |
36 | You may also contact us to request the source code by email at info@nexb.com or
37 | by postal mail at:
38 |
39 | nexB Inc., tracecode-toolkit-strace open source code request
40 | 4966 El Camino Real #119, Los Altos, CA 94022, USA
41 |
42 | Please indicate in your communication the tracecode-toolkit-strace version for
43 | which you are requesting source code.
44 |
45 |
--------------------------------------------------------------------------------
/TODO.txt:
--------------------------------------------------------------------------------
1 | [ ] replace docopt with click for CLI arguments handling
2 | [ ] support analyzing using only targets
3 | [ ] keep FD for pipes and sockets "paths"
4 | [ ] trace and do not follow pipes and sockets after they have been closed
5 | [ ] find alternative to dot for large graphs
6 | [ ] store the graph in a graph database
7 | [ ] track the FD lifecycle
8 |
--------------------------------------------------------------------------------
/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | ################################################################################
2 | # We use Azure to run the full tests suites on multiple Python 3.x
3 | # on multiple Windows, macOS and Linux versions all on 64 bits
4 | # These jobs are using VMs with Azure-provided Python builds
5 | ################################################################################
6 |
7 | jobs:
8 | - template: etc/ci/azure-posix.yml
9 | parameters:
10 | job_name: ubuntu20_cpython
11 | image_name: ubuntu-20.04
12 | python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
13 | test_suites:
14 | all: |
15 | sudo apt-get -y update
16 | sudo apt-get -y install build-essential strace graphviz
17 | venv/bin/pytest -n 2 -vvs
18 |
19 | - template: etc/ci/azure-posix.yml
20 | parameters:
21 | job_name: ubuntu22_cpython
22 | image_name: ubuntu-22.04
23 | python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
24 | test_suites:
25 | all: |
26 | sudo apt-get -y update
27 | sudo apt-get -y install build-essential strace graphviz
28 | venv/bin/pytest -n 2 -vvs
29 |
30 | - template: etc/ci/azure-posix.yml
31 | parameters:
32 | job_name: macos12_cpython
33 | image_name: macos-12
34 | python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
35 | test_suites:
36 | all: venv/bin/pytest -n 2 -vvs
37 |
38 | - template: etc/ci/azure-win.yml
39 | parameters:
40 | job_name: win2019_cpython
41 | image_name: windows-2019
42 | python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
43 | test_suites:
44 | all: venv\Scripts\pytest -n 2 -vvs
45 |
46 | - template: etc/ci/azure-win.yml
47 | parameters:
48 | job_name: win2022_cpython
49 | image_name: windows-2022
50 | python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
51 | test_suites:
52 | all: venv\Scripts\pytest -n 2 -vvs
53 |
--------------------------------------------------------------------------------
/docs/Makefile:
--------------------------------------------------------------------------------
1 | # Minimal makefile for Sphinx documentation
2 | #
3 |
4 | # You can set these variables from the command line, and also
5 | # from the environment for the first two.
6 | SPHINXOPTS ?=
7 | SPHINXBUILD ?= sphinx-build
8 | SOURCEDIR = source
9 | BUILDDIR = build
10 |
11 | # Put it first so that "make" without argument is like "make help".
12 | help:
13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14 |
15 | .PHONY: help Makefile
16 |
17 | # Catch-all target: route all unknown targets to Sphinx using the new
18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19 | %: Makefile
20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21 |
--------------------------------------------------------------------------------
/docs/example_outputs/graph_bash.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/docs/example_outputs/graph_bash.pdf
--------------------------------------------------------------------------------
/docs/example_outputs/graph_cups.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/docs/example_outputs/graph_cups.pdf
--------------------------------------------------------------------------------
/docs/example_outputs/graph_patchelf.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/docs/example_outputs/graph_patchelf.pdf
--------------------------------------------------------------------------------
/docs/example_outputs/graph_strace.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/docs/example_outputs/graph_strace.pdf
--------------------------------------------------------------------------------
/docs/make.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 |
3 | pushd %~dp0
4 |
5 | REM Command file for Sphinx documentation
6 |
7 | if "%SPHINXBUILD%" == "" (
8 | set SPHINXBUILD=sphinx-build
9 | )
10 | set SOURCEDIR=source
11 | set BUILDDIR=build
12 |
13 | if "%1" == "" goto help
14 |
15 | %SPHINXBUILD% >NUL 2>NUL
16 | if errorlevel 9009 (
17 | echo.
18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19 | echo.installed, then set the SPHINXBUILD environment variable to point
20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you
21 | echo.may add the Sphinx directory to PATH.
22 | echo.
23 | echo.If you don't have Sphinx installed, grab it from
24 | echo.http://sphinx-doc.org/
25 | exit /b 1
26 | )
27 |
28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29 | goto end
30 |
31 | :help
32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33 |
34 | :end
35 | popd
36 |
--------------------------------------------------------------------------------
/docs/scripts/doc8_style_check.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # halt script on error
3 | set -e
4 | # Check for Style Code Violations
5 | doc8 --max-line-length 100 source --ignore D000 --quiet
--------------------------------------------------------------------------------
/docs/scripts/sphinx_build_link_check.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # halt script on error
3 | set -e
4 | # Build locally, and then check links
5 | sphinx-build -E -W -b linkcheck source build
--------------------------------------------------------------------------------
/docs/source/conf.py:
--------------------------------------------------------------------------------
1 | # Configuration file for the Sphinx documentation builder.
2 | #
3 | # This file only contains a selection of the most common options. For a full
4 | # list see the documentation:
5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html
6 |
7 | # -- Path setup --------------------------------------------------------------
8 |
9 | # If extensions (or modules to document with autodoc) are in another directory,
10 | # add these directories to sys.path here. If the directory is relative to the
11 | # documentation root, use os.path.abspath to make it absolute, like shown here.
12 | #
13 | # import os
14 | # import sys
15 | # sys.path.insert(0, os.path.abspath('.'))
16 |
17 |
18 | # -- Project information -----------------------------------------------------
19 |
20 | project = "nexb-skeleton"
21 | copyright = "nexB Inc. and others."
22 | author = "AboutCode.org authors and contributors"
23 |
24 |
25 | # -- General configuration ---------------------------------------------------
26 |
27 | # Add any Sphinx extension module names here, as strings. They can be
28 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
29 | # ones.
30 | extensions = [
31 | "sphinx.ext.intersphinx",
32 | ]
33 |
34 | # This points to aboutcode.readthedocs.io
35 | # In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
36 | # Link was created at commit - https://github.com/aboutcode-org/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83
37 |
38 | intersphinx_mapping = {
39 | "aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None),
40 | "scancode-workbench": ("https://scancode-workbench.readthedocs.io/en/develop/", None),
41 | }
42 |
43 |
44 | # Add any paths that contain templates here, relative to this directory.
45 | templates_path = ["_templates"]
46 |
47 | # List of patterns, relative to source directory, that match files and
48 | # directories to ignore when looking for source files.
49 | # This pattern also affects html_static_path and html_extra_path.
50 | exclude_patterns = []
51 |
52 |
53 | # -- Options for HTML output -------------------------------------------------
54 |
55 | # The theme to use for HTML and HTML Help pages. See the documentation for
56 | # a list of builtin themes.
57 | #
58 | html_theme = "sphinx_rtd_theme"
59 |
60 | # Add any paths that contain custom static files (such as style sheets) here,
61 | # relative to this directory. They are copied after the builtin static files,
62 | # so a file named "default.css" will overwrite the builtin "default.css".
63 | html_static_path = ["_static"]
64 |
65 | master_doc = "index"
66 |
67 | html_context = {
68 | "display_github": True,
69 | "github_user": "nexB",
70 | "github_repo": "nexb-skeleton",
71 | "github_version": "develop", # branch
72 | "conf_py_path": "/docs/source/", # path in the checkout to the docs root
73 | }
74 |
75 | html_css_files = ["_static/theme_overrides.css"]
76 |
77 |
78 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
79 | html_show_sphinx = True
80 |
81 | # Define CSS and HTML abbreviations used in .rst files. These are examples.
82 | # .. role:: is used to refer to styles defined in _static/theme_overrides.css and is used like this: :red:`text`
83 | rst_prolog = """
84 | .. |psf| replace:: Python Software Foundation
85 |
86 | .. # define a hard line break for HTML
87 | .. |br| raw:: html
88 |
89 |
90 |
91 | .. role:: red
92 |
93 | .. role:: img-title
94 |
95 | .. role:: img-title-para
96 |
97 | """
98 |
--------------------------------------------------------------------------------
/docs/source/index.rst:
--------------------------------------------------------------------------------
1 | Welcome to nexb-skeleton's documentation!
2 | =========================================
3 |
4 | .. toctree::
5 | :maxdepth: 2
6 | :caption: Contents:
7 |
8 | skeleton-usage
9 | contribute/contrib_doc
10 |
11 | Indices and tables
12 | ==================
13 |
14 | * :ref:`genindex`
15 | * :ref:`modindex`
16 | * :ref:`search`
17 |
--------------------------------------------------------------------------------
/docs/source/skeleton-usage.rst:
--------------------------------------------------------------------------------
1 | Usage
2 | =====
3 | A brand new project
4 | -------------------
5 | .. code-block:: bash
6 |
7 | git init my-new-repo
8 | cd my-new-repo
9 | git pull git@github.com:nexB/skeleton
10 |
11 | # Create the new repo on GitHub, then update your remote
12 | git remote set-url origin git@github.com:nexB/your-new-repo.git
13 |
14 | From here, you can make the appropriate changes to the files for your specific project.
15 |
16 | Update an existing project
17 | ---------------------------
18 | .. code-block:: bash
19 |
20 | cd my-existing-project
21 | git remote add skeleton git@github.com:nexB/skeleton
22 | git fetch skeleton
23 | git merge skeleton/main --allow-unrelated-histories
24 |
25 | This is also the workflow to use when updating the skeleton files in any given repository.
26 |
27 | Customizing
28 | -----------
29 |
30 | You typically want to perform these customizations:
31 |
32 | - remove or update the src/README.rst and tests/README.rst files
33 | - set project info and dependencies in setup.cfg
34 | - check the configure and configure.bat defaults
35 |
36 | Initializing a project
37 | ----------------------
38 |
39 | All projects using the skeleton will be expected to pull all of it dependencies
40 | from thirdparty.aboutcode.org/pypi or the local thirdparty directory, using
41 | requirements.txt and/or requirements-dev.txt to determine what version of a
42 | package to collect. By default, PyPI will not be used to find and collect
43 | packages from.
44 |
45 | In the case where we are starting a new project where we do not have
46 | requirements.txt and requirements-dev.txt and whose dependencies are not yet on
47 | thirdparty.aboutcode.org/pypi, we run the following command after adding and
48 | customizing the skeleton files to your project:
49 |
50 | .. code-block:: bash
51 |
52 | ./configure
53 |
54 | This will initialize the virtual environment for the project, pull in the
55 | dependencies from PyPI and add them to the virtual environment.
56 |
57 |
58 | Generating requirements.txt and requirements-dev.txt
59 | ----------------------------------------------------
60 |
61 | After the project has been initialized, we can generate the requirements.txt and
62 | requirements-dev.txt files.
63 |
64 | Ensure the virtual environment is enabled.
65 |
66 | .. code-block:: bash
67 |
68 | source venv/bin/activate
69 |
70 | To generate requirements.txt:
71 |
72 | .. code-block:: bash
73 |
74 | python etc/scripts/gen_requirements.py -s venv/lib/python/site-packages/
75 |
76 | Replace \ with the version number of the Python being used, for example:
77 | ``venv/lib/python3.6/site-packages/``
78 |
79 | To generate requirements-dev.txt after requirements.txt has been generated:
80 |
81 | .. code-block:: bash
82 |
83 | ./configure --dev
84 | python etc/scripts/gen_requirements_dev.py -s venv/lib/python/site-packages/
85 |
86 | Note: on Windows, the ``site-packages`` directory is located at ``venv\Lib\site-packages\``
87 |
88 | .. code-block:: bash
89 |
90 | python .\\etc\\scripts\\gen_requirements.py -s .\\venv\\Lib\\site-packages\\
91 | .\configure --dev
92 | python .\\etc\\scripts\\gen_requirements_dev.py -s .\\venv\\Lib\\site-packages\\
93 |
94 |
95 | Collecting and generating ABOUT files for dependencies
96 | ------------------------------------------------------
97 |
98 | Ensure that the dependencies used by ``etc/scripts/fetch_thirdparty.py`` are installed:
99 |
100 | .. code-block:: bash
101 |
102 | pip install -r etc/scripts/requirements.txt
103 |
104 | Once we have requirements.txt and requirements-dev.txt, we can fetch the project
105 | dependencies as wheels and generate ABOUT files for them:
106 |
107 | .. code-block:: bash
108 |
109 | python etc/scripts/fetch_thirdparty.py -r requirements.txt -r requirements-dev.txt
110 |
111 | There may be issues with the generated ABOUT files, which will have to be
112 | corrected. You can check to see if your corrections are valid by running:
113 |
114 | .. code-block:: bash
115 |
116 | python etc/scripts/check_thirdparty.py -d thirdparty
117 |
118 | Once the wheels are collected and the ABOUT files are generated and correct,
119 | upload them to thirdparty.aboutcode.org/pypi by placing the wheels and ABOUT
120 | files from the thirdparty directory to the pypi directory at
121 | https://github.com/aboutcode-org/thirdparty-packages
122 |
123 |
124 | Usage after project initialization
125 | ----------------------------------
126 |
127 | Once the ``requirements.txt`` and ``requirements-dev.txt`` have been generated
128 | and the project dependencies and their ABOUT files have been uploaded to
129 | thirdparty.aboutcode.org/pypi, you can configure the project as needed, typically
130 | when you update dependencies or use a new checkout.
131 |
132 | If the virtual env for the project becomes polluted, or you would like to remove
133 | it, use the ``--clean`` option:
134 |
135 | .. code-block:: bash
136 |
137 | ./configure --clean
138 |
139 | Then you can run ``./configure`` again to set up the project virtual environment.
140 |
141 | To set up the project for development use:
142 |
143 | .. code-block:: bash
144 |
145 | ./configure --dev
146 |
147 | To update the project dependencies (adding, removing, updating packages, etc.),
148 | update the dependencies in ``setup.cfg``, then run:
149 |
150 | .. code-block:: bash
151 |
152 | ./configure --clean # Remove existing virtual environment
153 | source venv/bin/activate # Ensure virtual environment is activated
154 | python etc/scripts/gen_requirements.py -s venv/lib/python/site-packages/ # Regenerate requirements.txt
155 | python etc/scripts/gen_requirements_dev.py -s venv/lib/python/site-packages/ # Regenerate requirements-dev.txt
156 | pip install -r etc/scripts/requirements.txt # Install dependencies needed by etc/scripts/bootstrap.py
157 | python etc/scripts/fetch_thirdparty.py -r requirements.txt -r requirements-dev.txt # Collect dependency wheels and their ABOUT files
158 |
159 | Ensure that the generated ABOUT files are valid, then take the dependency wheels
160 | and ABOUT files and upload them to thirdparty.aboutcode.org/pypi.
161 |
--------------------------------------------------------------------------------
/docs/tutorial/build-patchelf.rst:
--------------------------------------------------------------------------------
1 | This mini tutorial guides you through a simple end to end build tracing.
2 |
3 | Setup system (on Debian)
4 | -----------------------------
5 |
6 | We need some basic packages first::
7 |
8 | sudo apt-get install python3 build-essentials strace graphviz
9 |
10 |
11 | Fetch archive and prepare for build:
12 | ---------------------------------------
13 |
14 | We use patchelf which is a simple GPL-license executable::
15 |
16 | wget https://github.com/NixOS/patchelf/archive/f34751b88bd07d7f44f5cd3200fb4122bf916c7e.tar.gz
17 | tar -xf patchelf-f34751b88bd07d7f44f5cd3200fb4122bf916c7e.tar.gz
18 | mv patchelf-f34751b88bd07d7f44f5cd3200fb4122bf916c7e patchelf-f34751
19 | cd patchelf-f34751/
20 | ./bootstrap.sh
21 | ./configure
22 | cd ..
23 |
24 |
25 | Fetch tracecode and configure
26 | ---------------------------------------
27 |
28 | git clone https://github.com/aboutcode-org/tracecode-toolkit-strace
29 | cd tracecode-toolkit-strace
30 | ./configure
31 | source venv/bin/activate
32 | cd ..
33 |
34 |
35 | Trace the build
36 | ------------------------
37 |
38 | ::
39 |
40 | cd patchelf-f34751/
41 | mkdir -p TRACE
42 | mkdir -p PARSED
43 |
44 | Run strace proper:
45 | ~~~~~~~~~~~~~~~~~~~
46 |
47 | Compile patchelf "under" strace::
48 |
49 | strace -ff -y -ttt -qq -a1 -o TRACE/patchelf-trace make
50 |
51 | Making all in src
52 | make[1]: Entering directory '/home/user/tracing/patchelf-f34751/src'
53 | g++ -DPACKAGE_NAME=\"patchelf\" -DPACKAGE_TARNAME=\"patchelf\" -DPACKAGE_VERSION=\"0.12\" -DPACKAGE_STRING=\"patchelf\ 0.12\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"patchelf\" -DVERSION=\"0.12\" -I. -Wall -std=c++11 -D_FILE_OFFSET_BITS=64 -g -O2 -MT patchelf.o -MD -MP -MF .deps/patchelf.Tpo -c -o patchelf.o patchelf.cc
54 | mv -f .deps/patchelf.Tpo .deps/patchelf.Po
55 | g++ -Wall -std=c++11 -D_FILE_OFFSET_BITS=64 -g -O2 -o patchelf patchelf.o
56 | make[1]: Leaving directory '/home/user/tracing/patchelf-f34751/src'
57 | Making all in tests
58 | make[1]: Entering directory '/home/user/tracing/patchelf-f34751/tests'
59 | make[1]: Nothing to be done for 'all'.
60 | make[1]: Leaving directory '/home/user/tracing/patchelf-f34751/tests'
61 | make[1]: Entering directory '/home/user/tracing/patchelf-f34751'
62 | make[1]: Nothing to be done for 'all-am'.
63 | make[1]: Leaving directory '/home/user/tracing/patchelf-f34751'
64 |
65 |
66 | Check the trace files:
67 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 |
69 | ::
70 |
71 | ls -al TRACE/ | wc -l
72 | 22
73 |
74 |
75 | Process the build trace
76 | ----------------------------
77 |
78 | ::
79 |
80 | tracecode parse TRACE/ PARSED/
81 | INFO:tracecode:Processing traces with cwd: None, input_dir: '/home/user/tracing/patchelf-f34751/TRACE', output_dir: '/home/user/tracing/patchelf-f34751/PARSED'.
82 | INFO:tracecode:validate_traces: Found 19 traces with root pid: 26598.
83 | INFO:tracecode:validate_traces: Oldest pid: 26598.
84 | INFO:tracecode:validate_traces: Smallest pid: 26598.
85 | INFO:tracecode:Queuing trace of pid 26598 for parsing. Left to do: 18
86 | INFO:tracecode:Queuing trace of pid 26599 for parsing. Left to do: 17
87 | INFO:tracecode:Queuing trace of pid 26600 for parsing. Left to do: 16
88 | INFO:tracecode:Queuing trace of pid 26601 for parsing. Left to do: 15
89 | INFO:tracecode:Queuing trace of pid 26604 for parsing. Left to do: 14
90 | INFO:tracecode:Queuing trace of pid 26620 for parsing. Left to do: 13
91 | INFO:tracecode:Queuing trace of pid 26622 for parsing. Left to do: 12
92 | INFO:tracecode:Queuing trace of pid 26602 for parsing. Left to do: 11
93 | INFO:tracecode:Queuing trace of pid 26603 for parsing. Left to do: 10
94 | INFO:tracecode:Queuing trace of pid 26605 for parsing. Left to do: 9
95 | INFO:tracecode:Queuing trace of pid 26621 for parsing. Left to do: 8
96 | INFO:tracecode:Queuing trace of pid 26606 for parsing. Left to do: 7
97 | INFO:tracecode:Queuing trace of pid 26613 for parsing. Left to do: 6
98 | INFO:tracecode:Queuing trace of pid 26614 for parsing. Left to do: 5
99 | INFO:tracecode:Queuing trace of pid 26615 for parsing. Left to do: 4
100 | INFO:tracecode:Queuing trace of pid 26616 for parsing. Left to do: 3
101 | INFO:tracecode:Queuing trace of pid 26607 for parsing. Left to do: 2
102 | INFO:tracecode:Queuing trace of pid 26612 for parsing. Left to do: 1
103 | INFO:tracecode:Queuing trace of pid 26617 for parsing. Left to do: 0
104 | INFO:tracecode:All 19 traces queued for parsing in 0.14 seconds.
105 | INFO:tracecode:Filtering and saving cleaned traces to '/home/user/tracing/patchelf-f34751/PARSED'.
106 | INFO:tracecode:Applied filters to 19 traces in 0.00 seconds.
107 | INFO:tracecode:Filtered 1 empty traces from '/home/user/tracing/patchelf-f34751/PARSED' with 2 cycles in 0.00 seconds.
108 | INFO:tracecode:Processing completed in 0.85 seconds. All 19 traces parsed and saved to: "/home/user/tracing/patchelf-f34751/PARSED".
109 | INFO:tracecode:Completed in 0.86 seconds.
110 |
111 |
112 | Generate a PDF of the build graph::
113 |
114 | tracecode graphic PARSED/ patchelf-build-graph
115 | INFO:tracecode:Loading traces ...
116 | INFO:tracecode:Building graph ...
117 | INFO:tracecode:Building subgraph for None...
118 | INFO:tracecode:Building and saving graphic file ...
119 | INFO:tracecode:Completed in 0.22 seconds.
120 |
121 |
122 | Now open patchelf-build-graph.pdf to display the build graph.
123 | This is also availabel in this directory as patchelf-build-graph.pdf
124 |
125 |
126 |
127 |
--------------------------------------------------------------------------------
/docs/tutorial/patchelf-build-graph.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/docs/tutorial/patchelf-build-graph.pdf
--------------------------------------------------------------------------------
/etc/ci/azure-container-deb.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | job_name: ''
3 | container: ''
4 | python_path: ''
5 | python_version: ''
6 | package_manager: apt-get
7 | install_python: ''
8 | install_packages: |
9 | set -e -x
10 | sudo apt-get -y update
11 | sudo apt-get -y install \
12 | build-essential \
13 | xz-utils zlib1g bzip2 libbz2-1.0 tar \
14 | sqlite3 libxml2-dev libxslt1-dev \
15 | software-properties-common openssl
16 | test_suite: ''
17 | test_suite_label: ''
18 |
19 |
20 | jobs:
21 | - job: ${{ parameters.job_name }}
22 |
23 | pool:
24 | vmImage: 'ubuntu-16.04'
25 |
26 | container:
27 | image: ${{ parameters.container }}
28 | options: '--name ${{ parameters.job_name }} -e LANG=C.UTF-8 -e LC_ALL=C.UTF-8 -v /usr/bin/docker:/tmp/docker:ro'
29 |
30 | steps:
31 | - checkout: self
32 | fetchDepth: 10
33 |
34 | - script: /tmp/docker exec -t -e LANG=C.UTF-8 -e LC_ALL=C.UTF-8 -u 0 ${{ parameters.job_name }} $(Build.SourcesDirectory)/etc/ci/install_sudo.sh ${{ parameters.package_manager }}
35 | displayName: Install sudo
36 |
37 | - script: ${{ parameters.install_packages }}
38 | displayName: Install required packages
39 |
40 | - script: ${{ parameters.install_python }}
41 | displayName: 'Install Python ${{ parameters.python_version }}'
42 |
43 | - script: ${{ parameters.python_path }} --version
44 | displayName: 'Show Python version'
45 |
46 | - script: PYTHON_EXE=${{ parameters.python_path }} ./configure --dev
47 | displayName: 'Run Configure'
48 |
49 | - script: ${{ parameters.test_suite }}
50 | displayName: 'Run ${{ parameters.test_suite_label }} tests with py${{ parameters.python_version }} on ${{ parameters.job_name }}'
51 |
--------------------------------------------------------------------------------
/etc/ci/azure-container-rpm.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | job_name: ''
3 | image_name: 'ubuntu-16.04'
4 | container: ''
5 | python_path: ''
6 | python_version: ''
7 | package_manager: yum
8 | install_python: ''
9 | install_packages: |
10 | set -e -x
11 | sudo yum groupinstall -y "Development Tools"
12 | sudo yum install -y \
13 | openssl openssl-devel \
14 | sqlite-devel zlib-devel xz-devel bzip2-devel \
15 | bzip2 tar unzip zip \
16 | libxml2-devel libxslt-devel
17 | test_suite: ''
18 | test_suite_label: ''
19 |
20 |
21 | jobs:
22 | - job: ${{ parameters.job_name }}
23 |
24 | pool:
25 | vmImage: ${{ parameters.image_name }}
26 |
27 | container:
28 | image: ${{ parameters.container }}
29 | options: '--name ${{ parameters.job_name }} -e LANG=C.UTF-8 -e LC_ALL=C.UTF-8 -v /usr/bin/docker:/tmp/docker:ro'
30 |
31 | steps:
32 | - checkout: self
33 | fetchDepth: 10
34 |
35 | - script: /tmp/docker exec -t -e LANG=C.UTF-8 -e LC_ALL=C.UTF-8 -u 0 ${{ parameters.job_name }} $(Build.SourcesDirectory)/etc/ci/install_sudo.sh ${{ parameters.package_manager }}
36 | displayName: Install sudo
37 |
38 | - script: ${{ parameters.install_packages }}
39 | displayName: Install required packages
40 |
41 | - script: ${{ parameters.install_python }}
42 | displayName: 'Install Python ${{ parameters.python_version }}'
43 |
44 | - script: ${{ parameters.python_path }} --version
45 | displayName: 'Show Python version'
46 |
47 | - script: PYTHON_EXE=${{ parameters.python_path }} ./configure --dev
48 | displayName: 'Run Configure'
49 |
50 | - script: ${{ parameters.test_suite }}
51 | displayName: 'Run ${{ parameters.test_suite_label }} tests with py${{ parameters.python_version }} on ${{ parameters.job_name }}'
52 |
--------------------------------------------------------------------------------
/etc/ci/azure-posix.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | job_name: ''
3 | image_name: ''
4 | python_versions: []
5 | test_suites: {}
6 | python_architecture: x64
7 |
8 | jobs:
9 | - job: ${{ parameters.job_name }}
10 |
11 | pool:
12 | vmImage: ${{ parameters.image_name }}
13 |
14 | strategy:
15 | matrix:
16 | ${{ each tsuite in parameters.test_suites }}:
17 | ${{ tsuite.key }}:
18 | test_suite_label: ${{ tsuite.key }}
19 | test_suite: ${{ tsuite.value }}
20 |
21 | steps:
22 | - checkout: self
23 | fetchDepth: 10
24 |
25 | - ${{ each pyver in parameters.python_versions }}:
26 | - task: UsePythonVersion@0
27 | inputs:
28 | versionSpec: '${{ pyver }}'
29 | architecture: '${{ parameters.python_architecture }}'
30 | displayName: '${{ pyver }} - Install Python'
31 |
32 | - script: |
33 | python${{ pyver }} --version
34 | echo "python${{ pyver }}" > PYTHON_EXECUTABLE
35 | ./configure --clean && ./configure --dev
36 | displayName: '${{ pyver }} - Configure'
37 |
38 | - script: $(test_suite)
39 | displayName: '${{ pyver }} - $(test_suite_label) on ${{ parameters.job_name }}'
40 |
--------------------------------------------------------------------------------
/etc/ci/azure-win.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | job_name: ''
3 | image_name: ''
4 | python_versions: []
5 | test_suites: {}
6 | python_architecture: x64
7 |
8 | jobs:
9 | - job: ${{ parameters.job_name }}
10 |
11 | pool:
12 | vmImage: ${{ parameters.image_name }}
13 |
14 | strategy:
15 | matrix:
16 | ${{ each tsuite in parameters.test_suites }}:
17 | ${{ tsuite.key }}:
18 | test_suite_label: ${{ tsuite.key }}
19 | test_suite: ${{ tsuite.value }}
20 |
21 | steps:
22 | - checkout: self
23 | fetchDepth: 10
24 |
25 | - ${{ each pyver in parameters.python_versions }}:
26 | - task: UsePythonVersion@0
27 | inputs:
28 | versionSpec: '${{ pyver }}'
29 | architecture: '${{ parameters.python_architecture }}'
30 | displayName: '${{ pyver }} - Install Python'
31 |
32 | - script: |
33 | python --version
34 | echo | set /p=python> PYTHON_EXECUTABLE
35 | configure --clean && configure --dev
36 | displayName: '${{ pyver }} - Configure'
37 |
38 | - script: $(test_suite)
39 | displayName: '${{ pyver }} - $(test_suite_label) on ${{ parameters.job_name }}'
40 |
--------------------------------------------------------------------------------
/etc/ci/install_sudo.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 |
4 |
5 | if [[ "$1" == "apt-get" ]]; then
6 | apt-get update -y
7 | apt-get -o DPkg::Options::="--force-confold" install -y sudo
8 |
9 | elif [[ "$1" == "yum" ]]; then
10 | yum install -y sudo
11 |
12 | elif [[ "$1" == "dnf" ]]; then
13 | dnf install -y sudo
14 |
15 | fi
16 |
--------------------------------------------------------------------------------
/etc/ci/macports-ci.ABOUT:
--------------------------------------------------------------------------------
1 | about_resource: macports-ci
2 | name: macports-ci
3 | version: c9676e67351a3a519e37437e196cd0ee9c2180b8
4 | download_url: https://raw.githubusercontent.com/GiovanniBussi/macports-ci/c9676e67351a3a519e37437e196cd0ee9c2180b8/macports-ci
5 | description: Simplify MacPorts setup on Travis-CI
6 | homepage_url: https://github.com/GiovanniBussi/macports-ci
7 | license_expression: mit
8 | copyright: Copyright (c) Giovanni Bussi
9 | attribute: yes
10 | checksum_md5: 5d31d479132502f80acdaed78bed9e23
11 | checksum_sha1: 74b15643bd1a528d91b4a7c2169c6fc656f549c2
12 | package_url: pkg:github/giovannibussi/macports-ci@c9676e67351a3a519e37437e196cd0ee9c2180b8#macports-ci
13 | licenses:
14 | - key: mit
15 | name: MIT License
16 | file: mit.LICENSE
17 |
--------------------------------------------------------------------------------
/etc/ci/mit.LICENSE:
--------------------------------------------------------------------------------
1 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2 |
3 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
4 |
5 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/etc/scripts/README.rst:
--------------------------------------------------------------------------------
1 | This directory contains the tools to manage a directory of thirdparty Python
2 | package source, wheels and metadata pin, build, update, document and publish to
3 | a PyPI-like repo (GitHub release).
4 |
5 | NOTE: These are tested to run ONLY on Linux.
6 |
7 |
8 | Thirdparty packages management scripts
9 | ======================================
10 |
11 | Pre-requisites
12 | --------------
13 |
14 | * There are two run "modes":
15 |
16 | * To generate or update pip requirement files, you need to start with a clean
17 | virtualenv as instructed below (This is to avoid injecting requirements
18 | specific to the tools used here in the main requirements).
19 |
20 | * For other usages, the tools here can run either in their own isolated
21 | virtualenv or in the the main configured development virtualenv.
22 | These requireements need to be installed::
23 |
24 | pip install --requirement etc/scripts/requirements.txt
25 |
26 | TODO: we need to pin the versions of these tools
27 |
28 |
29 |
30 | Generate or update pip requirement files
31 | ----------------------------------------
32 |
33 | Scripts
34 | ~~~~~~~
35 |
36 | **gen_requirements.py**: create/update requirements files from currently
37 | installed requirements.
38 |
39 | **gen_requirements_dev.py** does the same but can subtract the main requirements
40 | to get extra requirements used in only development.
41 |
42 |
43 | Usage
44 | ~~~~~
45 |
46 | The sequence of commands to run are:
47 |
48 |
49 | * Start with these to generate the main pip requirements file::
50 |
51 | ./configure --clean
52 | ./configure
53 | python etc/scripts/gen_requirements.py --site-packages-dir
54 |
55 | * You can optionally install or update extra main requirements after the
56 | ./configure step such that these are included in the generated main requirements.
57 |
58 | * Optionally, generate a development pip requirements file by running these::
59 |
60 | ./configure --clean
61 | ./configure --dev
62 | python etc/scripts/gen_requirements_dev.py --site-packages-dir
63 |
64 | * You can optionally install or update extra dev requirements after the
65 | ./configure step such that these are included in the generated dev
66 | requirements.
67 |
68 | Notes: we generate development requirements after the main as this step requires
69 | the main requirements.txt to be up-to-date first. See **gen_requirements.py and
70 | gen_requirements_dev.py** --help for details.
71 |
72 | Note: this does NOT hash requirements for now.
73 |
74 | Note: Be aware that if you are using "conditional" requirements (e.g. only for
75 | OS or Python versions) in setup.py/setp.cfg/requirements.txt as these are NOT
76 | yet supported.
77 |
78 |
79 | Populate a thirdparty directory with wheels, sources, .ABOUT and license files
80 | ------------------------------------------------------------------------------
81 |
82 | Scripts
83 | ~~~~~~~
84 |
85 | * **fetch_thirdparty.py** will fetch package wheels, source sdist tarballs
86 | and their ABOUT, LICENSE and NOTICE files to populate a local directory from
87 | a list of PyPI simple URLs (typically PyPI.org proper and our self-hosted PyPI)
88 | using pip requirements file(s), specifiers or pre-existing packages files.
89 | Fetch wheels for specific python version and operating system combinations.
90 |
91 | * **check_thirdparty.py** will check a thirdparty directory for errors.
92 |
93 |
94 | Upgrade virtualenv app
95 | ----------------------
96 |
97 | The bundled virtualenv.pyz has to be upgraded by hand and is stored under
98 | etc/thirdparty
99 |
100 | * Fetch https://github.com/pypa/get-virtualenv/raw//public/virtualenv.pyz
101 | for instance https://github.com/pypa/get-virtualenv/raw/20.2.2/public/virtualenv.pyz
102 | and save to thirdparty and update the ABOUT and LICENSE files as needed.
103 |
104 | * This virtualenv app contains also bundled pip, wheel and setuptools that are
105 | essential for the installation to work.
106 |
107 |
108 | Other files
109 | ===========
110 |
111 | The other files and scripts are test, support and utility modules used by the
112 | main scripts documented here.
113 |
--------------------------------------------------------------------------------
/etc/scripts/check_thirdparty.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 | #
4 | # Copyright (c) nexB Inc. and others. All rights reserved.
5 | # ScanCode is a trademark of nexB Inc.
6 | # SPDX-License-Identifier: Apache-2.0
7 | # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8 | # See https://github.com/aboutcode-org/skeleton for support or download.
9 | # See https://aboutcode.org for more information about nexB OSS projects.
10 | #
11 | import click
12 |
13 | import utils_thirdparty
14 |
15 |
16 | @click.command()
17 | @click.option(
18 | "-d",
19 | "--dest",
20 | type=click.Path(exists=True, readable=True,
21 | path_type=str, file_okay=False),
22 | required=True,
23 | help="Path to the thirdparty directory to check.",
24 | )
25 | @click.option(
26 | "-w",
27 | "--wheels",
28 | is_flag=True,
29 | help="Check missing wheels.",
30 | )
31 | @click.option(
32 | "-s",
33 | "--sdists",
34 | is_flag=True,
35 | help="Check missing source sdists tarballs.",
36 | )
37 | @click.help_option("-h", "--help")
38 | def check_thirdparty_dir(
39 | dest,
40 | wheels,
41 | sdists,
42 | ):
43 | """
44 | Check a thirdparty directory for problems and print these on screen.
45 | """
46 | # check for problems
47 | print(f"==> CHECK FOR PROBLEMS")
48 | utils_thirdparty.find_problems(
49 | dest_dir=dest,
50 | report_missing_sources=sdists,
51 | report_missing_wheels=wheels,
52 | )
53 |
54 |
55 | if __name__ == "__main__":
56 | check_thirdparty_dir()
57 |
--------------------------------------------------------------------------------
/etc/scripts/gen_pypi_simple.py.ABOUT:
--------------------------------------------------------------------------------
1 | about_resource: gen_pypi_simple.py
2 | name: gen_pypi_simple.py
3 | license_expression: bsd-2-clause-views and mit
4 | copyright: Copyright (c) nexB Inc.
5 | Copyright (c) 2010 David Wolever
6 | Copyright (c) The pip developers
7 | notes: Originally from https://github.com/wolever/pip2pi and modified extensivley
8 | Also partially derived from pip code
9 |
--------------------------------------------------------------------------------
/etc/scripts/gen_pypi_simple.py.NOTICE:
--------------------------------------------------------------------------------
1 | SPDX-License-Identifier: BSD-2-Clause-Views AND mit
2 |
3 | Copyright (c) nexB Inc.
4 | Copyright (c) 2010 David Wolever
5 | Copyright (c) The pip developers
6 |
7 |
8 | Original code: copyright 2010 David Wolever . All rights reserved.
9 |
10 | Redistribution and use in source and binary forms, with or without
11 | modification, are permitted provided that the following conditions are met:
12 |
13 | 1. Redistributions of source code must retain the above copyright notice,
14 | this list of conditions and the following disclaimer.
15 |
16 | 2. Redistributions in binary form must reproduce the above copyright notice,
17 | this list of conditions and the following disclaimer in the documentation
18 | and/or other materials provided with the distribution.
19 |
20 | THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND ANY EXPRESS OR
21 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
22 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
23 | EVENT SHALL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
28 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
29 | ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 |
31 | The views and conclusions contained in the software and documentation are those
32 | of the authors and should not be interpreted as representing official policies,
33 | either expressed or implied, of David Wolever.
34 |
35 |
36 | Original code: Copyright (c) 2008-2020 The pip developers
37 |
38 | Permission is hereby granted, free of charge, to any person obtaining
39 | a copy of this software and associated documentation files (the
40 | "Software"), to deal in the Software without restriction, including
41 | without limitation the rights to use, copy, modify, merge, publish,
42 | distribute, sublicense, and/or sell copies of the Software, and to
43 | permit persons to whom the Software is furnished to do so, subject to
44 | the following conditions:
45 |
46 | The above copyright notice and this permission notice shall be
47 | included in all copies or substantial portions of the Software.
48 |
49 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
50 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
51 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
52 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
53 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
54 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
55 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
56 |
57 |
--------------------------------------------------------------------------------
/etc/scripts/gen_requirements.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 | #
4 | # Copyright (c) nexB Inc. and others. All rights reserved.
5 | # ScanCode is a trademark of nexB Inc.
6 | # SPDX-License-Identifier: Apache-2.0
7 | # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8 | # See https://github.com/aboutcode-org/skeleton for support or download.
9 | # See https://aboutcode.org for more information about nexB OSS projects.
10 | #
11 | import argparse
12 | import pathlib
13 |
14 | import utils_requirements
15 |
16 | """
17 | Utilities to manage requirements files.
18 | NOTE: this should use ONLY the standard library and not import anything else
19 | because this is used for boostrapping with no requirements installed.
20 | """
21 |
22 |
23 | def gen_requirements():
24 | description = """
25 | Create or replace the `--requirements-file` file FILE requirements file with all
26 | locally installed Python packages.all Python packages found installed in `--site-packages-dir`
27 | """
28 | parser = argparse.ArgumentParser(description=description)
29 |
30 | parser.add_argument(
31 | "-s",
32 | "--site-packages-dir",
33 | dest="site_packages_dir",
34 | type=pathlib.Path,
35 | required=True,
36 | metavar="DIR",
37 | help="Path to the 'site-packages' directory where wheels are installed such as lib/python3.6/site-packages",
38 | )
39 | parser.add_argument(
40 | "-r",
41 | "--requirements-file",
42 | type=pathlib.Path,
43 | metavar="FILE",
44 | default="requirements.txt",
45 | help="Path to the requirements file to update or create.",
46 | )
47 |
48 | args = parser.parse_args()
49 |
50 | utils_requirements.lock_requirements(
51 | site_packages_dir=args.site_packages_dir,
52 | requirements_file=args.requirements_file,
53 | )
54 |
55 |
56 | if __name__ == "__main__":
57 | gen_requirements()
58 |
--------------------------------------------------------------------------------
/etc/scripts/gen_requirements_dev.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 | #
4 | # Copyright (c) nexB Inc. and others. All rights reserved.
5 | # ScanCode is a trademark of nexB Inc.
6 | # SPDX-License-Identifier: Apache-2.0
7 | # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8 | # See https://github.com/aboutcode-org/skeleton for support or download.
9 | # See https://aboutcode.org for more information about nexB OSS projects.
10 | #
11 | import argparse
12 | import pathlib
13 |
14 | import utils_requirements
15 |
16 | """
17 | Utilities to manage requirements files.
18 | NOTE: this should use ONLY the standard library and not import anything else
19 | because this is used for boostrapping with no requirements installed.
20 | """
21 |
22 |
23 | def gen_dev_requirements():
24 | description = """
25 | Create or overwrite the `--dev-requirements-file` pip requirements FILE with
26 | all Python packages found installed in `--site-packages-dir`. Exclude
27 | package names also listed in the --main-requirements-file pip requirements
28 | FILE (that are assume to the production requirements and therefore to always
29 | be present in addition to the development requirements).
30 | """
31 | parser = argparse.ArgumentParser(description=description)
32 |
33 | parser.add_argument(
34 | "-s",
35 | "--site-packages-dir",
36 | type=pathlib.Path,
37 | required=True,
38 | metavar="DIR",
39 | help='Path to the "site-packages" directory where wheels are installed such as lib/python3.6/site-packages',
40 | )
41 | parser.add_argument(
42 | "-d",
43 | "--dev-requirements-file",
44 | type=pathlib.Path,
45 | metavar="FILE",
46 | default="requirements-dev.txt",
47 | help="Path to the dev requirements file to update or create.",
48 | )
49 | parser.add_argument(
50 | "-r",
51 | "--main-requirements-file",
52 | type=pathlib.Path,
53 | default="requirements.txt",
54 | metavar="FILE",
55 | help="Path to the main requirements file. Its requirements will be excluded "
56 | "from the generated dev requirements.",
57 | )
58 | args = parser.parse_args()
59 |
60 | utils_requirements.lock_dev_requirements(
61 | dev_requirements_file=args.dev_requirements_file,
62 | main_requirements_file=args.main_requirements_file,
63 | site_packages_dir=args.site_packages_dir,
64 | )
65 |
66 |
67 | if __name__ == "__main__":
68 | gen_dev_requirements()
69 |
--------------------------------------------------------------------------------
/etc/scripts/requirements.txt:
--------------------------------------------------------------------------------
1 | aboutcode_toolkit
2 | attrs
3 | commoncode
4 | click
5 | requests
6 | saneyaml
7 | pip
8 | setuptools
9 | twine
10 | wheel
11 | build
12 | packvers
13 |
--------------------------------------------------------------------------------
/etc/scripts/test_utils_pip_compatibility_tags.py:
--------------------------------------------------------------------------------
1 | """Generate and work with PEP 425 Compatibility Tags.
2 |
3 | copied from pip-20.3.1 pip/tests/unit/test_utils_compatibility_tags.py
4 | download_url: https://raw.githubusercontent.com/pypa/pip/20.3.1/tests/unit/test_utils_compatibility_tags.py
5 |
6 | Copyright (c) 2008-2020 The pip developers (see AUTHORS.txt file)
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining
9 | a copy of this software and associated documentation files (the
10 | "Software"), to deal in the Software without restriction, including
11 | without limitation the rights to use, copy, modify, merge, publish,
12 | distribute, sublicense, and/or sell copies of the Software, and to
13 | permit persons to whom the Software is furnished to do so, subject to
14 | the following conditions:
15 |
16 | The above copyright notice and this permission notice shall be
17 | included in all copies or substantial portions of the Software.
18 |
19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 | """
27 |
28 | from unittest.mock import patch
29 | import sysconfig
30 |
31 | import pytest
32 |
33 | import utils_pip_compatibility_tags
34 |
35 |
36 | @pytest.mark.parametrize(
37 | "version_info, expected",
38 | [
39 | ((2,), "2"),
40 | ((2, 8), "28"),
41 | ((3,), "3"),
42 | ((3, 6), "36"),
43 | # Test a tuple of length 3.
44 | ((3, 6, 5), "36"),
45 | # Test a 2-digit minor version.
46 | ((3, 10), "310"),
47 | ],
48 | )
49 | def test_version_info_to_nodot(version_info, expected):
50 | actual = utils_pip_compatibility_tags.version_info_to_nodot(version_info)
51 | assert actual == expected
52 |
53 |
54 | class Testcompatibility_tags(object):
55 | def mock_get_config_var(self, **kwd):
56 | """
57 | Patch sysconfig.get_config_var for arbitrary keys.
58 | """
59 | get_config_var = sysconfig.get_config_var
60 |
61 | def _mock_get_config_var(var):
62 | if var in kwd:
63 | return kwd[var]
64 | return get_config_var(var)
65 |
66 | return _mock_get_config_var
67 |
68 | def test_no_hyphen_tag(self):
69 | """
70 | Test that no tag contains a hyphen.
71 | """
72 | import pip._internal.utils.compatibility_tags
73 |
74 | mock_gcf = self.mock_get_config_var(SOABI="cpython-35m-darwin")
75 |
76 | with patch("sysconfig.get_config_var", mock_gcf):
77 | supported = pip._internal.utils.compatibility_tags.get_supported()
78 |
79 | for tag in supported:
80 | assert "-" not in tag.interpreter
81 | assert "-" not in tag.abi
82 | assert "-" not in tag.platform
83 |
84 |
85 | class TestManylinux2010Tags(object):
86 | @pytest.mark.parametrize(
87 | "manylinux2010,manylinux1",
88 | [
89 | ("manylinux2010_x86_64", "manylinux1_x86_64"),
90 | ("manylinux2010_i686", "manylinux1_i686"),
91 | ],
92 | )
93 | def test_manylinux2010_implies_manylinux1(self, manylinux2010, manylinux1):
94 | """
95 | Specifying manylinux2010 implies manylinux1.
96 | """
97 | groups = {}
98 | supported = utils_pip_compatibility_tags.get_supported(platforms=[manylinux2010])
99 | for tag in supported:
100 | groups.setdefault((tag.interpreter, tag.abi), []).append(tag.platform)
101 |
102 | for arches in groups.values():
103 | if arches == ["any"]:
104 | continue
105 | assert arches[:2] == [manylinux2010, manylinux1]
106 |
107 |
108 | class TestManylinux2014Tags(object):
109 | @pytest.mark.parametrize(
110 | "manylinuxA,manylinuxB",
111 | [
112 | ("manylinux2014_x86_64", ["manylinux2010_x86_64", "manylinux1_x86_64"]),
113 | ("manylinux2014_i686", ["manylinux2010_i686", "manylinux1_i686"]),
114 | ],
115 | )
116 | def test_manylinuxA_implies_manylinuxB(self, manylinuxA, manylinuxB):
117 | """
118 | Specifying manylinux2014 implies manylinux2010/manylinux1.
119 | """
120 | groups = {}
121 | supported = utils_pip_compatibility_tags.get_supported(platforms=[manylinuxA])
122 | for tag in supported:
123 | groups.setdefault((tag.interpreter, tag.abi), []).append(tag.platform)
124 |
125 | expected_arches = [manylinuxA]
126 | expected_arches.extend(manylinuxB)
127 | for arches in groups.values():
128 | if arches == ["any"]:
129 | continue
130 | assert arches[:3] == expected_arches
131 |
--------------------------------------------------------------------------------
/etc/scripts/test_utils_pip_compatibility_tags.py.ABOUT:
--------------------------------------------------------------------------------
1 | about_resource: test_utils_pip_compatibility_tags.py
2 |
3 | type: github
4 | namespace: pypa
5 | name: pip
6 | version: 20.3.1
7 | subpath: tests/unit/test_utils_compatibility_tags.py
8 |
9 | package_url: pkg:github/pypa/pip@20.3.1#tests/unit/test_utils_compatibility_tags.py
10 |
11 | download_url: https://raw.githubusercontent.com/pypa/pip/20.3.1/tests/unit/test_utils_compatibility_tags.py
12 | copyright: Copyright (c) 2008-2020 The pip developers (see AUTHORS.txt file)
13 | license_expression: mit
14 | notes: subset copied from pip for tag handling
15 |
--------------------------------------------------------------------------------
/etc/scripts/test_utils_pypi_supported_tags.py:
--------------------------------------------------------------------------------
1 | # Licensed under the Apache License, Version 2.0 (the "License");
2 | # you may not use this file except in compliance with the License.
3 | # You may obtain a copy of the License at
4 | #
5 | # http://www.apache.org/licenses/LICENSE-2.0
6 | #
7 | # Unless required by applicable law or agreed to in writing, software
8 | # distributed under the License is distributed on an "AS IS" BASIS,
9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | # See the License for the specific language governing permissions and
11 | # limitations under the License.
12 |
13 | import pytest
14 |
15 | from utils_pypi_supported_tags import validate_platforms_for_pypi
16 |
17 | """
18 | Wheel platform checking tests
19 |
20 | Copied and modified on 2020-12-24 from
21 | https://github.com/pypa/warehouse/blob/37a83dd342d9e3b3ab4f6bde47ca30e6883e2c4d/tests/unit/forklift/test_legacy.py
22 | """
23 |
24 |
25 | def validate_wheel_filename_for_pypi(filename):
26 | """
27 | Validate if the filename is a PyPI/warehouse-uploadable wheel file name
28 | with supported platform tags. Return a list of unsupported platform tags or
29 | an empty list if all tags are supported.
30 | """
31 | from utils_thirdparty import Wheel
32 |
33 | wheel = Wheel.from_filename(filename)
34 | return validate_platforms_for_pypi(wheel.platforms)
35 |
36 |
37 | @pytest.mark.parametrize(
38 | "plat",
39 | [
40 | "any",
41 | "win32",
42 | "win_amd64",
43 | "win_ia64",
44 | "manylinux1_i686",
45 | "manylinux1_x86_64",
46 | "manylinux2010_i686",
47 | "manylinux2010_x86_64",
48 | "manylinux2014_i686",
49 | "manylinux2014_x86_64",
50 | "manylinux2014_aarch64",
51 | "manylinux2014_armv7l",
52 | "manylinux2014_ppc64",
53 | "manylinux2014_ppc64le",
54 | "manylinux2014_s390x",
55 | "manylinux_2_5_i686",
56 | "manylinux_2_12_x86_64",
57 | "manylinux_2_17_aarch64",
58 | "manylinux_2_17_armv7l",
59 | "manylinux_2_17_ppc64",
60 | "manylinux_2_17_ppc64le",
61 | "manylinux_3_0_s390x",
62 | "macosx_10_6_intel",
63 | "macosx_10_13_x86_64",
64 | "macosx_11_0_x86_64",
65 | "macosx_10_15_arm64",
66 | "macosx_11_10_universal2",
67 | # A real tag used by e.g. some numpy wheels
68 | (
69 | "macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64."
70 | "macosx_10_10_intel.macosx_10_10_x86_64"
71 | ),
72 | ],
73 | )
74 | def test_is_valid_pypi_wheel_return_true_for_supported_wheel(plat):
75 | filename = f"foo-1.2.3-cp34-none-{plat}.whl"
76 | assert not validate_wheel_filename_for_pypi(filename)
77 |
78 |
79 | @pytest.mark.parametrize(
80 | "plat",
81 | [
82 | "linux_x86_64",
83 | "linux_x86_64.win32",
84 | "macosx_9_2_x86_64",
85 | "macosx_12_2_arm64",
86 | "macosx_10_15_amd64",
87 | ],
88 | )
89 | def test_is_valid_pypi_wheel_raise_exception_for_aunsupported_wheel(plat):
90 | filename = f"foo-1.2.3-cp34-none-{plat}.whl"
91 | invalid = validate_wheel_filename_for_pypi(filename)
92 | assert invalid
93 |
--------------------------------------------------------------------------------
/etc/scripts/test_utils_pypi_supported_tags.py.ABOUT:
--------------------------------------------------------------------------------
1 | about_resource: test_utils_pypi_supported_tags.py
2 |
3 | type: github
4 | namespace: pypa
5 | name: warehouse
6 | version: 37a83dd342d9e3b3ab4f6bde47ca30e6883e2c4d
7 | subpath: tests/unit/forklift/test_legacy.py
8 |
9 | package_url: pkg:github/pypa/warehouse@37a83dd342d9e3b3ab4f6bde47ca30e6883e2c4d#tests/unit/forklift/test_legacy.py
10 |
11 | download_url: https://github.com/pypa/warehouse/blob/37a83dd342d9e3b3ab4f6bde47ca30e6883e2c4d/tests/unit/forklift/test_legacy.py
12 | copyright: Copyright (c) The warehouse developers
13 | homepage_url: https://warehouse.readthedocs.io
14 | license_expression: apache-2.0
15 | notes: Test for wheel platform checking copied and heavily modified on
16 | 2020-12-24 from warehouse. This contains the basic functions to check if a
17 | wheel file name is would be supported for uploading to PyPI.
18 |
--------------------------------------------------------------------------------
/etc/scripts/utils_pip_compatibility_tags.py.ABOUT:
--------------------------------------------------------------------------------
1 | about_resource: utils_pip_compatibility_tags.py
2 |
3 | type: github
4 | namespace: pypa
5 | name: pip
6 | version: 20.3.1
7 | subpath: src/pip/_internal/utils/compatibility_tags.py
8 |
9 | package_url: pkg:github/pypa/pip@20.3.1#src/pip/_internal/utils/compatibility_tags.py
10 |
11 | download_url: https://github.com/pypa/pip/blob/20.3.1/src/pip/_internal/utils/compatibility_tags.py
12 | copyright: Copyright (c) 2008-2020 The pip developers (see AUTHORS.txt file)
13 | license_expression: mit
14 | notes: subset copied from pip for tag handling
--------------------------------------------------------------------------------
/etc/scripts/utils_pypi_supported_tags.py:
--------------------------------------------------------------------------------
1 | # Licensed under the Apache License, Version 2.0 (the "License");
2 | # you may not use this file except in compliance with the License.
3 | # You may obtain a copy of the License at
4 | #
5 | # http://www.apache.org/licenses/LICENSE-2.0
6 | #
7 | # Unless required by applicable law or agreed to in writing, software
8 | # distributed under the License is distributed on an "AS IS" BASIS,
9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | # See the License for the specific language governing permissions and
11 | # limitations under the License.
12 |
13 | import re
14 |
15 | """
16 | Wheel platform checking
17 |
18 | Copied and modified on 2020-12-24 from
19 | https://github.com/pypa/warehouse/blob/37a83dd342d9e3b3ab4f6bde47ca30e6883e2c4d/warehouse/forklift/legacy.py
20 |
21 | This contains the basic functions to check if a wheel file name is would be
22 | supported for uploading to PyPI.
23 | """
24 |
25 | # These platforms can be handled by a simple static list:
26 | _allowed_platforms = {
27 | "any",
28 | "win32",
29 | "win_amd64",
30 | "win_ia64",
31 | "manylinux1_x86_64",
32 | "manylinux1_i686",
33 | "manylinux2010_x86_64",
34 | "manylinux2010_i686",
35 | "manylinux2014_x86_64",
36 | "manylinux2014_i686",
37 | "manylinux2014_aarch64",
38 | "manylinux2014_armv7l",
39 | "manylinux2014_ppc64",
40 | "manylinux2014_ppc64le",
41 | "manylinux2014_s390x",
42 | "linux_armv6l",
43 | "linux_armv7l",
44 | }
45 | # macosx is a little more complicated:
46 | _macosx_platform_re = re.compile(r"macosx_(?P\d+)_(\d+)_(?P.*)")
47 | _macosx_arches = {
48 | "ppc",
49 | "ppc64",
50 | "i386",
51 | "x86_64",
52 | "arm64",
53 | "intel",
54 | "fat",
55 | "fat32",
56 | "fat64",
57 | "universal",
58 | "universal2",
59 | }
60 | _macosx_major_versions = {
61 | "10",
62 | "11",
63 | }
64 |
65 | # manylinux pep600 is a little more complicated:
66 | _manylinux_platform_re = re.compile(r"manylinux_(\d+)_(\d+)_(?P.*)")
67 | _manylinux_arches = {
68 | "x86_64",
69 | "i686",
70 | "aarch64",
71 | "armv7l",
72 | "ppc64",
73 | "ppc64le",
74 | "s390x",
75 | }
76 |
77 |
78 | def is_supported_platform_tag(platform_tag):
79 | """
80 | Return True if the ``platform_tag`` is supported on PyPI.
81 | """
82 | if platform_tag in _allowed_platforms:
83 | return True
84 | m = _macosx_platform_re.match(platform_tag)
85 | if m and m.group("major") in _macosx_major_versions and m.group("arch") in _macosx_arches:
86 | return True
87 | m = _manylinux_platform_re.match(platform_tag)
88 | if m and m.group("arch") in _manylinux_arches:
89 | return True
90 | return False
91 |
92 |
93 | def validate_platforms_for_pypi(platforms):
94 | """
95 | Validate if the wheel platforms are supported platform tags on Pypi. Return
96 | a list of unsupported platform tags or an empty list if all tags are
97 | supported.
98 | """
99 |
100 | # Check that if it's a binary wheel, it's on a supported platform
101 | invalid_tags = []
102 | for plat in platforms:
103 | if not is_supported_platform_tag(plat):
104 | invalid_tags.append(plat)
105 | return invalid_tags
106 |
--------------------------------------------------------------------------------
/etc/scripts/utils_pypi_supported_tags.py.ABOUT:
--------------------------------------------------------------------------------
1 | about_resource: utils_pypi_supported_tags.py
2 |
3 | type: github
4 | namespace: pypa
5 | name: warehouse
6 | version: 37a83dd342d9e3b3ab4f6bde47ca30e6883e2c4d
7 | subpath: warehouse/forklift/legacy.py
8 |
9 | package_url: pkg:github/pypa/warehouse@37a83dd342d9e3b3ab4f6bde47ca30e6883e2c4d#warehouse/forklift/legacy.py
10 |
11 | download_url: https://github.com/pypa/warehouse/blob/37a83dd342d9e3b3ab4f6bde47ca30e6883e2c4d/warehouse/forklift/legacy.py
12 | copyright: Copyright (c) The warehouse developers
13 | homepage_url: https://warehouse.readthedocs.io
14 | license_expression: apache-2.0
15 | notes: Wheel platform checking copied and heavily modified on 2020-12-24 from
16 | warehouse. This contains the basic functions to check if a wheel file name is
17 | would be supported for uploading to PyPI.
18 |
--------------------------------------------------------------------------------
/etc/scripts/utils_thirdparty.py.ABOUT:
--------------------------------------------------------------------------------
1 | about_resource: utils_thirdparty.py
2 | package_url: pkg:github.com/pypa/pip/@20.3.1#src/pip/_internal/models/wheel.py
3 | type: github
4 | namespace: pypa
5 | name: pip
6 | version: 20.3.1
7 | subpath: src/pip/_internal/models/wheel.py
8 |
9 | download_url: https://github.com/pypa/pip/blob/20.3.1/src/pip/_internal/models/wheel.py
10 | copyright: Copyright (c) 2008-2020 The pip developers (see AUTHORS.txt file)
11 | license_expression: mit
12 | notes: copied from pip-20.3.1 pip/_internal/models/wheel.py
13 | The models code has been heavily inspired from the ISC-licensed packaging-dists
14 | https://github.com/uranusjr/packaging-dists by Tzu-ping Chung
15 |
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 | requires = ["setuptools >= 50", "wheel", "setuptools_scm[toml] >= 6"]
3 | build-backend = "setuptools.build_meta"
4 |
5 | [tool.setuptools_scm]
6 | # this is used populated when creating a git archive
7 | # and when there is .git dir and/or there is no git installed
8 | fallback_version = "9999.9999.999rc1"
9 |
10 | [tool.pytest.ini_options]
11 | norecursedirs = [
12 | ".git",
13 | "bin",
14 | "dist",
15 | "build",
16 | "_build",
17 | "dist",
18 | "etc",
19 | "local",
20 | "ci",
21 | "docs",
22 | "man",
23 | "share",
24 | "samples",
25 | ".cache",
26 | ".settings",
27 | "Include",
28 | "include",
29 | "Lib",
30 | "lib",
31 | "lib64",
32 | "Lib64",
33 | "Scripts",
34 | "thirdparty",
35 | "tmp",
36 | "venv",
37 | "tests/data",
38 | ".eggs",
39 | "src/*/data",
40 | "tests/*/data"
41 | ]
42 |
43 | python_files = "*.py"
44 |
45 | python_classes = "Test"
46 | python_functions = "test"
47 |
48 | addopts = [
49 | "-rfExXw",
50 | "--strict-markers",
51 | "--doctest-modules"
52 | ]
53 |
54 | [tool.black]
55 | line-length = 100
56 | include = '\.pyi?$'
57 | skip_gitignore = true
58 | extend-exclude = "migrations|data|venv"
59 |
60 | [tool.isort]
61 | profile = "black"
62 | line_length = 100
63 | force_single_line = true
64 | skip_gitignore = true
65 |
--------------------------------------------------------------------------------
/requirements-dev.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/requirements-dev.txt
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | #altgraph==0.17.3
2 | #docopt==0.6.2
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [metadata]
2 | name = tracecode-toolkit-strace
3 | license = Apache-2.0
4 |
5 | # description must be on ONE line https://github.com/pypa/setuptools/issues/1390
6 | description = TraceCode toolkit "strace" is dynamic build tracer and grapher
7 | long_description = file:README.rst
8 | long_description_content_type = text/x-rst
9 | url = https://github.com/aboutcode-org/tracecode-toolkit-strace
10 |
11 | author = nexB. Inc. and others
12 | author_email = info@aboutcode.org
13 |
14 | classifiers =
15 | Development Status :: 4 - Beta
16 | Intended Audience :: Developers
17 | Programming Language :: Python :: 3
18 | Programming Language :: Python :: 3 :: Only
19 | Topic :: Software Development
20 | Topic :: Utilities
21 |
22 | keywords =
23 | utilities
24 | tracecode
25 | strace
26 | tracing
27 | build
28 | scancode
29 |
30 | license_files =
31 | apache-2.0.LICENSE
32 | NOTICE
33 | AUTHORS.rst
34 | CHANGELOG.rst
35 | CODE_OF_CONDUCT.rst
36 |
37 | [options]
38 | package_dir =
39 | =src
40 | packages = find:
41 | include_package_data = true
42 | zip_safe = false
43 |
44 | setup_requires = setuptools_scm[toml] >= 4
45 |
46 | python_requires = >=3.7
47 |
48 | #install_requires =
49 | # altgraph
50 | # docopt
51 |
52 | [options.packages.find]
53 | where = src
54 |
55 |
56 | [options.extras_require]
57 | testing =
58 | pytest >= 6, != 7.0.0
59 | pytest-xdist >= 2
60 | aboutcode-toolkit >= 7.0.2
61 | twine
62 | black
63 | isort
64 | vendorize
65 |
66 | docs =
67 | Sphinx >= 3.3.1
68 | sphinx-rtd-theme >= 0.5.0
69 | doc8 >= 0.8.1
70 |
71 | [options.entry_points]
72 | console_scripts =
73 | tracecode = tracecode.tracecode:cli
74 |
75 |
76 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | import setuptools
4 |
5 | if __name__ == "__main__":
6 | setuptools.setup()
7 |
--------------------------------------------------------------------------------
/src/tracecode/__init__.py:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) nexB Inc. and others. All rights reserved.
3 | # ScanCode is a trademark of nexB Inc.
4 | # SPDX-License-Identifier: Apache-2.0
5 | # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6 | # See https://github.com/aboutcode-org/tracecode-toolkit-strace for support or download.
7 | # See https://aboutcode.org for more information about nexB OSS projects.
8 | #
9 |
10 | __version__ = "0.20.1"
11 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/src/tracecode/_vendor/__init__.py
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph-0.17.3.dist-info/INSTALLER:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph-0.17.3.dist-info/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2004 Istvan Albert unless otherwise noted.
2 | Copyright (c) 2006-2010 Bob Ippolito
3 | Copyright (2) 2010-2020 Ronald Oussoren, et. al.
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to
7 | deal in the Software without restriction, including without limitation the
8 | rights to use, copy, modify, merge, publish, distribute, sublicense,
9 | and/or sell copies of the Software, and to permit persons to whom the
10 | Software is furnished to do so.
11 |
12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
18 | IN THE SOFTWARE.
19 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph-0.17.3.dist-info/RECORD:
--------------------------------------------------------------------------------
1 | altgraph-0.17.3.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
2 | altgraph-0.17.3.dist-info/LICENSE,sha256=bBlNbbDGTUVTXRDJUUK5sM2nt9zH8d3uMCs9U289vkY,1002
3 | altgraph-0.17.3.dist-info/METADATA,sha256=su1fAc5Kx9YoIY4_t-re_vyX_xTMvUacCSa-6NUtMgA,7395
4 | altgraph-0.17.3.dist-info/RECORD,,
5 | altgraph-0.17.3.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6 | altgraph-0.17.3.dist-info/WHEEL,sha256=WzZ8cwjh8l0jtULNjYq1Hpr-WCqCRgPr--TX4P5I1Wo,110
7 | altgraph-0.17.3.dist-info/top_level.txt,sha256=HEBeRWf5ItVPc7Y9hW7hGlrLXZjPoL4by6CAhBV_BwA,9
8 | altgraph-0.17.3.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
9 | altgraph/Dot.py,sha256=fHS-GozpcEKyWxW2v110JaFMS68iIc0oYFlFDuNQgOQ,9901
10 | altgraph/Graph.py,sha256=6b6fSHLA5QSqMDnSHIO7_WJnBYIdq3K5Bt8VipRODwg,20788
11 | altgraph/GraphAlgo.py,sha256=Uu9aTjSKWi38iQ_e9ZrwCnzQaI1WWFDhJ6kfmu0jxAA,5645
12 | altgraph/GraphStat.py,sha256=vj3VqCOkzpAKggxVFLE_AlMIfPm1WN17DX4rbZjXAx4,1890
13 | altgraph/GraphUtil.py,sha256=1T4DJc2bJn6EIU_Ct4m0oiKlXWkXvqcXE8CGL2K9en8,3990
14 | altgraph/ObjectGraph.py,sha256=o7fPJtyBEgJSXAkUjzvj35B-FOY4uKzfLGqSvTitx8c,6490
15 | altgraph/__init__.py,sha256=YtY-rHf6X_lYk8820da2uVZT-C-B9KGpGXvBg1oZ0Fc,5015
16 | altgraph/__pycache__/Dot.cpython-39.pyc,,
17 | altgraph/__pycache__/Graph.cpython-39.pyc,,
18 | altgraph/__pycache__/GraphAlgo.cpython-39.pyc,,
19 | altgraph/__pycache__/GraphStat.cpython-39.pyc,,
20 | altgraph/__pycache__/GraphUtil.cpython-39.pyc,,
21 | altgraph/__pycache__/ObjectGraph.cpython-39.pyc,,
22 | altgraph/__pycache__/__init__.cpython-39.pyc,,
23 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph-0.17.3.dist-info/REQUESTED:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/src/tracecode/_vendor/altgraph-0.17.3.dist-info/REQUESTED
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph-0.17.3.dist-info/WHEEL:
--------------------------------------------------------------------------------
1 | Wheel-Version: 1.0
2 | Generator: bdist_wheel (0.37.0)
3 | Root-Is-Purelib: true
4 | Tag: py2-none-any
5 | Tag: py3-none-any
6 |
7 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph-0.17.3.dist-info/top_level.txt:
--------------------------------------------------------------------------------
1 | altgraph
2 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph-0.17.3.dist-info/zip-safe:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph/GraphAlgo.py:
--------------------------------------------------------------------------------
1 | """
2 | altgraph.GraphAlgo - Graph algorithms
3 | =====================================
4 | """
5 | from ..altgraph import GraphError
6 |
7 |
8 | def dijkstra(graph, start, end=None):
9 | """
10 | Dijkstra's algorithm for shortest paths
11 |
12 | `David Eppstein, UC Irvine, 4 April 2002
13 | `_
14 |
15 | `Python Cookbook Recipe
16 | `_
17 |
18 | Find shortest paths from the start node to all nodes nearer than or
19 | equal to the end node.
20 |
21 | Dijkstra's algorithm is only guaranteed to work correctly when all edge
22 | lengths are positive. This code does not verify this property for all
23 | edges (only the edges examined until the end vertex is reached), but will
24 | correctly compute shortest paths even for some graphs with negative edges,
25 | and will raise an exception if it discovers that a negative edge has
26 | caused it to make a mistake.
27 |
28 | Adapted to altgraph by Istvan Albert, Pennsylvania State University -
29 | June, 9 2004
30 | """
31 | D = {} # dictionary of final distances
32 | P = {} # dictionary of predecessors
33 | Q = _priorityDictionary() # estimated distances of non-final vertices
34 | Q[start] = 0
35 |
36 | for v in Q:
37 | D[v] = Q[v]
38 | if v == end:
39 | break
40 |
41 | for w in graph.out_nbrs(v):
42 | edge_id = graph.edge_by_node(v, w)
43 | vwLength = D[v] + graph.edge_data(edge_id)
44 | if w in D:
45 | if vwLength < D[w]:
46 | raise GraphError(
47 | "Dijkstra: found better path to already-final vertex"
48 | )
49 | elif w not in Q or vwLength < Q[w]:
50 | Q[w] = vwLength
51 | P[w] = v
52 |
53 | return (D, P)
54 |
55 |
56 | def shortest_path(graph, start, end):
57 | """
58 | Find a single shortest path from the *start* node to the *end* node.
59 | The input has the same conventions as dijkstra(). The output is a list of
60 | the nodes in order along the shortest path.
61 |
62 | **Note that the distances must be stored in the edge data as numeric data**
63 | """
64 |
65 | D, P = dijkstra(graph, start, end)
66 | Path = []
67 | while 1:
68 | Path.append(end)
69 | if end == start:
70 | break
71 | end = P[end]
72 | Path.reverse()
73 | return Path
74 |
75 |
76 | #
77 | # Utility classes and functions
78 | #
79 | class _priorityDictionary(dict):
80 | """
81 | Priority dictionary using binary heaps (internal use only)
82 |
83 | David Eppstein, UC Irvine, 8 Mar 2002
84 |
85 | Implements a data structure that acts almost like a dictionary, with
86 | two modifications:
87 |
88 | 1. D.smallest() returns the value x minimizing D[x]. For this to
89 | work correctly, all values D[x] stored in the dictionary must be
90 | comparable.
91 |
92 | 2. iterating "for x in D" finds and removes the items from D in sorted
93 | order. Each item is not removed until the next item is requested,
94 | so D[x] will still return a useful value until the next iteration
95 | of the for-loop. Each operation takes logarithmic amortized time.
96 | """
97 |
98 | def __init__(self):
99 | """
100 | Initialize priorityDictionary by creating binary heap of pairs
101 | (value,key). Note that changing or removing a dict entry will not
102 | remove the old pair from the heap until it is found by smallest()
103 | or until the heap is rebuilt.
104 | """
105 | self.__heap = []
106 | dict.__init__(self)
107 |
108 | def smallest(self):
109 | """
110 | Find smallest item after removing deleted items from front of heap.
111 | """
112 | if len(self) == 0:
113 | raise IndexError("smallest of empty priorityDictionary")
114 | heap = self.__heap
115 | while heap[0][1] not in self or self[heap[0][1]] != heap[0][0]:
116 | lastItem = heap.pop()
117 | insertionPoint = 0
118 | while 1:
119 | smallChild = 2 * insertionPoint + 1
120 | if (
121 | smallChild + 1 < len(heap)
122 | and heap[smallChild] > heap[smallChild + 1]
123 | ):
124 | smallChild += 1
125 | if smallChild >= len(heap) or lastItem <= heap[smallChild]:
126 | heap[insertionPoint] = lastItem
127 | break
128 | heap[insertionPoint] = heap[smallChild]
129 | insertionPoint = smallChild
130 | return heap[0][1]
131 |
132 | def __iter__(self):
133 | """
134 | Create destructive sorted iterator of priorityDictionary.
135 | """
136 |
137 | def iterfn():
138 | while len(self) > 0:
139 | x = self.smallest()
140 | yield x
141 | del self[x]
142 |
143 | return iterfn()
144 |
145 | def __setitem__(self, key, val):
146 | """
147 | Change value stored in dictionary and add corresponding pair to heap.
148 | Rebuilds the heap if the number of deleted items gets large, to avoid
149 | memory leakage.
150 | """
151 | dict.__setitem__(self, key, val)
152 | heap = self.__heap
153 | if len(heap) > 2 * len(self):
154 | self.__heap = [(v, k) for k, v in self.items()]
155 | self.__heap.sort()
156 | else:
157 | newPair = (val, key)
158 | insertionPoint = len(heap)
159 | heap.append(None)
160 | while insertionPoint > 0 and newPair < heap[(insertionPoint - 1) // 2]:
161 | heap[insertionPoint] = heap[(insertionPoint - 1) // 2]
162 | insertionPoint = (insertionPoint - 1) // 2
163 | heap[insertionPoint] = newPair
164 |
165 | def setdefault(self, key, val):
166 | """
167 | Reimplement setdefault to pass through our customized __setitem__.
168 | """
169 | if key not in self:
170 | self[key] = val
171 | return self[key]
172 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph/GraphStat.py:
--------------------------------------------------------------------------------
1 | """
2 | altgraph.GraphStat - Functions providing various graph statistics
3 | =================================================================
4 | """
5 |
6 |
7 | def degree_dist(graph, limits=(0, 0), bin_num=10, mode="out"):
8 | """
9 | Computes the degree distribution for a graph.
10 |
11 | Returns a list of tuples where the first element of the tuple is the
12 | center of the bin representing a range of degrees and the second element
13 | of the tuple are the number of nodes with the degree falling in the range.
14 |
15 | Example::
16 |
17 | ....
18 | """
19 |
20 | deg = []
21 | if mode == "inc":
22 | get_deg = graph.inc_degree
23 | else:
24 | get_deg = graph.out_degree
25 |
26 | for node in graph:
27 | deg.append(get_deg(node))
28 |
29 | if not deg:
30 | return []
31 |
32 | results = _binning(values=deg, limits=limits, bin_num=bin_num)
33 |
34 | return results
35 |
36 |
37 | _EPS = 1.0 / (2.0 ** 32)
38 |
39 |
40 | def _binning(values, limits=(0, 0), bin_num=10):
41 | """
42 | Bins data that falls between certain limits, if the limits are (0, 0) the
43 | minimum and maximum values are used.
44 |
45 | Returns a list of tuples where the first element of the tuple is the
46 | center of the bin and the second element of the tuple are the counts.
47 | """
48 | if limits == (0, 0):
49 | min_val, max_val = min(values) - _EPS, max(values) + _EPS
50 | else:
51 | min_val, max_val = limits
52 |
53 | # get bin size
54 | bin_size = (max_val - min_val) / float(bin_num)
55 | bins = [0] * (bin_num)
56 |
57 | # will ignore these outliers for now
58 | for value in values:
59 | try:
60 | if (value - min_val) >= 0:
61 | index = int((value - min_val) / float(bin_size))
62 | bins[index] += 1
63 | except IndexError:
64 | pass
65 |
66 | # make it ready for an x,y plot
67 | result = []
68 | center = (bin_size / 2) + min_val
69 | for i, y in enumerate(bins):
70 | x = center + bin_size * i
71 | result.append((x, y))
72 |
73 | return result
74 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph/GraphUtil.py:
--------------------------------------------------------------------------------
1 | """
2 | altgraph.GraphUtil - Utility classes and functions
3 | ==================================================
4 | """
5 |
6 | import random
7 | from collections import deque
8 |
9 | from ..altgraph import Graph, GraphError
10 |
11 |
12 | def generate_random_graph(node_num, edge_num, self_loops=False, multi_edges=False):
13 | """
14 | Generates and returns a :py:class:`~altgraph.Graph.Graph` instance with
15 | *node_num* nodes randomly connected by *edge_num* edges.
16 | """
17 | g = Graph.Graph()
18 |
19 | if not multi_edges:
20 | if self_loops:
21 | max_edges = node_num * node_num
22 | else:
23 | max_edges = node_num * (node_num - 1)
24 |
25 | if edge_num > max_edges:
26 | raise GraphError("inconsistent arguments to 'generate_random_graph'")
27 |
28 | nodes = range(node_num)
29 |
30 | for node in nodes:
31 | g.add_node(node)
32 |
33 | while 1:
34 | head = random.choice(nodes)
35 | tail = random.choice(nodes)
36 |
37 | # loop defense
38 | if head == tail and not self_loops:
39 | continue
40 |
41 | # multiple edge defense
42 | if g.edge_by_node(head, tail) is not None and not multi_edges:
43 | continue
44 |
45 | # add the edge
46 | g.add_edge(head, tail)
47 | if g.number_of_edges() >= edge_num:
48 | break
49 |
50 | return g
51 |
52 |
53 | def generate_scale_free_graph(steps, growth_num, self_loops=False, multi_edges=False):
54 | """
55 | Generates and returns a :py:class:`~altgraph.Graph.Graph` instance that
56 | will have *steps* \\* *growth_num* nodes and a scale free (powerlaw)
57 | connectivity. Starting with a fully connected graph with *growth_num*
58 | nodes at every step *growth_num* nodes are added to the graph and are
59 | connected to existing nodes with a probability proportional to the degree
60 | of these existing nodes.
61 | """
62 | # The code doesn't seem to do what the documentation claims.
63 | graph = Graph.Graph()
64 |
65 | # initialize the graph
66 | store = []
67 | for i in range(growth_num):
68 | for j in range(i + 1, growth_num):
69 | store.append(i)
70 | store.append(j)
71 | graph.add_edge(i, j)
72 |
73 | # generate
74 | for node in range(growth_num, steps * growth_num):
75 | graph.add_node(node)
76 | while graph.out_degree(node) < growth_num:
77 | nbr = random.choice(store)
78 |
79 | # loop defense
80 | if node == nbr and not self_loops:
81 | continue
82 |
83 | # multi edge defense
84 | if graph.edge_by_node(node, nbr) and not multi_edges:
85 | continue
86 |
87 | graph.add_edge(node, nbr)
88 |
89 | for nbr in graph.out_nbrs(node):
90 | store.append(node)
91 | store.append(nbr)
92 |
93 | return graph
94 |
95 |
96 | def filter_stack(graph, head, filters):
97 | """
98 | Perform a walk in a depth-first order starting
99 | at *head*.
100 |
101 | Returns (visited, removes, orphans).
102 |
103 | * visited: the set of visited nodes
104 | * removes: the list of nodes where the node
105 | data does not all *filters*
106 | * orphans: tuples of (last_good, node),
107 | where node is not in removes, is directly
108 | reachable from a node in *removes* and
109 | *last_good* is the closest upstream node that is not
110 | in *removes*.
111 | """
112 |
113 | visited, removes, orphans = {head}, set(), set()
114 | stack = deque([(head, head)])
115 | get_data = graph.node_data
116 | get_edges = graph.out_edges
117 | get_tail = graph.tail
118 |
119 | while stack:
120 | last_good, node = stack.pop()
121 | data = get_data(node)
122 | if data is not None:
123 | for filtfunc in filters:
124 | if not filtfunc(data):
125 | removes.add(node)
126 | break
127 | else:
128 | last_good = node
129 | for edge in get_edges(node):
130 | tail = get_tail(edge)
131 | if last_good is not node:
132 | orphans.add((last_good, tail))
133 | if tail not in visited:
134 | visited.add(tail)
135 | stack.append((last_good, tail))
136 |
137 | orphans = [(lg, tl) for (lg, tl) in orphans if tl not in removes]
138 |
139 | return visited, removes, orphans
140 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/altgraph/__init__.py:
--------------------------------------------------------------------------------
1 | """
2 | altgraph - a python graph library
3 | =================================
4 |
5 | altgraph is a fork of `graphlib `_ tailored
6 | to use newer Python 2.3+ features, including additional support used by the
7 | py2app suite (modulegraph and macholib, specifically).
8 |
9 | altgraph is a python based graph (network) representation and manipulation
10 | package. It has started out as an extension to the
11 | `graph_lib module
12 | `_
13 | written by Nathan Denny it has been significantly optimized and expanded.
14 |
15 | The :class:`altgraph.Graph.Graph` class is loosely modeled after the
16 | `LEDA `_
17 | (Library of Efficient Datatypes) representation. The library
18 | includes methods for constructing graphs, BFS and DFS traversals,
19 | topological sort, finding connected components, shortest paths as well as a
20 | number graph statistics functions. The library can also visualize graphs
21 | via `graphviz `_.
22 |
23 | The package contains the following modules:
24 |
25 | - the :py:mod:`altgraph.Graph` module contains the
26 | :class:`~altgraph.Graph.Graph` class that stores the graph data
27 |
28 | - the :py:mod:`altgraph.GraphAlgo` module implements graph algorithms
29 | operating on graphs (:py:class:`~altgraph.Graph.Graph`} instances)
30 |
31 | - the :py:mod:`altgraph.GraphStat` module contains functions for
32 | computing statistical measures on graphs
33 |
34 | - the :py:mod:`altgraph.GraphUtil` module contains functions for
35 | generating, reading and saving graphs
36 |
37 | - the :py:mod:`altgraph.Dot` module contains functions for displaying
38 | graphs via `graphviz `_
39 |
40 | - the :py:mod:`altgraph.ObjectGraph` module implements a graph of
41 | objects with a unique identifier
42 |
43 | Installation
44 | ------------
45 |
46 | Download and unpack the archive then type::
47 |
48 | python setup.py install
49 |
50 | This will install the library in the default location. For instructions on
51 | how to customize the install procedure read the output of::
52 |
53 | python setup.py --help install
54 |
55 | To verify that the code works run the test suite::
56 |
57 | python setup.py test
58 |
59 | Example usage
60 | -------------
61 |
62 | Lets assume that we want to analyze the graph below (links to the full picture)
63 | GRAPH_IMG. Our script then might look the following way::
64 |
65 | from altgraph import Graph, GraphAlgo, Dot
66 |
67 | # these are the edges
68 | edges = [ (1,2), (2,4), (1,3), (2,4), (3,4), (4,5), (6,5),
69 | (6,14), (14,15), (6, 15), (5,7), (7, 8), (7,13), (12,8),
70 | (8,13), (11,12), (11,9), (13,11), (9,13), (13,10) ]
71 |
72 | # creates the graph
73 | graph = Graph.Graph()
74 | for head, tail in edges:
75 | graph.add_edge(head, tail)
76 |
77 | # do a forward bfs from 1 at most to 20
78 | print(graph.forw_bfs(1))
79 |
80 | This will print the nodes in some breadth first order::
81 |
82 | [1, 2, 3, 4, 5, 7, 8, 13, 11, 10, 12, 9]
83 |
84 | If we wanted to get the hop-distance from node 1 to node 8
85 | we coud write::
86 |
87 | print(graph.get_hops(1, 8))
88 |
89 | This will print the following::
90 |
91 | [(1, 0), (2, 1), (3, 1), (4, 2), (5, 3), (7, 4), (8, 5)]
92 |
93 | Node 1 is at 0 hops since it is the starting node, nodes 2,3 are 1 hop away ...
94 | node 8 is 5 hops away. To find the shortest distance between two nodes you
95 | can use::
96 |
97 | print(GraphAlgo.shortest_path(graph, 1, 12))
98 |
99 | It will print the nodes on one (if there are more) the shortest paths::
100 |
101 | [1, 2, 4, 5, 7, 13, 11, 12]
102 |
103 | To display the graph we can use the GraphViz backend::
104 |
105 | dot = Dot.Dot(graph)
106 |
107 | # display the graph on the monitor
108 | dot.display()
109 |
110 | # save it in an image file
111 | dot.save_img(file_name='graph', file_type='gif')
112 |
113 |
114 |
115 | ..
116 | @author: U{Istvan Albert}
117 |
118 | @license: MIT License
119 |
120 | Copyright (c) 2004 Istvan Albert unless otherwise noted.
121 |
122 | Permission is hereby granted, free of charge, to any person obtaining a copy
123 | of this software and associated documentation files (the "Software"), to
124 | deal in the Software without restriction, including without limitation the
125 | rights to use, copy, modify, merge, publish, distribute, sublicense,
126 | and/or sell copies of the Software, and to permit persons to whom the
127 | Software is furnished to do so.
128 |
129 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
130 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
131 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
132 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
133 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
134 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
135 | IN THE SOFTWARE.
136 | @requires: Python 2.3 or higher
137 |
138 | @newfield contributor: Contributors:
139 | @contributor: U{Reka Albert }
140 |
141 | """
142 | # import pkg_resources
143 | #
144 | # __version__ = pkg_resources.require("altgraph")[0].version
145 | __version__ = "0.17.3"
146 |
147 |
148 | class GraphError(ValueError):
149 | pass
150 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/docopt-0.6.2.dist-info/INSTALLER:
--------------------------------------------------------------------------------
1 | pip
2 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/docopt-0.6.2.dist-info/LICENSE-MIT:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Vladimir Keleshev,
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of
4 | this software and associated documentation files (the "Software"), to deal in
5 | the Software without restriction, including without limitation the rights to
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7 | of the Software, and to permit persons to whom the Software is furnished to do
8 | so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/docopt-0.6.2.dist-info/RECORD:
--------------------------------------------------------------------------------
1 | __pycache__/docopt.cpython-39.pyc,,
2 | docopt-0.6.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
3 | docopt-0.6.2.dist-info/LICENSE-MIT,sha256=PV33j1kv8kM8PGzkmECRt_SXBZ3bjGsIoGG6SON7Z_I,1097
4 | docopt-0.6.2.dist-info/METADATA,sha256=J79CoOZYNH-1U2_xMhC2uwA3jVNxRNFzjucxglelo2A,17936
5 | docopt-0.6.2.dist-info/RECORD,,
6 | docopt-0.6.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7 | docopt-0.6.2.dist-info/WHEEL,sha256=z9j0xAa_JmUKMpmz72K0ZGALSM_n-wQVmGbleXx2VHg,110
8 | docopt-0.6.2.dist-info/top_level.txt,sha256=xAvL2ywTOdLde8wxTVye1299j65YdK3cM5963wNy5SU,7
9 | docopt.py,sha256=RMZQ69gz2FLIcx-j8MV1lQYwliIwDkwZVKVA14VyzFQ,19946
10 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/docopt-0.6.2.dist-info/REQUESTED:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/src/tracecode/_vendor/docopt-0.6.2.dist-info/REQUESTED
--------------------------------------------------------------------------------
/src/tracecode/_vendor/docopt-0.6.2.dist-info/WHEEL:
--------------------------------------------------------------------------------
1 | Wheel-Version: 1.0
2 | Generator: bdist_wheel (0.37.1)
3 | Root-Is-Purelib: true
4 | Tag: py2-none-any
5 | Tag: py3-none-any
6 |
7 |
--------------------------------------------------------------------------------
/src/tracecode/_vendor/docopt-0.6.2.dist-info/top_level.txt:
--------------------------------------------------------------------------------
1 | docopt
2 |
--------------------------------------------------------------------------------
/src/tracecode/pathutils.py:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) nexB Inc. and others. All rights reserved.
3 | # ScanCode is a trademark of nexB Inc.
4 | # SPDX-License-Identifier: Apache-2.0
5 | # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6 | # See https://github.com/aboutcode-org/tracecode-toolkit-strace for support or download.
7 | # See https://aboutcode.org for more information about nexB OSS projects.
8 | #
9 |
10 | import genericpath
11 |
12 | """
13 | Common prefix and suffix functions.
14 | """
15 |
16 |
17 | def common_prefix(s1, s2):
18 | """
19 | Return the common leading subsequence of two sequences.
20 | """
21 | if not s1 or not s2:
22 | return None
23 | common = genericpath.commonprefix(
24 | (
25 | s1,
26 | s2,
27 | )
28 | )
29 | if common:
30 | return common
31 | else:
32 | return None
33 |
34 |
35 | def common_suffix(s1, s2):
36 | """
37 | Return the common trailing subsequence between two sequences.
38 | """
39 | if not s1 or not s2:
40 | return None
41 | # revert the seqs and get a common prefix
42 | common = common_prefix(s1[::-1], s2[::-1])
43 | # revert back
44 | if common:
45 | return common[::-1]
46 | else:
47 | return common
48 |
49 |
50 | def common_path_prefix(p1, p2):
51 | """
52 | Return the common leading path between two posix paths and the number of
53 | common path segments.
54 | """
55 | return common_segments(p1, p2, common_func=common_prefix)
56 |
57 |
58 | def common_path_suffix(p1, p2):
59 | """
60 | Return the common trailing path between two posix paths and the number of
61 | common path segments.
62 | """
63 | return common_segments(p1, p2, common_func=common_suffix)
64 |
65 |
66 | def split(p):
67 | """
68 | Split a posix path in a sequence of segments, ignoring leading and
69 | trailing slash. Return an empty sequence for an empty path and the root /.
70 | """
71 | if not p:
72 | return []
73 | p = p.strip("/").split("/")
74 | return [] if p == [""] else p
75 |
76 |
77 | def common_segments(p1, p2, common_func):
78 | """
79 | Common function to compute common leading or trailing paths segments.
80 | """
81 | common = common_func(split(p1), split(p2))
82 | lgth = len(common) if common else 0
83 | common = "/".join(common) if common else None
84 | return common, lgth
85 |
--------------------------------------------------------------------------------
/src/tracecode/tracer.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf8 -*-
3 | #
4 | # Copyright (c) nexB Inc. and others. All rights reserved.
5 | # ScanCode is a trademark of nexB Inc.
6 | # SPDX-License-Identifier: Apache-2.0
7 | # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8 | # See https://github.com/aboutcode-org/tracecode-toolkit-strace for support or download.
9 | # See https://aboutcode.org for more information about nexB OSS projects.
10 | #
11 |
12 | """
13 | TraceCode: trace a command execution with strace.
14 | """
15 |
16 | import errno
17 | import getopt
18 | import logging
19 | import os
20 | import subprocess
21 | import sys
22 |
23 | __version__ = "0.10.0"
24 |
25 |
26 | logger = logging.getLogger("tracecode.trace")
27 |
28 |
29 | def check_strace():
30 | pass
31 |
32 |
33 | def check_disk_space():
34 | pass
35 |
36 |
37 | def trace_command(cmd, output_dir):
38 | """
39 | Trace a command with strace.
40 | """
41 | prettycmd = " ".join(cmd)
42 | logging.info("Tracing %(prettycmd)r to %(output_dir)s" % locals())
43 | trace_cmd = [
44 | "strace", # TODO: should be an absolute path
45 | "-ff", # trace each process and children in a separate trace file
46 | "-y", # decode file descs
47 | "-s",
48 | "256", # get so many chars per args.
49 | "-a1", # no alignment for results codes
50 | "-qq", # suppress process exit messages
51 | "-ttt", # full resolution time stamps
52 | "-o",
53 | os.path.join(output_dir, "t"), # output dir and trace name of 't'
54 | ] + cmd
55 |
56 | logging.debug("trace command: " + " ".join(trace_cmd))
57 | # TODO: capture stdout and stderr: tee to terminal and save in files
58 | proc = subprocess.Popen(trace_cmd)
59 | out = proc.communicate()[0]
60 | return proc.returncode, out
61 |
62 |
63 | def usage():
64 |
65 | print(
66 | """
67 | Trace a command execution and write results to a directory.
68 |
69 | Usage:
70 | tracer.py -o DIR COMMAND
71 | tracer.py -h | --help | -v | --version
72 |
73 | Arguments:
74 | COMMAND: the command to trace.
75 |
76 | Options:
77 | -o, --output DIR Existing directory where tracing is saved.
78 | -v, --version Display current version, license and copyright notice.
79 | -h, --help Display help.
80 | """
81 | )
82 |
83 |
84 | def version():
85 | print(
86 | """
87 | TraceCode:tracer Version: %s
88 | Copyright (c) nexB Inc. All rights reserved. https://github.com/aboutcode-org/tracecode-build
89 | """
90 | % __version__
91 | )
92 |
93 |
94 | def check_dir(pth, label):
95 | if not os.path.exists(pth) or not os.path.isdir(pth):
96 | print("%s directory does not exist or is not a directory." % (label,))
97 | sys.exit(errno.EEXIST)
98 |
99 |
100 | def check_dir_empty(pth, label):
101 | if os.listdir(pth):
102 | print("%s directory is not empty." % (label,))
103 | sys.exit(errno.EEXIST)
104 |
105 |
106 | def main(args, opts):
107 | logging.basicConfig(level=logging.INFO)
108 | if not len(args) <= 1:
109 | usage()
110 | sys.exit(0)
111 |
112 | opt = args[0]
113 | if opt in ("-h", "--help"):
114 | usage()
115 | sys.exit(0)
116 | elif opt in ("-v", "--version"):
117 | version()
118 | sys.exit(0)
119 | elif opt not in ("-o", "--output"):
120 | usage()
121 | sys.exit(errno.EINVAL)
122 |
123 | if not len(args) <= 3:
124 | print("Output directory and command are mandatory.")
125 | usage()
126 | sys.exit(errno.EINVAL)
127 |
128 | odir = args[1]
129 | output_dir = os.path.abspath(os.path.normpath(os.path.expanduser(odir)))
130 | if not os.path.exists(output_dir) or not os.path.isdir(output_dir):
131 | print(
132 | "Output directory %(odir)s does not exist or " "is not a directory." % locals())
133 | sys.exit(errno.EINVAL)
134 | if os.listdir(output_dir):
135 | print("Output directory %(odir)s must be empty." % locals())
136 | sys.exit(errno.EINVAL)
137 |
138 | command = args[2:]
139 | trace_command(
140 | output_dir,
141 | command,
142 | )
143 |
144 |
145 | if __name__ == "__main__":
146 | longopts = [
147 | "help",
148 | "output",
149 | "version",
150 | ]
151 | try:
152 | opts, args = getopt.getopt(sys.argv[1:], "hvo", longopts)
153 | except Exception as e:
154 | print(repr(e))
155 | usage()
156 | sys.exit(errno.EINVAL)
157 |
158 | main(args, opts)
159 |
--------------------------------------------------------------------------------
/tests/data/analy_patchelf/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/analy_patchelf/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/analy_patchelf_settings/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/analy_patchelf_settings/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/analy_patchelf_settings2/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/analy_patchelf_settings2/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/as_ops/trace/t.2799712:
--------------------------------------------------------------------------------
1 | 1389356960.187620 execve("/bin/grep", ["grep", "-r", ".", "-e", "permit"], [/* 22 vars */]) = 0
2 | 1389356960.188284 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
3 | 1389356960.188483 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
4 | 1389356960.188538 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
5 | 1389356960.188852 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
6 | 1389356960.189013 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389356960.189465 arch_prctl(ARCH_SET_FS, 0x7f163e89f700) = 0
8 | 1389356960.190070 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
9 | 1389356960.190377 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
10 | 1389356960.190761 open(".", O_RDONLY) = 3
11 | 1389356960.190894 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
12 | 1389356960.191125 open("./README", O_RDONLY) = 3
13 | 1389356960.191213 read(3, "PatchELF is a simple utility for"..., 32768) = 2814
14 | 1389356960.191296 read(3, "", 32768) = 0
15 | 1389356960.191419 open("./configure.ac", O_RDONLY) = 3
16 | 1389356960.191502 read(3, "AC_INIT(patchelf, m4_esyscmd([ec"..., 32768) = 233
17 | 1389356960.191564 read(3, "", 32768) = 0
18 | 1389356960.191684 open("./Makefile.in", O_RDONLY) = 3
19 | 1389356960.191767 read(3, "# Makefile.in generated by autom"..., 32768) = 18759
20 | 1389356960.191945 write(1, "./Makefile.in:# but WITHOUT ANY "..., 82) = 82
21 | 1389356960.208272 read(3, "", 77824) = 0
22 | 1389356960.208507 open("./src/elf.h", O_RDONLY) = 3
23 | 1389356960.208641 read(3, "/* This file defines standard EL"..., 131072) = 112365
24 | 1389356960.209003 read(3, "", 16384) = 0
25 | 1389356960.209707 open("./depcomp", O_RDONLY) = 3
26 | 1389356960.210019 read(3, "#! /bin/sh\n# depcomp - compile a"..., 131072) = 17867
27 | 1389356960.210293 read(3, "", 110592) = 0
28 | 1389356960.210584 open("./install-sh", O_RDONLY) = 3
29 | 1389356960.210781 read(3, "#!/bin/sh\n# install - install a "..., 131072) = 13620
30 | 1389356960.210937 write(1, "./install-sh:# sell copies of th"..., 90) = 90
31 | 1389356960.211039 read(3, "", 114688) = 0
32 | 1389356960.211232 open("./COPYING", O_RDONLY) = 3
33 | 1389356960.211372 read(3, " GNU GENERAL "..., 131072) = 35147
34 | 1389356960.211516 write(1, "./COPYING: Everyone is permitted"..., 72) = 72
35 | 1389356960.211661 write(1, "./COPYING: Conveying under any "..., 78) = 78
36 | 1389356960.211761 write(1, "./COPYING:beyond what the indivi"..., 80) = 80
37 | 1389356960.219783 open("./tests/simple.c", O_RDONLY) = 3
38 | 1389356960.219866 read(3, "#include \n\nchar buf[16 "..., 131072) = 130
39 | 1389356960.219928 read(3, "", 126976) = 0
40 | 1389356960.220048 open("./tests/main.c", O_RDONLY) = 3
41 | 1389356960.220131 read(3, "#include \n\nchar buf[16 "..., 131072) = 201
42 | 1389356960.220192 read(3, "", 126976) = 0
43 | 1389356960.220617 +++ exited with 0 +++
44 |
--------------------------------------------------------------------------------
/tests/data/as_ops_multiplexed/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/as_ops_multiplexed/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/bug1/t.2461545:
--------------------------------------------------------------------------------
1 | 1389268407.589799 read(-1, 0x7fff95659f3f, 1) = -1 EBADF (Bad file descriptor)
2 | 1389268400.403536 openat(AT_FDCWD, "vendor/prebuilt.mk", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = -1 ENOTDIR (Not a directory)
3 | 1389268407.678015 vfork() = ? ERESTARTNOINTR (To be restarted)
4 | 1389268416.585898 read(5, 0x7fff95659c3f, 1) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
5 | 1389268417.214601 read(-1, 0x7fff95659c3f, 1) = -1 EBADF (Bad file descriptor)
6 | THIS IS not a line at all
--------------------------------------------------------------------------------
/tests/data/can_parse_dup_call/trace/bash-build01.70793:
--------------------------------------------------------------------------------
1 | 1390356525.416370 dup2(4, 1) = 1
2 | 1390356525.416635 execve("/bin/cat", ["cat", "/tmp/pipsize.AdzIOk"], [/* 27 vars */]) = 0
3 | 1390356525.417123 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
4 | 1390356525.417238 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
5 | 1390356525.417269 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
6 | 1390356525.417495 arch_prctl(ARCH_SET_FS, 0x2aaaaaae2b40) = 0
7 | 1390356525.417832 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
8 | 1390356525.417970 open("/tmp/pipsize.AdzIOk", O_RDONLY) = 3
9 | 1390356525.418043 read(3, "65536\n", 32768) = 6
10 | 1390356525.418087 write(1, "65536\n", 6) = 6
11 | 1390356525.418197 read(3, "", 32768) = 0
12 | 1390356525.418403 +++ exited with 0 +++
13 |
--------------------------------------------------------------------------------
/tests/data/d2d_cups_settings/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/d2d_cups_settings/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/d2d_multiplexed_cp/src.lst:
--------------------------------------------------------------------------------
1 | /home/pombredanne/bin/tracecode/test_data/analy_patchelf/trace-archive.tar.bz2
2 | /home/pombredanne/bin/tracecode/test_data/analy_patchelf_settings/trace-archive.tar.bz2
3 | /home/pombredanne/bin/tracecode/test_data/analy_patchelf_settings2/trace-archive.tar.bz2
4 | /home/pombredanne/bin/tracecode/test_data/as_ops/trace/t.2799712
5 | /home/pombredanne/bin/tracecode/test_data/bug1/t.2461545
6 | /home/pombredanne/bin/tracecode/test_data/can_parse_dup_call/trace/bash-build01.70793
7 | /home/pombredanne/bin/tracecode/test_data/d2d_cups_settings/expected
8 | /home/pombredanne/bin/tracecode/test_data/d2d_cups_settings/sources
9 | /home/pombredanne/bin/tracecode/test_data/d2d_cups_settings/trace-archive.tar.bz2
10 | /home/pombredanne/bin/tracecode/test_data/d2d_patchelf_settings/trace-archive.tar.bz2
11 | /home/pombredanne/bin/tracecode/test_data/d2d_strace_settings/expected
12 | /home/pombredanne/bin/tracecode/test_data/d2d_strace_settings/sources
13 | /home/pombredanne/bin/tracecode/test_data/d2d_strace_settings/trace-archive.tar.bz2
14 | /home/pombredanne/bin/tracecode/test_data/file_graph_analysis_patchelf/expected_ints
15 | /home/pombredanne/bin/tracecode/test_data/file_graph_analysis_patchelf/expected_srcs
16 | /home/pombredanne/bin/tracecode/test_data/file_graph_analysis_patchelf/expected_tgts
17 | /home/pombredanne/bin/tracecode/test_data/file_graph_analysis_patchelf/trace-archive.tar.bz2
18 | /home/pombredanne/bin/tracecode/test_data/filtering/t/trace.70676
19 | /home/pombredanne/bin/tracecode/test_data/grep/trace/t.2799712
20 | /home/pombredanne/bin/tracecode/test_data/grep2/trace/t.2799712
21 | /home/pombredanne/bin/tracecode/test_data/grep2/trace/t.2799713
22 | /home/pombredanne/bin/tracecode/test_data/grep3/trace/t.2799712
23 | /home/pombredanne/bin/tracecode/test_data/grep3/trace/t.2799713
24 | /home/pombredanne/bin/tracecode/test_data/grep3/trace/t.2799714
25 | /home/pombredanne/bin/tracecode/test_data/interleaving/trace/cp-trace.1
26 | /home/pombredanne/bin/tracecode/test_data/interleaving/trace/cp-trace.2
27 | /home/pombredanne/bin/tracecode/test_data/interleaving/trace/t.15480
28 | /home/pombredanne/bin/tracecode/test_data/lists/trace/t.2799712
29 | /home/pombredanne/bin/tracecode/test_data/lists_patchelf/expected
30 | /home/pombredanne/bin/tracecode/test_data/lists_patchelf/trace-archive.tar.bz2
31 | /home/pombredanne/bin/tracecode/test_data/parse_does_not_hang/trace-archive.tar.bz2
32 | /home/pombredanne/bin/tracecode/test_data/parse_entry/basic.trace
33 | /home/pombredanne/bin/tracecode/test_data/parse_error/trace.1
34 | /home/pombredanne/bin/tracecode/test_data/patchelf_command/trace-archive.tar.bz2
35 | /home/pombredanne/bin/tracecode/test_data/patchelf_command2/expected_pformats.tar.bz2
36 | /home/pombredanne/bin/tracecode/test_data/patchelf_command2/ignored_reads.lst
37 | /home/pombredanne/bin/tracecode/test_data/patchelf_command2/trace-archive.tar.bz2
38 | /home/pombredanne/bin/tracecode/test_data/pformat_cups/expected_pformats.tar.bz2
39 | /home/pombredanne/bin/tracecode/test_data/pformat_cups/trace-archive.tar.bz2
40 | /home/pombredanne/bin/tracecode/test_data/pformat_grep2/expected_pformats.tar.bz2
41 | /home/pombredanne/bin/tracecode/test_data/pformat_grep2/trace-archive.tar.bz2
42 | /home/pombredanne/bin/tracecode/test_data/pformat_grep3/expected_pformats.tar.bz2
43 | /home/pombredanne/bin/tracecode/test_data/pformat_grep3/trace-archive.tar.bz2
44 | /home/pombredanne/bin/tracecode/test_data/pformat_patchelf/expected_pformats.tar.bz2
45 | /home/pombredanne/bin/tracecode/test_data/pformat_patchelf/trace-archive.tar.bz2
46 | /home/pombredanne/bin/tracecode/test_data/pformat_strace_cleaning/expected_pformats.tar.bz2
47 | /home/pombredanne/bin/tracecode/test_data/pformat_strace_cleaning/trace-archive.tar.bz2
48 | /home/pombredanne/bin/tracecode/test_data/pformat_strace_cleaning_dir/expected_pformats.tar.bz2
49 | /home/pombredanne/bin/tracecode/test_data/pformat_strace_cleaning_dir/trace-archive.tar.bz2
50 | /home/pombredanne/bin/tracecode/test_data/pformat_strace_full/expected_pformats.tar.bz2
51 | /home/pombredanne/bin/tracecode/test_data/pformat_strace_full/trace-archive.tar.bz2
52 | /home/pombredanne/bin/tracecode/test_data/pformat_strace_saved/expected_pformats.tar.bz2
53 | /home/pombredanne/bin/tracecode/test_data/pformat_strace_saved/trace-archive.tar.bz2
54 | /home/pombredanne/bin/tracecode/test_data/render_graph/expected.dot
55 | /home/pombredanne/bin/tracecode/test_data/render_graph/trace/t.2799712
56 | /home/pombredanne/bin/tracecode/test_data/render_graph_bash/expected.dot
57 | /home/pombredanne/bin/tracecode/test_data/render_graph_bash/trace-archive.tar.bz2
58 | /home/pombredanne/bin/tracecode/test_data/render_graph_cups/expected.dot
59 | /home/pombredanne/bin/tracecode/test_data/render_graph_cups/trace-archive.tar.bz2
60 | /home/pombredanne/bin/tracecode/test_data/render_graph_patchelf/expected.dot
61 | /home/pombredanne/bin/tracecode/test_data/render_graph_patchelf/trace-archive.tar.bz2
62 | /home/pombredanne/bin/tracecode/test_data/render_graph_patchelf2/expected.dot
63 | /home/pombredanne/bin/tracecode/test_data/render_graph_patchelf2/trace-archive.tar.bz2
64 | /home/pombredanne/bin/tracecode/test_data/render_graph_strace/expected.dot
65 | /home/pombredanne/bin/tracecode/test_data/render_graph_strace/trace-archive.tar.bz2
66 | /home/pombredanne/bin/tracecode/test_data/stats_patchelf/expected
67 | /home/pombredanne/bin/tracecode/test_data/stats_patchelf/trace-archive.tar.bz2
68 | /home/pombredanne/bin/tracecode/test_data/strace_mini/trace/strace.2453402
69 | /home/pombredanne/bin/tracecode/test_data/strace_mini/trace/strace.2453403
70 | /home/pombredanne/bin/tracecode/test_data/strace_mini2/trace/strace.2453402
71 | /home/pombredanne/bin/tracecode/test_data/strace_mini2/trace/strace.2453403
72 | /home/pombredanne/bin/tracecode/test_data/strace2/trace/strace.2453402
73 | /home/pombredanne/bin/tracecode/test_data/strace2/trace/strace2.2453403
74 | /home/pombredanne/bin/tracecode/test_data/strace3/trace/dir/not_a_trace_file
75 | /home/pombredanne/bin/tracecode/test_data/validate/trace-archive.tar.bz2
76 | /home/pombredanne/bin/tracecode/test_data/validate_out_of_order/trace-archive.tar.bz2
77 |
--------------------------------------------------------------------------------
/tests/data/d2d_multiplexed_cp/tgt.lst:
--------------------------------------------------------------------------------
1 | /home/pombredanne/bin/tracecode/tst/test_data/analy_patchelf/trace-archive.tar.bz2
2 | /home/pombredanne/bin/tracecode/tst/test_data/analy_patchelf_settings/trace-archive.tar.bz2
3 | /home/pombredanne/bin/tracecode/tst/test_data/analy_patchelf_settings2/trace-archive.tar.bz2
4 | /home/pombredanne/bin/tracecode/tst/test_data/as_ops/trace/t.2799712
5 | /home/pombredanne/bin/tracecode/tst/test_data/bug1/t.2461545
6 | /home/pombredanne/bin/tracecode/tst/test_data/can_parse_dup_call/trace/bash-build01.70793
7 | /home/pombredanne/bin/tracecode/tst/test_data/d2d_cups_settings/expected
8 | /home/pombredanne/bin/tracecode/tst/test_data/d2d_cups_settings/sources
9 | /home/pombredanne/bin/tracecode/tst/test_data/d2d_cups_settings/trace-archive.tar.bz2
10 | /home/pombredanne/bin/tracecode/tst/test_data/d2d_patchelf_settings/trace-archive.tar.bz2
11 | /home/pombredanne/bin/tracecode/tst/test_data/d2d_strace_settings/expected
12 | /home/pombredanne/bin/tracecode/tst/test_data/d2d_strace_settings/sources
13 | /home/pombredanne/bin/tracecode/tst/test_data/d2d_strace_settings/trace-archive.tar.bz2
14 | /home/pombredanne/bin/tracecode/tst/test_data/file_graph_analysis_patchelf/expected_ints
15 | /home/pombredanne/bin/tracecode/tst/test_data/file_graph_analysis_patchelf/expected_srcs
16 | /home/pombredanne/bin/tracecode/tst/test_data/file_graph_analysis_patchelf/expected_tgts
17 | /home/pombredanne/bin/tracecode/tst/test_data/file_graph_analysis_patchelf/trace-archive.tar.bz2
18 | /home/pombredanne/bin/tracecode/tst/test_data/filtering/t/trace.70676
19 | /home/pombredanne/bin/tracecode/tst/test_data/grep/trace/t.2799712
20 | /home/pombredanne/bin/tracecode/tst/test_data/grep2/trace/t.2799712
21 | /home/pombredanne/bin/tracecode/tst/test_data/grep2/trace/t.2799713
22 | /home/pombredanne/bin/tracecode/tst/test_data/grep3/trace/t.2799712
23 | /home/pombredanne/bin/tracecode/tst/test_data/grep3/trace/t.2799713
24 | /home/pombredanne/bin/tracecode/tst/test_data/grep3/trace/t.2799714
25 | /home/pombredanne/bin/tracecode/tst/test_data/interleaving/trace/cp-trace.1
26 | /home/pombredanne/bin/tracecode/tst/test_data/interleaving/trace/cp-trace.2
27 | /home/pombredanne/bin/tracecode/tst/test_data/interleaving/trace/t.15480
28 | /home/pombredanne/bin/tracecode/tst/test_data/lists/trace/t.2799712
29 | /home/pombredanne/bin/tracecode/tst/test_data/lists_patchelf/expected
30 | /home/pombredanne/bin/tracecode/tst/test_data/lists_patchelf/trace-archive.tar.bz2
31 | /home/pombredanne/bin/tracecode/tst/test_data/parse_does_not_hang/trace-archive.tar.bz2
32 | /home/pombredanne/bin/tracecode/tst/test_data/parse_entry/basic.trace
33 | /home/pombredanne/bin/tracecode/tst/test_data/parse_error/trace.1
34 | /home/pombredanne/bin/tracecode/tst/test_data/patchelf_command/trace-archive.tar.bz2
35 | /home/pombredanne/bin/tracecode/tst/test_data/patchelf_command2/expected_pformats.tar.bz2
36 | /home/pombredanne/bin/tracecode/tst/test_data/patchelf_command2/ignored_reads.lst
37 | /home/pombredanne/bin/tracecode/tst/test_data/patchelf_command2/trace-archive.tar.bz2
38 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_cups/expected_pformats.tar.bz2
39 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_cups/trace-archive.tar.bz2
40 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_grep2/expected_pformats.tar.bz2
41 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_grep2/trace-archive.tar.bz2
42 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_grep3/expected_pformats.tar.bz2
43 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_grep3/trace-archive.tar.bz2
44 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_patchelf/expected_pformats.tar.bz2
45 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_patchelf/trace-archive.tar.bz2
46 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_strace_cleaning/expected_pformats.tar.bz2
47 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_strace_cleaning/trace-archive.tar.bz2
48 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_strace_cleaning_dir/expected_pformats.tar.bz2
49 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_strace_cleaning_dir/trace-archive.tar.bz2
50 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_strace_full/expected_pformats.tar.bz2
51 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_strace_full/trace-archive.tar.bz2
52 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_strace_saved/expected_pformats.tar.bz2
53 | /home/pombredanne/bin/tracecode/tst/test_data/pformat_strace_saved/trace-archive.tar.bz2
54 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph/expected.dot
55 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph/trace/t.2799712
56 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_bash/expected.dot
57 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_bash/trace-archive.tar.bz2
58 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_cups/expected.dot
59 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_cups/trace-archive.tar.bz2
60 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_patchelf/expected.dot
61 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_patchelf/trace-archive.tar.bz2
62 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_patchelf2/expected.dot
63 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_patchelf2/trace-archive.tar.bz2
64 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_strace/expected.dot
65 | /home/pombredanne/bin/tracecode/tst/test_data/render_graph_strace/trace-archive.tar.bz2
66 | /home/pombredanne/bin/tracecode/tst/test_data/stats_patchelf/trace-archive.tar.bz2
67 | /home/pombredanne/bin/tracecode/tst/test_data/strace_mini/trace/strace.2453402
68 | /home/pombredanne/bin/tracecode/tst/test_data/strace_mini/trace/strace.2453403
69 | /home/pombredanne/bin/tracecode/tst/test_data/strace_mini2/trace/strace.2453402
70 | /home/pombredanne/bin/tracecode/tst/test_data/strace_mini2/trace/strace.2453403
71 | /home/pombredanne/bin/tracecode/tst/test_data/strace2/trace/strace.2453402
72 | /home/pombredanne/bin/tracecode/tst/test_data/strace2/trace/strace2.2453403
73 | /home/pombredanne/bin/tracecode/tst/test_data/validate/trace-archive.tar.bz2
74 | /home/pombredanne/bin/tracecode/tst/test_data/validate_out_of_order/trace-archive.tar.bz2
75 |
--------------------------------------------------------------------------------
/tests/data/d2d_multiplexed_cp/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/d2d_multiplexed_cp/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/d2d_patchelf_settings/expected:
--------------------------------------------------------------------------------
1 | /home/nexb/tools/patchelf/patchelf-0.5/src/elf.h,/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf
2 | /home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.cc,/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf
3 |
--------------------------------------------------------------------------------
/tests/data/d2d_patchelf_settings/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/d2d_patchelf_settings/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/d2d_strace_settings/expected:
--------------------------------------------------------------------------------
1 | /home/nexb/tools/strace/strace-4.8/bjm.c,/home/nexb/tools/strace/strace-4.8/strace
2 | /home/nexb/tools/strace/strace-4.8/block.c,/home/nexb/tools/strace/strace-4.8/strace
3 | /home/nexb/tools/strace/strace-4.8/config.h,/home/nexb/tools/strace/strace-4.8/strace
4 | /home/nexb/tools/strace/strace-4.8/count.c,/home/nexb/tools/strace/strace-4.8/strace
5 | /home/nexb/tools/strace/strace-4.8/defs.h,/home/nexb/tools/strace/strace-4.8/strace
6 | /home/nexb/tools/strace/strace-4.8/desc.c,/home/nexb/tools/strace/strace-4.8/strace
7 | /home/nexb/tools/strace/strace-4.8/file.c,/home/nexb/tools/strace/strace-4.8/strace
8 | /home/nexb/tools/strace/strace-4.8/io.c,/home/nexb/tools/strace/strace-4.8/strace
9 | /home/nexb/tools/strace/strace-4.8/ioctl.c,/home/nexb/tools/strace/strace-4.8/strace
10 | /home/nexb/tools/strace/strace-4.8/ipc.c,/home/nexb/tools/strace/strace-4.8/strace
11 | /home/nexb/tools/strace/strace-4.8/linux/dummy.h,/home/nexb/tools/strace/strace-4.8/strace
12 | /home/nexb/tools/strace/strace-4.8/linux/errnoent.h,/home/nexb/tools/strace/strace-4.8/strace
13 | /home/nexb/tools/strace/strace-4.8/linux/i386/ioctlent.h.in,/home/nexb/tools/strace/strace-4.8/strace
14 | /home/nexb/tools/strace/strace-4.8/linux/i386/syscallent.h,/home/nexb/tools/strace/strace-4.8/strace
15 | /home/nexb/tools/strace/strace-4.8/linux/ioctlent-filter.awk,/home/nexb/tools/strace/strace-4.8/strace
16 | /home/nexb/tools/strace/strace-4.8/linux/ioctlent.h,/home/nexb/tools/strace/strace-4.8/strace
17 | /home/nexb/tools/strace/strace-4.8/linux/ioctlent.h.in,/home/nexb/tools/strace/strace-4.8/strace
18 | /home/nexb/tools/strace/strace-4.8/linux/mtd-abi.h,/home/nexb/tools/strace/strace-4.8/strace
19 | /home/nexb/tools/strace/strace-4.8/linux/signalent.h,/home/nexb/tools/strace/strace-4.8/strace
20 | /home/nexb/tools/strace/strace-4.8/linux/subcall.h,/home/nexb/tools/strace/strace-4.8/strace
21 | /home/nexb/tools/strace/strace-4.8/linux/syscall.h,/home/nexb/tools/strace/strace-4.8/strace
22 | /home/nexb/tools/strace/strace-4.8/linux/ubi-user.h,/home/nexb/tools/strace/strace-4.8/strace
23 | /home/nexb/tools/strace/strace-4.8/linux/x32/syscallent.h,/home/nexb/tools/strace/strace-4.8/strace
24 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/errnoent1.h,/home/nexb/tools/strace/strace-4.8/strace
25 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/errnoent2.h,/home/nexb/tools/strace/strace-4.8/strace
26 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/ioctlent.h.in,/home/nexb/tools/strace/strace-4.8/strace
27 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/ioctlent1.h,/home/nexb/tools/strace/strace-4.8/strace
28 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/ioctlent2.h,/home/nexb/tools/strace/strace-4.8/strace
29 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/signalent1.h,/home/nexb/tools/strace/strace-4.8/strace
30 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/signalent2.h,/home/nexb/tools/strace/strace-4.8/strace
31 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/syscallent.h,/home/nexb/tools/strace/strace-4.8/strace
32 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/syscallent1.h,/home/nexb/tools/strace/strace-4.8/strace
33 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/syscallent2.h,/home/nexb/tools/strace/strace-4.8/strace
34 | /home/nexb/tools/strace/strace-4.8/loop.c,/home/nexb/tools/strace/strace-4.8/strace
35 | /home/nexb/tools/strace/strace-4.8/mem.c,/home/nexb/tools/strace/strace-4.8/strace
36 | /home/nexb/tools/strace/strace-4.8/mtd.c,/home/nexb/tools/strace/strace-4.8/strace
37 | /home/nexb/tools/strace/strace-4.8/net.c,/home/nexb/tools/strace/strace-4.8/strace
38 | /home/nexb/tools/strace/strace-4.8/pathtrace.c,/home/nexb/tools/strace/strace-4.8/strace
39 | /home/nexb/tools/strace/strace-4.8/process.c,/home/nexb/tools/strace/strace-4.8/strace
40 | /home/nexb/tools/strace/strace-4.8/quota.c,/home/nexb/tools/strace/strace-4.8/strace
41 | /home/nexb/tools/strace/strace-4.8/resource.c,/home/nexb/tools/strace/strace-4.8/strace
42 | /home/nexb/tools/strace/strace-4.8/scsi.c,/home/nexb/tools/strace/strace-4.8/strace
43 | /home/nexb/tools/strace/strace-4.8/signal.c,/home/nexb/tools/strace/strace-4.8/strace
44 | /home/nexb/tools/strace/strace-4.8/sock.c,/home/nexb/tools/strace/strace-4.8/strace
45 | /home/nexb/tools/strace/strace-4.8/strace.c,/home/nexb/tools/strace/strace-4.8/strace
46 | /home/nexb/tools/strace/strace-4.8/stream.c,/home/nexb/tools/strace/strace-4.8/strace
47 | /home/nexb/tools/strace/strace-4.8/syscall.c,/home/nexb/tools/strace/strace-4.8/strace
48 | /home/nexb/tools/strace/strace-4.8/system.c,/home/nexb/tools/strace/strace-4.8/strace
49 | /home/nexb/tools/strace/strace-4.8/term.c,/home/nexb/tools/strace/strace-4.8/strace
50 | /home/nexb/tools/strace/strace-4.8/time.c,/home/nexb/tools/strace/strace-4.8/strace
51 | /home/nexb/tools/strace/strace-4.8/util.c,/home/nexb/tools/strace/strace-4.8/strace
52 | /home/nexb/tools/strace/strace-4.8/vsprintf.c,/home/nexb/tools/strace/strace-4.8/strace
53 |
--------------------------------------------------------------------------------
/tests/data/d2d_strace_settings/sources:
--------------------------------------------------------------------------------
1 | /home/nexb/tools/strace/strace-4.8/bjm.c
2 | /home/nexb/tools/strace/strace-4.8/block.c
3 | /home/nexb/tools/strace/strace-4.8/config.h
4 | /home/nexb/tools/strace/strace-4.8/count.c
5 | /home/nexb/tools/strace/strace-4.8/defs.h
6 | /home/nexb/tools/strace/strace-4.8/desc.c
7 | /home/nexb/tools/strace/strace-4.8/file.c
8 | /home/nexb/tools/strace/strace-4.8/io.c
9 | /home/nexb/tools/strace/strace-4.8/ioctl.c
10 | /home/nexb/tools/strace/strace-4.8/ipc.c
11 | /home/nexb/tools/strace/strace-4.8/linux/dummy.h
12 | /home/nexb/tools/strace/strace-4.8/linux/errnoent.h
13 | /home/nexb/tools/strace/strace-4.8/linux/i386/ioctlent.h.in
14 | /home/nexb/tools/strace/strace-4.8/linux/i386/syscallent.h
15 | /home/nexb/tools/strace/strace-4.8/linux/ioctlent-filter.awk
16 | /home/nexb/tools/strace/strace-4.8/linux/ioctlent.h
17 | /home/nexb/tools/strace/strace-4.8/linux/ioctlent.h.in
18 | /home/nexb/tools/strace/strace-4.8/linux/mtd-abi.h
19 | /home/nexb/tools/strace/strace-4.8/linux/signalent.h
20 | /home/nexb/tools/strace/strace-4.8/linux/subcall.h
21 | /home/nexb/tools/strace/strace-4.8/linux/syscall.h
22 | /home/nexb/tools/strace/strace-4.8/linux/ubi-user.h
23 | /home/nexb/tools/strace/strace-4.8/linux/x32/syscallent.h
24 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/errnoent1.h
25 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/errnoent2.h
26 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/ioctlent.h.in
27 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/ioctlent1.h
28 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/ioctlent2.h
29 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/signalent1.h
30 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/signalent2.h
31 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/syscallent.h
32 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/syscallent1.h
33 | /home/nexb/tools/strace/strace-4.8/linux/x86_64/syscallent2.h
34 | /home/nexb/tools/strace/strace-4.8/loop.c
35 | /home/nexb/tools/strace/strace-4.8/mem.c
36 | /home/nexb/tools/strace/strace-4.8/mtd.c
37 | /home/nexb/tools/strace/strace-4.8/net.c
38 | /home/nexb/tools/strace/strace-4.8/pathtrace.c
39 | /home/nexb/tools/strace/strace-4.8/process.c
40 | /home/nexb/tools/strace/strace-4.8/quota.c
41 | /home/nexb/tools/strace/strace-4.8/resource.c
42 | /home/nexb/tools/strace/strace-4.8/scsi.c
43 | /home/nexb/tools/strace/strace-4.8/signal.c
44 | /home/nexb/tools/strace/strace-4.8/sock.c
45 | /home/nexb/tools/strace/strace-4.8/strace.c
46 | /home/nexb/tools/strace/strace-4.8/stream.c
47 | /home/nexb/tools/strace/strace-4.8/syscall.c
48 | /home/nexb/tools/strace/strace-4.8/system.c
49 | /home/nexb/tools/strace/strace-4.8/term.c
50 | /home/nexb/tools/strace/strace-4.8/time.c
51 | /home/nexb/tools/strace/strace-4.8/util.c
52 | /home/nexb/tools/strace/strace-4.8/vsprintf.c
--------------------------------------------------------------------------------
/tests/data/d2d_strace_settings/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/d2d_strace_settings/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/dump_patchelf/expected.csv:
--------------------------------------------------------------------------------
1 | type,path,opid,command,start,end
2 | c,,2800285.0,/usr/bin/make,1389366380.186603,1389366380.186603
3 | f,/home/nexb/tools/patchelf/patchelf-0.5/Makefile,,,,
4 | r,/home/nexb/tools/patchelf/patchelf-0.5/Makefile,2800285.0,/usr/bin/make,1389366380.186603,1389366380.186603
5 | c,,2800286.0,/bin/bash,1389366380.196699,1389366380.196699
6 | f,pipe:[15206912],,,,
7 | r,pipe:[15206912],2800286.0,/bin/bash,1389366380.196699,1389366380.196699
8 | c,,2800287.0,/bin/bash,1389366380.189777,1389366380.189777
9 | c,,2800288.0,/bin/bash,1389366380.198862,1389366380.198862
10 | f,pipe:[15213549],,,,
11 | w,pipe:[15213549],2800288.0,/bin/bash,1389366380.198862,1389366380.198862
12 | c,,2800289.0,"/bin/bash, /bin/sed",1389366380.204499,1389366380.204850
13 | r,pipe:[15213549],2800289.0,"/bin/bash, /bin/sed",1389366380.204499,1389366380.204850
14 | w,pipe:[15206912],2800289.0,"/bin/bash, /bin/sed",1389366380.204499,1389366380.204850
15 | c,,2800290.0,/bin/bash,1389366380.189777,1389366380.189777
16 | c,,2800291.0,"/bin/bash, /usr/bin/make",1389366380.215465,1389366380.216198
17 | f,/home/nexb/tools/patchelf/patchelf-0.5/src/Makefile,,,,
18 | r,/home/nexb/tools/patchelf/patchelf-0.5/src/Makefile,2800291.0,"/bin/bash, /usr/bin/make",1389366380.215465,1389366380.216198
19 | f,/home/nexb/tools/patchelf/patchelf-0.5/src/.deps/patchelf.Po,,,,
20 | r,/home/nexb/tools/patchelf/patchelf-0.5/src/.deps/patchelf.Po,2800291.0,"/bin/bash, /usr/bin/make",1389366380.215465,1389366380.216198
21 | c,,2800292.0,"/bin/bash, /usr/bin/g++",1389366380.258544,1389366380.258544
22 | f,/tmp/ccSJnJSm.s,,,,
23 | w,/tmp/ccSJnJSm.s,2800292.0,"/bin/bash, /usr/bin/g++",1389366380.258544,1389366380.258544
24 | c,,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
25 | f,/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/limits.h,,,,
26 | r,/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/limits.h,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
27 | f,/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/syslimits.h,,,,
28 | r,/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/syslimits.h,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
29 | f,/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdint.h,,,,
30 | r,/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdint.h,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
31 | f,/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stddef.h,,,,
32 | r,/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stddef.h,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
33 | f,/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdarg.h,,,,
34 | r,/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdarg.h,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
35 | f,/home/nexb/tools/patchelf/patchelf-0.5/src/elf.h,,,,
36 | r,/home/nexb/tools/patchelf/patchelf-0.5/src/elf.h,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
37 | f,/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.cc,,,,
38 | r,/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.cc,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
39 | f,/home/nexb/tools/patchelf/patchelf-0.5/src/.deps/patchelf.Tpo,,,,
40 | w,/home/nexb/tools/patchelf/patchelf-0.5/src/.deps/patchelf.Tpo,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
41 | w,/tmp/ccSJnJSm.s,2800293.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus,1389366380.268494,1389366382.813827
42 | c,,2800294.0,/usr/bin/as,1389366382.835362,1389366383.032517
43 | r,/tmp/ccSJnJSm.s,2800294.0,/usr/bin/as,1389366382.835362,1389366383.032517
44 | f,/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.o,,,,
45 | w,/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.o,2800294.0,/usr/bin/as,1389366382.835362,1389366383.032517
46 | c,,2800295.0,"/bin/bash, /bin/mv",1389366383.055569,1389366383.055569
47 | r,/home/nexb/tools/patchelf/patchelf-0.5/src/.deps/patchelf.Tpo,2800295.0,"/bin/bash, /bin/mv",1389366383.055569,1389366383.055569
48 | w,/home/nexb/tools/patchelf/patchelf-0.5/src/.deps/patchelf.Po,2800295.0,"/bin/bash, /bin/mv",1389366383.055569,1389366383.055569
49 | c,,2800295.1,"/bin/bash, /bin/mv",1389366383.040790,1389366383.049423
50 | c,,2800297.0,"/bin/bash, /usr/bin/g++",1389366383.068240,1389366383.075884
51 | c,,2800298.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/collect2,1389366383.091673,1389366383.106196
52 | f,/tmp/ccxlsgGu.le,,,,
53 | w,/tmp/ccxlsgGu.le,2800298.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/collect2,1389366383.091673,1389366383.106196
54 | f,/tmp/ccj50xXq.ld,,,,
55 | w,/tmp/ccj50xXq.ld,2800298.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/collect2,1389366383.091673,1389366383.106196
56 | f,/tmp/ccHpGGfn.o,,,,
57 | w,/tmp/ccHpGGfn.o,2800298.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/collect2,1389366383.091673,1389366383.106196
58 | f,/tmp/ccDO5gyj.c,,,,
59 | w,/tmp/ccDO5gyj.c,2800298.0,/usr/lib/gcc/x86_64-linux-gnu/4.6/collect2,1389366383.091673,1389366383.106196
60 | c,,2800299.0,/usr/bin/ld,1389366383.116154,1389366383.322328
61 | r,/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.o,2800299.0,/usr/bin/ld,1389366383.116154,1389366383.322328
62 | f,/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf,,,,
63 | w,/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf,2800299.0,/usr/bin/ld,1389366383.116154,1389366383.322328
64 | c,,2800300.0,/bin/bash,1389366380.189777,1389366380.189777
65 | c,,2800301.0,"/bin/bash, /usr/bin/make",1389366383.338572,1389366383.340080
66 | f,/home/nexb/tools/patchelf/patchelf-0.5/tests/Makefile,,,,
67 | r,/home/nexb/tools/patchelf/patchelf-0.5/tests/Makefile,2800301.0,"/bin/bash, /usr/bin/make",1389366383.338572,1389366383.340080
68 | f,/home/nexb/tools/patchelf/patchelf-0.5/tests/.deps/big-dynstr.Po,,,,
69 | r,/home/nexb/tools/patchelf/patchelf-0.5/tests/.deps/big-dynstr.Po,2800301.0,"/bin/bash, /usr/bin/make",1389366383.338572,1389366383.340080
70 | f,/home/nexb/tools/patchelf/patchelf-0.5/tests/.deps/main.Po,,,,
71 | r,/home/nexb/tools/patchelf/patchelf-0.5/tests/.deps/main.Po,2800301.0,"/bin/bash, /usr/bin/make",1389366383.338572,1389366383.340080
72 | f,/home/nexb/tools/patchelf/patchelf-0.5/tests/.deps/simple.Po,,,,
73 | r,/home/nexb/tools/patchelf/patchelf-0.5/tests/.deps/simple.Po,2800301.0,"/bin/bash, /usr/bin/make",1389366383.338572,1389366383.340080
74 | c,,2800302.0,"/bin/bash, /usr/bin/make",1389366383.354189,1389366383.354189
75 | r,/home/nexb/tools/patchelf/patchelf-0.5/Makefile,2800302.0,"/bin/bash, /usr/bin/make",1389366383.354189,1389366383.354189
76 |
--------------------------------------------------------------------------------
/tests/data/dump_patchelf/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/dump_patchelf/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/file_graph_analysis_patchelf/expected_srcs:
--------------------------------------------------------------------------------
1 | /home/nexb/tools/patchelf/patchelf-0.5/src/elf.h
2 | /home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.cc
--------------------------------------------------------------------------------
/tests/data/file_graph_analysis_patchelf/expected_tgts:
--------------------------------------------------------------------------------
1 | /home/nexb/tools/patchelf/patchelf-0.5/src/patchelf
--------------------------------------------------------------------------------
/tests/data/file_graph_analysis_patchelf/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/file_graph_analysis_patchelf/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/grep/trace/t.2799712:
--------------------------------------------------------------------------------
1 | 1389356960.187620 execve("/bin/grep", ["grep", "-r", ".", "-e", "permit"], [/* 22 vars */]) = 0
2 | 1389356960.188284 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
3 | 1389356960.188483 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
4 | 1389356960.188538 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
5 | 1389356960.188852 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
6 | 1389356960.189013 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389356960.189465 arch_prctl(ARCH_SET_FS, 0x7f163e89f700) = 0
8 | 1389356960.190070 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
9 | 1389356960.190377 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
10 | 1389356960.190761 open(".", O_RDONLY) = 3
11 | 1389356960.190894 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
12 | 1389356960.191125 open("./README", O_RDONLY) = 3
13 | 1389356960.191213 read(3, "PatchELF is a simple utility for"..., 32768) = 2814
14 | 1389356960.191296 read(3, "", 32768) = 0
15 | 1389356960.191419 open("./configure.ac", O_RDONLY) = 3
16 | 1389356960.191502 read(3, "AC_INIT(patchelf, m4_esyscmd([ec"..., 32768) = 233
17 | 1389356960.191564 read(3, "", 32768) = 0
18 | 1389356960.191684 open("./Makefile.in", O_RDONLY) = 3
19 | 1389356960.191767 read(3, "# Makefile.in generated by autom"..., 32768) = 18759
20 | 1389356960.191945 write(1, "./Makefile.in:# but WITHOUT ANY "..., 82) = 82
21 | 1389356960.208272 read(3, "", 77824) = 0
22 | 1389356960.208507 open("./src/elf.h", O_RDONLY) = 3
23 | 1389356960.208641 read(3, "/* This file defines standard EL"..., 131072) = 112365
24 | 1389356960.209003 read(3, "", 16384) = 0
25 | 1389356960.209707 open("./depcomp", O_RDONLY) = 3
26 | 1389356960.210019 read(3, "#! /bin/sh\n# depcomp - compile a"..., 131072) = 17867
27 | 1389356960.210293 read(3, "", 110592) = 0
28 | 1389356960.210584 open("./install-sh", O_RDONLY) = 3
29 | 1389356960.210781 read(3, "#!/bin/sh\n# install - install a "..., 131072) = 13620
30 | 1389356960.210937 write(1, "./install-sh:# sell copies of th"..., 90) = 90
31 | 1389356960.211039 read(3, "", 114688) = 0
32 | 1389356960.211232 open("./COPYING", O_RDONLY) = 3
33 | 1389356960.211372 read(3, " GNU GENERAL "..., 131072) = 35147
34 | 1389356960.211516 write(1, "./COPYING: Everyone is permitted"..., 72) = 72
35 | 1389356960.211661 write(1, "./COPYING: Conveying under any "..., 78) = 78
36 | 1389356960.211761 write(1, "./COPYING:beyond what the indivi"..., 80) = 80
37 | 1389356960.219783 open("./tests/simple.c", O_RDONLY) = 3
38 | 1389356960.219866 read(3, "#include \n\nchar buf[16 "..., 131072) = 130
39 | 1389356960.219928 read(3, "", 126976) = 0
40 | 1389356960.220048 open("./tests/main.c", O_RDONLY) = 3
41 | 1389356960.220131 read(3, "#include \n\nchar buf[16 "..., 131072) = 201
42 | 1389356960.220192 read(3, "", 126976) = 0
43 | 1389356960.220617 +++ exited with 0 +++
44 |
--------------------------------------------------------------------------------
/tests/data/grep2/trace/t.2799712:
--------------------------------------------------------------------------------
1 | 1389356960.187620 execve("/bin/grep", ["grep", "-r", ".", "-e", "permit"], [/* 22 vars */]) = 0
2 | 1389356960.188284 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
3 | 1389356960.188483 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
4 | 1389356960.188538 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
5 | 1389356960.188852 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
6 | 1389356960.189013 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389356960.189465 arch_prctl(ARCH_SET_FS, 0x7f163e89f700) = 0
8 | 1389356960.190070 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
9 | 1389356960.190377 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
10 | 1389356960.190761 open(".", O_RDONLY) = 3
11 | 1389356960.190894 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
12 | 1389356960.191125 open("./README", O_RDONLY) = 3
13 | 1389356960.191213 read(3, "PatchELF is a simple utility for"..., 32768) = 2814
14 | 1389356960.191296 read(3, "", 32768) = 0
15 | 1389356960.209707 open("./depcomp", O_RDONLY) = 3
16 | 1389356960.211516 write(1, "./COPYING: Everyone is permitted"..., 72) = 72
17 | 1389356960.211761 write(1, "./COPYING:beyond what the indivi"..., 80) = 80
18 | 1389356960.219783 open("./tests/simple.c", O_RDONLY) = 3
19 | 1389356960.219784 rename("./tests/simple.c", "/tmp/tests/simple.c") = 3
20 | 1389356960.219785 rename("/tmp/tests/simple.c", "./tests/simple.c") = 3
21 | 1389356960.219866 read(3, "#include \n\nchar buf[16 "..., 131072) = 130
22 | 1389356960.219928 read(3, "", 126976) = 0
23 | 1389356960.220048 open("./tests/main.c", O_RDONLY) = 3
24 | 1389356960.220049 vfork() = 2799713
25 | 1389356960.220131 read(3, "#include \n\nchar buf[16 "..., 131072) = 201
26 | 1389356960.220192 read(3, "", 126976) = 0
27 | 1389356960.220617 +++ exited with 0 +++
28 |
--------------------------------------------------------------------------------
/tests/data/grep2/trace/t.2799713:
--------------------------------------------------------------------------------
1 | 1389356960.187621 execve("/bin/grep", ["grep", "-r", ".", "-e", "permit"], [/* 22 vars */]) = 0
2 | 1389356960.188284 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
3 | 1389356960.188483 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
4 | 1389356960.188538 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
5 | 1389356960.188852 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
6 | 1389356960.189013 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389356960.189465 arch_prctl(ARCH_SET_FS, 0x7f163e89f700) = 0
8 | 1389356960.190070 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
9 | 1389356960.190377 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
10 | 1389356960.190761 open(".", O_RDONLY) = 3
11 | 1389356960.190894 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
12 | 1389356960.191125 open("./README", O_RDONLY) = 3
13 | 1389356960.191213 read(3, "PatchELF is a simple utility for"..., 32768) = 2814
14 | 1389356960.191296 read(3, "", 32768) = 0
15 | 1389356960.191419 open("./configure.ac", O_RDONLY) = 3
16 | 1389356960.191502 read(3, "AC_INIT(patchelf, m4_esyscmd([ec"..., 32768) = 233
17 | 1389356960.191564 read(3, "", 32768) = 0
18 | 1389356960.191684 open("./Makefile.in", O_RDONLY) = 3
19 | 1389356960.191767 read(3, "# Makefile.in generated by autom"..., 32768) = 18759
20 | 1389356960.191945 write(1, "./Makefile.in:# but WITHOUT ANY "..., 82) = 82
21 | 1389356960.208272 read(3, "", 77824) = 0
22 | 1389356960.208507 open("./src/elf.h", O_RDONLY) = 3
23 | 1389356960.208641 read(3, "/* This file defines standard EL"..., 131072) = 112365
24 | 1389356960.209003 read(3, "", 16384) = 0
25 | 1389356960.209707 open("./depcomp", O_RDONLY) = 3
26 | 1389356960.210019 read(3, "#! /bin/sh\n# depcomp - compile a"..., 131072) = 17867
27 | 1389356960.210293 read(3, "", 110592) = 0
28 | 1389356960.210584 open("./install-sh", O_RDONLY) = 3
29 | 1389356960.210781 read(3, "#!/bin/sh\n# install - install a "..., 131072) = 13620
30 | 1389356960.210937 write(1, "./install-sh:# sell copies of th"..., 90) = 90
31 | 1389356960.211039 read(3, "", 114688) = 0
32 | 1389356960.211232 open("./COPYING", O_RDONLY) = 3
33 | 1389356960.211372 read(3, " GNU GENERAL "..., 131072) = 35147
34 | 1389356960.211516 write(1, "./COPYING: Everyone is permitted"..., 72) = 72
35 | 1389356960.211661 write(1, "./COPYING: Conveying under any "..., 78) = 78
36 | 1389356960.211761 write(1, "./COPYING:beyond what the indivi"..., 80) = 80
37 | 1389356960.219783 open("./tests/simple.c", O_RDONLY) = 3
38 | 1389356960.219866 read(3, "#include \n\nchar buf[16 "..., 131072) = 130
39 | 1389356960.219928 read(3, "", 126976) = 0
40 | 1389356960.220048 open("./tests/main.c", O_RDONLY) = 3
41 | 1389356960.220131 read(3, "#include \n\nchar buf[16 "..., 131072) = 201
42 | 1389356960.220192 read(3, "", 126976) = 0
43 | 1389356960.220617 +++ exited with 0 +++
44 |
--------------------------------------------------------------------------------
/tests/data/grep3/trace/t.2799712:
--------------------------------------------------------------------------------
1 | 1389356960.187620 execve("/bin/grep", ["grep", "-r", ".", "-e", "permit"], [/* 22 vars */]) = 0
2 | 1389356960.188284 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
3 | 1389356960.188483 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
4 | 1389356960.188538 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
5 | 1389356960.188852 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
6 | 1389356960.189013 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389356960.189465 arch_prctl(ARCH_SET_FS, 0x7f163e89f700) = 0
8 | 1389356960.190070 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
9 | 1389356960.190377 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
10 | 1389356960.190761 open(".", O_RDONLY) = 3
11 | 1389356960.190894 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
12 | 1389356960.191125 open("./README", O_RDONLY) = 3
13 | 1389356960.191213 read(3, "PatchELF is a simple utility for"..., 32768) = 2814
14 | 1389356960.191296 read(3, "", 32768) = 0
15 | 1389356960.209707 open("./depcomp", O_RDONLY) = 3
16 | 1389356960.211516 write(1, "./COPYING: Everyone is permitted"..., 72) = 72
17 | 1389356960.211761 write(1, "./COPYING:beyond what the indivi"..., 80) = 80
18 | 1389356960.219783 open("./tests/simple.c", O_RDONLY) = 3
19 | 1389356960.219784 rename("./tests/simple.c", "/tmp/tests/simple.c") = 3
20 | 1389356960.219785 rename("/tmp/tests/simple.c", "./tests/simple.c") = 3
21 | 1389356960.219866 read(3, "#include \n\nchar buf[16 "..., 131072) = 130
22 | 1389356960.219928 read(3, "", 126976) = 0
23 | 1389356960.220048 open("./tests/main.c", O_RDONLY) = 3
24 | 1389356960.220049 vfork() = 2799713
25 | 1389356960.220131 read(3, "#include \n\nchar buf[16 "..., 131072) = 201
26 | 1389356960.220192 read(3, "", 126976) = 0
27 | 1389356960.220617 +++ exited with 0 +++
28 |
--------------------------------------------------------------------------------
/tests/data/grep3/trace/t.2799713:
--------------------------------------------------------------------------------
1 | 1389356960.187621 execve("/bin/grep", ["grep", "-r", ".", "-e", "permit"], [/* 22 vars */]) = 0
2 | 1389356960.188284 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
3 | 1389356960.188483 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
4 | 1389356960.188538 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
5 | 1389356960.188852 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
6 | 1389356960.189013 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389356960.189465 arch_prctl(ARCH_SET_FS, 0x7f163e89f700) = 0
8 | 1389356960.190070 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
9 | 1389356960.190377 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
10 | 1389356960.190761 open(".", O_RDONLY) = 3
11 | 1389356960.190894 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
12 | 1389356960.191125 open("./README", O_RDONLY) = 3
13 | 1389356960.191213 read(3, "PatchELF is a simple utility for"..., 32768) = 2814
14 | 1389356960.191296 read(3, "", 32768) = 0
15 | 1389356960.191419 open("./configure.ac", O_RDONLY) = 3
16 | 1389356960.191502 read(3, "AC_INIT(patchelf, m4_esyscmd([ec"..., 32768) = 233
17 | 1389356960.191564 read(3, "", 32768) = 0
18 | 1389356960.191684 open("./Makefile.in", O_RDONLY) = 3
19 | 1389356960.191767 read(3, "# Makefile.in generated by autom"..., 32768) = 18759
20 | 1389356960.191945 write(1, "./Makefile.in:# but WITHOUT ANY "..., 82) = 82
21 | 1389356960.208272 read(3, "", 77824) = 0
22 | 1389356960.208507 open("./src/elf.h", O_RDONLY) = 3
23 | 1389356960.208641 read(3, "/* This file defines standard EL"..., 131072) = 112365
24 | 1389356960.209003 read(3, "", 16384) = 0
25 | 1389356960.209707 open("./depcomp", O_RDONLY) = 3
26 | 1389356960.210019 read(3, "#! /bin/sh\n# depcomp - compile a"..., 131072) = 17867
27 | 1389356960.210293 read(3, "", 110592) = 0
28 | 1389356960.210584 open("./install-sh", O_RDONLY) = 3
29 | 1389356960.210781 read(3, "#!/bin/sh\n# install - install a "..., 131072) = 13620
30 | 1389356960.210937 write(1, "./install-sh:# sell copies of th"..., 90) = 90
31 | 1389356960.211039 read(3, "", 114688) = 0
32 | 1389356960.211232 open("./COPYING", O_RDONLY) = 3
33 | 1389356960.211372 read(3, " GNU GENERAL "..., 131072) = 35147
34 | 1389356960.211516 write(1, "./COPYING: Everyone is permitted"..., 72) = 72
35 | 1389356960.211661 write(1, "./COPYING: Conveying under any "..., 78) = 78
36 | 1389356960.211761 write(1, "./COPYING:beyond what the indivi"..., 80) = 80
37 | 1389356960.219783 open("./tests/simple.c", O_RDONLY) = 3
38 | 1389356960.219866 read(3, "#include \n\nchar buf[16 "..., 131072) = 130
39 | 1389356960.219928 read(3, "", 126976) = 0
40 | 1389356960.220048 open("./tests/main.c", O_RDONLY) = 3
41 | 1389356960.220131 read(3, "#include \n\nchar buf[16 "..., 131072) = 201
42 | 1389356960.220192 read(3, "", 126976) = 0
43 | 1389356960.220193 vfork() = 2799714
44 | 1389356960.220617 +++ exited with 0 +++
45 |
--------------------------------------------------------------------------------
/tests/data/grep3/trace/t.2799714:
--------------------------------------------------------------------------------
1 | 1389356960.187622 execve("/bin/grep", ["grep", "-r", ".", "-e", "permit"], [/* 22 vars */]) = 0
2 | 1389356960.220192 read(3, "", 126976) = 0
3 | 1389356960.220617 +++ exited with 0 +++
4 |
--------------------------------------------------------------------------------
/tests/data/interleaving/trace/cp-trace.1:
--------------------------------------------------------------------------------
1 | 1389729883.639170 execve("/bin/cp", ["cp", "c", "d", "dir"], [/* 19 vars */]) = 0
2 | 1389729883.639590 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20T\0\0\0\0\0\0"..., 832) = 832
3 | 1389729883.639774 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340!\0\0\0\0\0\0"..., 832) = 832
4 | 1389729883.639909 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\33\0\0\0\0\0\0"..., 832) = 832
5 | 1389729883.640048 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\17\0\0\0\0\0\0"..., 832) = 832
6 | 1389729883.640171 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389729883.640310 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
8 | 1389729883.640451 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200l\0\0\0\0\0\0"..., 832) = 832
9 | 1389729883.641170 read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 406
10 | 1389729883.641217 read(3, "", 1024) = 0
11 | 1389729883.641412 read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 406
12 | 1389729883.641445 read(3, "", 1024) = 0
13 | 1389729883.641658 read(3, "3\n", 32768) = 2
14 | 1389729883.641686 write(4, "3\n", 2) = 2
15 | 1389729883.641718 read(3, "", 32768) = 0
16 | 1389729883.641875 read(3, "4\n", 32768) = 2
17 | 1389729883.641898 write(4, "4\n", 2) = 2
18 | 1389729883.641926 read(3, "", 32768) = 0
19 | 1389729883.642144 +++ exited with 0 +++
--------------------------------------------------------------------------------
/tests/data/interleaving/trace/cp-trace.2:
--------------------------------------------------------------------------------
1 | 1389729883.639170 execve("/bin/cp", ["cp", "c", "d", "dir"], [/* 19 vars */]) = 0
2 | 1389729883.639590 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20T\0\0\0\0\0\0"..., 832) = 832
3 | 1389729883.639774 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340!\0\0\0\0\0\0"..., 832) = 832
4 | 1389729883.639909 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\33\0\0\0\0\0\0"..., 832) = 832
5 | 1389729883.640048 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\17\0\0\0\0\0\0"..., 832) = 832
6 | 1389729883.640171 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389729883.640310 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
8 | 1389729883.640451 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200l\0\0\0\0\0\0"..., 832) = 832
9 | 1389729883.641170 read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 406
10 | 1389729883.641217 read(3, "", 1024) = 0
11 | 1389729883.641412 read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 406
12 | 1389729883.641445 read(3, "", 1024) = 0
13 | 1389729883.641658 read(3, "3\n", 32768) = 2
14 | 1389729883.641686 write(4, "3\n", 2) = 2
15 | 1389729883.641718 read(3, "", 32768) = 0
16 | 1389729883.641875 read(3, "4\n", 32768) = 2
17 | 1389729883.641898 write(4, "4\n", 2) = 2
18 | 1389729883.641926 read(3, "", 32768) = 0
19 | 1389729883.642144 +++ exited with 0 +++
--------------------------------------------------------------------------------
/tests/data/interleaving/trace/same_name.15480:
--------------------------------------------------------------------------------
1 | 1392637437.085484 execve("/bin/cp", ["cp", "--preserve=timestamps", "systemsupport", "hardware.sh", "software.sh", "config.sh", "events.sh", "resource.sh", "alarm.sh", "logreport.sh", "mainreport.sh", "/home/nexb/bin"], [/* 12 vars */]) = 0
2 | 1392637437.104635 read(3, "#! /bin/sh\n#\n# $Id: hardware"..., 32768) = 2266
3 | 1392637437.104748 write(4, "#! /bin/sh\n#\n# $Id: hardware"..., 2266) = 2266
4 | 1392637437.106367 read(3, "#!/bin/bash\n#\n# $Id: hardwareR"..., 32768) = 1039
5 | 1392637437.106479 write(4, "#!/bin/bash\n#\n# $Id: hardware"..., 1039) = 1039
6 | 1392637437.118355 exit_group(0) = ?
7 | 1392637437.118743 +++ exited with 0 +++
--------------------------------------------------------------------------------
/tests/data/inventory/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/inventory/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/lists/trace/t.2799712:
--------------------------------------------------------------------------------
1 | 1389356960.187620 execve("/bin/grep", ["grep", "-r", ".", "-e", "permit"], [/* 22 vars */]) = 0
2 | 1389356960.188284 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
3 | 1389356960.188483 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
4 | 1389356960.188538 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
5 | 1389356960.188852 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
6 | 1389356960.189013 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389356960.189465 arch_prctl(ARCH_SET_FS, 0x7f163e89f700) = 0
8 | 1389356960.190070 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
9 | 1389356960.190377 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
10 | 1389356960.190761 open(".", O_RDONLY) = 3
11 | 1389356960.190894 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
12 | 1389356960.191125 open("./README", O_RDONLY) = 3
13 | 1389356960.191213 read(3, "PatchELF is a simple utility for"..., 32768) = 2814
14 | 1389356960.191296 read(3, "", 32768) = 0
15 | 1389356960.191419 open("./configure.ac", O_RDONLY) = 3
16 | 1389356960.191502 read(3, "AC_INIT(patchelf, m4_esyscmd([ec"..., 32768) = 233
17 | 1389356960.191564 read(3, "", 32768) = 0
18 | 1389356960.191684 open("./Makefile.in", O_RDONLY) = 3
19 | 1389356960.191767 read(3, "# Makefile.in generated by autom"..., 32768) = 18759
20 | 1389356960.191945 write(1, "./Makefile.in:# but WITHOUT ANY "..., 82) = 82
21 | 1389356960.208272 read(3, "", 77824) = 0
22 | 1389356960.208507 open("./src/elf.h", O_RDONLY) = 3
23 | 1389356960.208641 read(3, "/* This file defines standard EL"..., 131072) = 112365
24 | 1389356960.209003 read(3, "", 16384) = 0
25 | 1389356960.209707 open("./depcomp", O_RDONLY) = 3
26 | 1389356960.210019 read(3, "#! /bin/sh\n# depcomp - compile a"..., 131072) = 17867
27 | 1389356960.210293 read(3, "", 110592) = 0
28 | 1389356960.210584 open("./install-sh", O_RDONLY) = 3
29 | 1389356960.210781 read(3, "#!/bin/sh\n# install - install a "..., 131072) = 13620
30 | 1389356960.210937 write(1, "./install-sh:# sell copies of th"..., 90) = 90
31 | 1389356960.211039 read(3, "", 114688) = 0
32 | 1389356960.211232 open("./COPYING", O_RDONLY) = 3
33 | 1389356960.211372 read(3, " GNU GENERAL "..., 131072) = 35147
34 | 1389356960.211516 write(1, "./COPYING: Everyone is permitted"..., 72) = 72
35 | 1389356960.211661 write(1, "./COPYING: Conveying under any "..., 78) = 78
36 | 1389356960.211761 write(1, "./COPYING:beyond what the indivi"..., 80) = 80
37 | 1389356960.219783 open("./tests/simple.c", O_RDONLY) = 3
38 | 1389356960.219866 read(3, "#include \n\nchar buf[16 "..., 131072) = 130
39 | 1389356960.219928 read(3, "", 126976) = 0
40 | 1389356960.220048 open("./tests/main.c", O_RDONLY) = 3
41 | 1389356960.220131 read(3, "#include \n\nchar buf[16 "..., 131072) = 201
42 | 1389356960.220192 read(3, "", 126976) = 0
43 | 1389356960.220617 +++ exited with 0 +++
44 |
--------------------------------------------------------------------------------
/tests/data/lists_patchelf/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/lists_patchelf/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/parse_does_not_hang/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/parse_does_not_hang/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/parse_entry/basic.trace:
--------------------------------------------------------------------------------
1 | 1389171522.375781 execve("/usr/bin/make", ["make"], [/* 22 vars */]) = 0
2 | 1389171522.376446 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 4
3 | 1389171522.376468 read(4, "\177ELF\2\1\1"..., 832) = 832
4 | 1389171522.376782 arch_prctl(ARCH_SET_FS, 0x7ff784398700) = 0
5 | 1389171522.377455 getcwd("/home/nexb/tools/strace/strace-4.8", 4096) = 35
6 | 1389171522.377657 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
7 | 1389171522.377780 open("Makefile", O_RDONLY) = 4
8 | 1389171522.392265 openat(AT_FDCWD, "linux/x86_64", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
9 | 1389171522.392467 write(1, "/bin/mkdir -p ./linux\n", 22) = 22
10 | 1389171522.392584 vfork() = 2453403
11 | 1389171528.651642 chdir("/home/nexb/tools/strace/strace-4.8") = 0
12 | 1390356496.673733 execve("/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1", ["/usr/lib/gcc/x86_64-linux-gnu/4."..., "-quiet", "-I", ".", "-I", ".", "-I", "./include", "-I", "./lib", "-imultilib", ".", "-imultiarch", "x86_64-linux-gnu", "-D", "PROGRAM=\"bash\"", ...], [/* 28 vars */]) = 0
13 |
--------------------------------------------------------------------------------
/tests/data/parse_entry/space.trace:
--------------------------------------------------------------------------------
1 | 1389171522.375781 execve("/usr/bin/ma ke", ["make"], [/* 22 vars */]) = 0
2 | 1389171522.376446 open("/lib/x86_64-linux -gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 4
3 | 1389171522.376468 read(4, "\177ELF\2\1\1"..., 832) = 832
4 | 1389171522.376782 arch_prctl(ARCH_SET_FS, 0x7ff784398700) = 0
5 | 1389171522.377455 getcwd("/home/nexb/tools/str ace/strace-4.8", 4096) = 35
6 | 1389171522.377657 openat(AT_FDCWD, "some path", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
7 | 1389171522.377780 open("Makefile", O_RDONLY) = 4
8 | 1389171522.392265 openat(AT_FDCWD, "lin ux/x86_64", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 4
9 | 1389171522.392467 write(1, "/bin/mkdir -p ./linux\n", 22) = 22
10 | 1389171522.392584 vfork() = 2453403
11 | 1389171528.651642 chdir("/home/nexb/tools/str ace/strace-4.8") = 0
12 | 1390356496.673733 execve("/usr/lib/gcc/x86 _64-linux-gnu/4.6/cc1", ["/usr/lib/gcc/x86_64-linux-gnu/4."..., "-quiet", "-I", ".", "-I", ".", "-I", "./include", "-I", "./lib", "-imultilib", ".", "-imultiarch", "x86_64-linux-gnu", "-D", "PROGRAM=\"bash\"", ...], [/* 28 vars */]) = 0
13 |
--------------------------------------------------------------------------------
/tests/data/parse_error/trace.1:
--------------------------------------------------------------------------------
1 | 1392371311.787435 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
2 | 1392371311.787476 rt_sigaction(SIGTSTP, {SIG_DFL, [], SA_RESTORER, 0x374bc302d0}, {SIG_DFL, [], 0}, 8) = 0
3 | 1392371311.787534 rt_sigaction(SIGTTIN, {SIG_DFL, [], SA_RESTORER, 0x374bc302d0}, {SIG_DFL, [], 0}, 8) = 0
4 | 1392371311.787600 rt_sigaction(SIGTTOU, {SIG_DFL, [], SA_RESTORER, 0x374bc302d0}, {SIG_DFL, [], 0}, 8) = 0
5 | 1392371311.787667 rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x374bc302d0}, {SIG_DFL, [], SA_RESTORER, 0x374bc302d0}, 8) = 0
6 | 1392371311.787730 rt_sigaction(SIGQUIT, {SIG_DFL, [], SA_RESTORER, 0x374bc302d0}, {SIG_IGN, [], SA_RESTORER, 0x374bc302d0}, 8) = 0
7 | 1392371311.787788 rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER, 0x374bc302d0}, {0x436360, [], SA_RESTORER, 0x374bc302d0}, 8) = 0
8 | 1392371311.787854 rt_sigaction(SIGCHLD, {0x436360, [], SA_RESTORER, 0x374bc302d0}, {SIG_DFL, [], SA_RESTORER, 0x374bc302d0}, 8) = 0
9 | 1392371311.787918 rt_sigaction(SIGINT, {0x4484f0, [], SA_RESTORER, 0x374bc302d0}, {SIG_DFL, [], SA_RESTORER, 0x374bc302d0}, 8) = 0
10 | 1392371311.787984 dup2(4, 1) = 1
11 | 1392371311.788036 close(4) = 0
12 | 1392371311.788072 close(3) = 0
13 | 1392371311.788141 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
14 | 1392371311.788196 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
15 | 1392371311.788318 rt_sigprocmask(SIG_BLOCK, [INT CHLD], [], 8) = 0
16 | 1392371311.788366 clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2b0fe7018520) = 14954
17 | 1392371311.788570 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
18 | 1392371311.788605 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
19 | 1392371311.788669 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
20 | 1392371311.788701 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
21 | 1392371311.788742 rt_sigaction(SIGINT, {0x436f40, [], SA_RESTORER, 0x374bc302d0}, {0x4484f0, [], SA_RESTORER, 0x374bc302d0}, 8) = 0
22 | 1392371311.788802 wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 14954
23 | 1392371311.792605 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
24 | 1392371311.792643 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14954, si_status=0, si_utime=0, si_stime=0} ---
25 | 1392371311.792663 wait4(-1, 0x7fffb6350854, WNOHANG, NULL) = -1 ECHILD (No child processes)
26 | 1392371311.792698 rt_sigreturn() = 0
27 | 1392371311.792728 rt_sigaction(SIGINT, {0x4484f0, [], SA_RESTORER, 0x374bc302d0}, {0x436f40, [], SA_RESTORER, 0x374bc302d0}, 8) = 0
28 | 1392371311.792846 exit_group(0) = ?
29 | 1392371311.792921 +++ exited with 0 +++
--------------------------------------------------------------------------------
/tests/data/patchelf_command/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/patchelf_command/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/patchelf_command2/expected_pformats.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/patchelf_command2/expected_pformats.tar.bz2
--------------------------------------------------------------------------------
/tests/data/patchelf_command2/ignored_reads.lst:
--------------------------------------------------------------------------------
1 | /foo/*
2 | -/foobar/*
3 | /bar/*
--------------------------------------------------------------------------------
/tests/data/patchelf_command2/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/patchelf_command2/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_cups/expected_pformats.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_cups/expected_pformats.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_cups/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_cups/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_grep2/expected_pformats.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_grep2/expected_pformats.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_grep2/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_grep2/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_grep3/expected_pformats.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_grep3/expected_pformats.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_grep3/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_grep3/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_patchelf/expected_pformats.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_patchelf/expected_pformats.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_patchelf/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_patchelf/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_strace_cleaning/expected_pformats.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_strace_cleaning/expected_pformats.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_strace_cleaning/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_strace_cleaning/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_strace_cleaning_dir/expected_pformats.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_strace_cleaning_dir/expected_pformats.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_strace_cleaning_dir/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_strace_cleaning_dir/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_strace_full/expected_pformats.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_strace_full/expected_pformats.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_strace_full/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_strace_full/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_strace_saved/expected_pformats.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_strace_saved/expected_pformats.tar.bz2
--------------------------------------------------------------------------------
/tests/data/pformat_strace_saved/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/pformat_strace_saved/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/render_graph/expected.dot:
--------------------------------------------------------------------------------
1 | digraph G {
2 | rankdir="LR";
3 | "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
4 | "/home/license" [];
5 | "/home/nexb/tools/patchelf/patchelf-0.5/COPYING" [];
6 | "/home/nexb/tools/patchelf/patchelf-0.5/Makefile.in" [];
7 | "/home/nexb/tools/patchelf/patchelf-0.5/README" [];
8 | "/home/nexb/tools/patchelf/patchelf-0.5/configure.ac" [];
9 | "/home/nexb/tools/patchelf/patchelf-0.5/depcomp" [];
10 | "/home/nexb/tools/patchelf/patchelf-0.5/install-sh" [];
11 | "/home/nexb/tools/patchelf/patchelf-0.5/src/elf.h" [];
12 | "/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf" [];
13 | "/home/nexb/tools/patchelf/patchelf-0.5/tests/main.c" [];
14 | "/home/nexb/tools/patchelf/patchelf-0.5/tests/simple.c" [];
15 | "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" -> "/home/license" [];
16 | "/home/nexb/tools/patchelf/patchelf-0.5/COPYING" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
17 | "/home/nexb/tools/patchelf/patchelf-0.5/Makefile.in" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
18 | "/home/nexb/tools/patchelf/patchelf-0.5/README" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
19 | "/home/nexb/tools/patchelf/patchelf-0.5/configure.ac" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
20 | "/home/nexb/tools/patchelf/patchelf-0.5/depcomp" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
21 | "/home/nexb/tools/patchelf/patchelf-0.5/install-sh" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
22 | "/home/nexb/tools/patchelf/patchelf-0.5/src/elf.h" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
23 | "/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
24 | "/home/nexb/tools/patchelf/patchelf-0.5/tests/main.c" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
25 | "/home/nexb/tools/patchelf/patchelf-0.5/tests/simple.c" -> "/bin/grep 2799712, 1389356960.191213:1389356960.220131-0" [];
26 | }
27 |
--------------------------------------------------------------------------------
/tests/data/render_graph/trace/t.2799712:
--------------------------------------------------------------------------------
1 | 1389356960.187620 execve("/bin/grep", ["grep", "-r", ".", "-e", "permit"], [/* 22 vars */]) = 0
2 | 1389356960.188284 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
3 | 1389356960.188483 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
4 | 1389356960.188538 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0"..., 832) = 832
5 | 1389356960.188852 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
6 | 1389356960.189013 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0"..., 832) = 832
7 | 1389356960.189465 arch_prctl(ARCH_SET_FS, 0x7f163e89f700) = 0
8 | 1389356960.190070 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
9 | 1389356960.190377 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 3
10 | 1389356960.190761 open(".", O_RDONLY) = 3
11 | 1389356960.190894 openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
12 | 1389356960.191125 open("./README", O_RDONLY) = 3
13 | 1389356960.191213 read(3, "PatchELF is a simple utility for"..., 32768) = 2814
14 | 1389356960.191296 read(3, "", 32768) = 0
15 | 1389356960.191419 open("./configure.ac", O_RDONLY) = 3
16 | 1389356960.191502 read(3, "AC_INIT(patchelf, m4_esyscmd([ec"..., 32768) = 233
17 | 1389356960.191564 read(3, "", 32768) = 0
18 | 1389356960.191684 open("./Makefile.in", O_RDONLY) = 3
19 | 1389356960.191767 read(3, "# Makefile.in generated by autom"..., 32768) = 18759
20 | 1389356960.191945 write(1, "./Makefile.in:# but WITHOUT ANY "..., 82) = 82
21 | 1389356960.208272 read(3, "", 77824) = 0
22 | 1389356960.208507 open("./src/elf.h", O_RDONLY) = 3
23 | 1389356960.208641 read(3, "/* This file defines standard EL"..., 131072) = 112365
24 | 1389356960.209003 read(3, "", 16384) = 0
25 | 1389356960.209707 open("./depcomp", O_RDONLY) = 3
26 | 1389356960.210019 read(3, "#! /bin/sh\n# depcomp - compile a"..., 131072) = 17867
27 | 1389356960.210293 read(3, "", 110592) = 0
28 | 1389356960.210584 open("./install-sh", O_RDONLY) = 3
29 | 1389356960.210781 read(3, "#!/bin/sh\n# install - install a "..., 131072) = 13620
30 | 1389356960.210937 write(1, "./install-sh:# sell copies of th"..., 90) = 90
31 | 1389356960.211039 read(3, "", 114688) = 0
32 | 1389356960.211232 open("./COPYING", O_RDONLY) = 3
33 | 1389356960.211372 read(3, " GNU GENERAL "..., 131072) = 35147
34 | 1389356960.211516 write(1, "./COPYING: Everyone is permitted"..., 72) = 72
35 | 1389356960.211661 write(1, "./COPYING: Conveying under any "..., 78) = 78
36 | 1389356960.211761 write(1, "./COPYING:beyond what the indivi"..., 80) = 80
37 | 1389356960.219783 open("./tests/simple.c", O_RDONLY) = 3
38 | 1389356960.219866 read(3, "#include \n\nchar buf[16 "..., 131072) = 130
39 | 1389356960.219928 read(3, "", 126976) = 0
40 | 1389356960.220048 open("./tests/main.c", O_RDONLY) = 3
41 | 1389356960.220131 read(3, "#include \n\nchar buf[16 "..., 131072) = 201
42 | 1389356960.220192 read(3, "", 126976) = 0
43 | 1389356960.220617 +++ exited with 0 +++
44 |
--------------------------------------------------------------------------------
/tests/data/render_graph_bash/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/render_graph_bash/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/render_graph_cups/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/render_graph_cups/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/render_graph_patchelf/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/render_graph_patchelf/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/render_graph_patchelf2/expected.dot:
--------------------------------------------------------------------------------
1 | digraph G {
2 | rankdir="LR";
3 | "/bin/bash, /usr/bin/g++ 2800292, 1389366380.258544:1389366380.258544-0" [];
4 | "/home/nexb/tools/patchelf/patchelf-0.5/src/elf.h" [];
5 | "/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf" [];
6 | "/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.cc" [];
7 | "/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.o" [];
8 | "/tmp/ccSJnJSm.s" [];
9 | "/usr/bin/as 2800294, 1389366382.835362:1389366383.032517-0" [];
10 | "/usr/bin/ld 2800299, 1389366383.116154:1389366383.322328-0" [];
11 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus 2800293, 1389366380.268494:1389366382.813827-0" [];
12 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/limits.h" [];
13 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/syslimits.h" [];
14 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdarg.h" [];
15 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stddef.h" [];
16 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdint.h" [];
17 | "/bin/bash, /usr/bin/g++ 2800292, 1389366380.258544:1389366380.258544-0" -> "/tmp/ccSJnJSm.s" [];
18 | "/home/nexb/tools/patchelf/patchelf-0.5/src/elf.h" -> "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus 2800293, 1389366380.268494:1389366382.813827-0" [];
19 | "/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.cc" -> "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus 2800293, 1389366380.268494:1389366382.813827-0" [];
20 | "/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.o" -> "/usr/bin/ld 2800299, 1389366383.116154:1389366383.322328-0" [];
21 | "/tmp/ccSJnJSm.s" -> "/usr/bin/as 2800294, 1389366382.835362:1389366383.032517-0" [];
22 | "/usr/bin/as 2800294, 1389366382.835362:1389366383.032517-0" -> "/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf.o" [];
23 | "/usr/bin/ld 2800299, 1389366383.116154:1389366383.322328-0" -> "/home/nexb/tools/patchelf/patchelf-0.5/src/patchelf" [];
24 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus 2800293, 1389366380.268494:1389366382.813827-0" -> "/tmp/ccSJnJSm.s" [];
25 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/limits.h" -> "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus 2800293, 1389366380.268494:1389366382.813827-0" [];
26 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed/syslimits.h" -> "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus 2800293, 1389366380.268494:1389366382.813827-0" [];
27 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdarg.h" -> "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus 2800293, 1389366380.268494:1389366382.813827-0" [];
28 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stddef.h" -> "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus 2800293, 1389366380.268494:1389366382.813827-0" [];
29 | "/usr/lib/gcc/x86_64-linux-gnu/4.6/include/stdint.h" -> "/usr/lib/gcc/x86_64-linux-gnu/4.6/cc1plus 2800293, 1389366380.268494:1389366382.813827-0" [];
30 | }
31 |
--------------------------------------------------------------------------------
/tests/data/render_graph_patchelf2/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/render_graph_patchelf2/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/render_graph_strace/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/render_graph_strace/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/stats_patchelf/expected:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/stats_patchelf/expected
--------------------------------------------------------------------------------
/tests/data/stats_patchelf/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/stats_patchelf/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/strace2/trace/strace2.2453403:
--------------------------------------------------------------------------------
1 | 1389171522.392656 execve("/bin/bash", ["/bin/bash", "-c", "/bin/mkdir -p ./linux"], [/* 25 vars */]) = 0
2 | 1389171522.393003 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
3 | 1389171522.393086 open("/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 4
4 | 1389171522.393109 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\301\0\0\0\0\0\0@\0\0\0\0\0\0\0 g\2\0\0\0\0\0\0\0\0\0@\0008\0\7\0@\0\33\0\32\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\304\36\2\0\0\0\0\0\304\36\2\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\310-\2\0\0\0\0\0\310-\"\0\0\0\0\0\310-\"\0\0\0\0\0X8\0\0\0\0\0\0x>\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0h]\2\0\0\0\0\0h]\"\0\0\0\0\0h]\"\0\0\0\0\0\220\1\0\0\0\0\0\0\220\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\310\1\0\0\0\0\0\0\310\1\0\0\0\0\0\0"..., 832) = 832
5 | 1389171522.393251 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 4
6 | 1389171522.393274 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0@\0\0\0\0\0\0\0\2601\0\0\0\0\0\0\0\0\0\0@\0008\0\t\0@\0 \0\37\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\370\1\0\0\0\0\0\0\370\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230\37\0\0\0\0\0\0\230\37\0\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0H-\0\0\0\0\0\0H- \0\0\0\0\0"..., 832) = 832
7 | 1389171522.393389 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 4
8 | 1389171522.393412 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0@\0\0\0\0\0\0\0\370\251\33\0\0\0\0\0\0\0\0\0@\0008\0\n\0@\0#\0\"\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0000\2\0\0\0\0\0\0000\2\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34I\33\0\0\0\0\0\34I\33\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\0W\33\0\0\0\0\0\0W;\0\0\0\0\0"..., 832) = 832
9 | 1389171522.393570 arch_prctl(ARCH_SET_FS, 0x2aaaaaaea640) = 0
10 | 1389171522.393798 open("/dev/tty", O_RDWR|O_NONBLOCK) = 4
11 | 1389171522.393885 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 4
12 | 1389171522.394095 open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 4
13 | 1389171522.394148 read(4, "MemTotal: 12255004 kB\nMemFree: 146996 kB\nBuffers: 1435396 kB\nCached: 7897896 kB\nSwapCached: 187016 kB\nActive: 2352888 kB\nInactive: 8550408 kB\nActive(anon): 812692 kB\nInactive(anon): 757640 kB\nActi"..., 1024) = 1024
14 | 1389171522.394491 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 4
15 | 1389171522.394998 execve("/bin/mkdir", ["/bin/mkdir", "-p", "./linux"], [/* 24 vars */]) = 0
16 | 1389171522.395330 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
17 | 1389171522.395411 open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 4
18 | 1389171522.395433 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20T\0\0\0\0\0\0@\0\0\0\0\0\0\0\320\324\1\0\0\0\0\0\0\0\0\0@\0008\0\10\0@\0\36\0\35\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\301\1\0\0\0\0\0\264\301\1\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\360\314\1\0\0\0\0\0\360\314!\0\0\0\0\0\360\314!\0\0\0\0\0\274\6\0\0\0\0\0\0\200\31\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0`\315\1\0\0\0\0\0`\315!\0\0\0\0\0`\315!\0\0\0\0\0\360\1\0\0\0\0\0\0\360\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\0\0\0"..., 832) = 832
19 | 1389171522.395578 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 4
20 | 1389171522.395602 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0@\0\0\0\0\0\0\0\370\251\33\0\0\0\0\0\0\0\0\0@\0008\0\n\0@\0#\0\"\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0000\2\0\0\0\0\0\0000\2\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34I\33\0\0\0\0\0\34I\33\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\0W\33\0\0\0\0\0\0W;\0\0\0\0\0"..., 832) = 832
21 | 1389171522.395736 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 4
22 | 1389171522.395759 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0@\0\0\0\0\0\0\0\2601\0\0\0\0\0\0\0\0\0\0@\0008\0\t\0@\0 \0\37\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\370\1\0\0\0\0\0\0\370\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230\37\0\0\0\0\0\0\230\37\0\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0H-\0\0\0\0\0\0H- \0\0\0\0\0"..., 832) = 832
23 | 1389171522.395901 arch_prctl(ARCH_SET_FS, 0x2aaaaaaec740) = 0
24 | 1389171522.396166 open("/proc/filesystems", O_RDONLY) = 4
25 | 1389171522.396225 read(4, "nodev\tsysfs\nnodev\trootfs\nnodev\tbdev\nnodev\tproc\nnodev\tcgroup\nnodev\tcpuset\nnodev\ttmpfs\nnodev\tdevtmpfs\nnodev\tdebugfs\nnodev\tsecurityfs\nnodev\tsockfs\nnodev\tpipefs\nnodev\tanon_inodefs\nnodev\tdevpts\n\text3\n\text4\nnodev\tramfs\nnodev\thugetlbfs\n\tvfat\nnodev\tecryptfs\n\tfuseb"..., 1024) = 406
26 | 1389171522.396269 read(4, "", 1024) = 0
27 | 1389171522.396341 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 4
28 | 1389171522.396437 mkdir("linux", 0775) = -1 EEXIST (File exists)
29 | 1389171522.396583 +++ exited with 0 +++
30 |
--------------------------------------------------------------------------------
/tests/data/strace3/trace/dir/not_a_trace_file:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/strace3/trace/dir/not_a_trace_file
--------------------------------------------------------------------------------
/tests/data/strace_mini/trace/strace.2453403:
--------------------------------------------------------------------------------
1 | 1389171522.392656 execve("/bin/bash", ["/bin/bash", "-c", "/bin/mkdir -p ./linux"]c[/* 25 vars */]) = 0
2 | 1389171522.393003 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
3 | 1389171522.393086 open("/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 4
4 | 1389171522.393109 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\301\0\0\0\0\0\0@\0\0\0\0\0\0\0 g\2\0\0\0\0\0\0\0\0\0@\0008\0\7\0@\0\33\0\32\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\304\36\2\0\0\0\0\0\304\36\2\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\310-\2\0\0\0\0\0\310-\"\0\0\0\0\0\310-\"\0\0\0\0\0X8\0\0\0\0\0\0x>\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0h]\2\0\0\0\0\0h]\"\0\0\0\0\0h]\"\0\0\0\0\0\220\1\0\0\0\0\0\0\220\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\310\1\0\0\0\0\0\0\310\1\0\0\0\0\0\0"..., 832) = 832
5 | 1389171522.393251 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 4
6 | 1389171522.393274 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0@\0\0\0\0\0\0\0\2601\0\0\0\0\0\0\0\0\0\0@\0008\0\t\0@\0 \0\37\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\370\1\0\0\0\0\0\0\370\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230\37\0\0\0\0\0\0\230\37\0\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0H-\0\0\0\0\0\0H- \0\0\0\0\0"..., 832) = 832
7 | 1389171522.393389 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 4
8 | 1389171522.393412 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0@\0\0\0\0\0\0\0\370\251\33\0\0\0\0\0\0\0\0\0@\0008\0\n\0@\0#\0\"\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0000\2\0\0\0\0\0\0000\2\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34I\33\0\0\0\0\0\34I\33\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\0W\33\0\0\0\0\0\0W;\0\0\0\0\0"..., 832) = 832
9 | 1389171522.393570 arch_prctl(ARCH_SET_FS, 0x2aaaaaaea640) = 0
10 | 1389171522.393798 open("/dev/tty", O_RDWR|O_NONBLOCK) = 4
11 | 1389171522.393885 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 4
12 | 1389171522.394095 open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 4
13 | 1389171522.394148 read(4, "MemTotal: 12255004 kB\nMemFree: 146996 kB\nBuffers: 1435396 kB\nCached: 7897896 kB\nSwapCached: 187016 kB\nActive: 2352888 kB\nInactive: 8550408 kB\nActive(anon): 812692 kB\nInactive(anon): 757640 kB\nActi"..., 1024) = 1024
14 | 1389171522.394491 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 4
15 | 1389171522.394998 execve("/bin/mkdir", ["/bin/mkdir", "-p", "./linux"], [/* 24 vars */]) = 0
16 | 1389171522.395330 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
17 | 1389171522.395411 open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 4
18 | 1389171522.395433 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20T\0\0\0\0\0\0@\0\0\0\0\0\0\0\320\324\1\0\0\0\0\0\0\0\0\0@\0008\0\10\0@\0\36\0\35\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\301\1\0\0\0\0\0\264\301\1\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\360\314\1\0\0\0\0\0\360\314!\0\0\0\0\0\360\314!\0\0\0\0\0\274\6\0\0\0\0\0\0\200\31\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0`\315\1\0\0\0\0\0`\315!\0\0\0\0\0`\315!\0\0\0\0\0\360\1\0\0\0\0\0\0\360\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\0\0\0"..., 832) = 832
19 | 1389171522.395578 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 4
20 | 1389171522.395602 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0@\0\0\0\0\0\0\0\370\251\33\0\0\0\0\0\0\0\0\0@\0008\0\n\0@\0#\0\"\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0000\2\0\0\0\0\0\0000\2\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34I\33\0\0\0\0\0\34I\33\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\0W\33\0\0\0\0\0\0W;\0\0\0\0\0"..., 832) = 832
21 | 1389171522.395736 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 4
22 | 1389171522.395759 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0@\0\0\0\0\0\0\0\2601\0\0\0\0\0\0\0\0\0\0@\0008\0\t\0@\0 \0\37\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\370\1\0\0\0\0\0\0\370\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230\37\0\0\0\0\0\0\230\37\0\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0H-\0\0\0\0\0\0H- \0\0\0\0\0"..., 832) = 832
23 | 1389171522.395901 arch_prctl(ARCH_SET_FS, 0x2aaaaaaec740) = 0
24 | 1389171522.396166 open("/proc/filesystems", O_RDONLY) = 4
25 | 1389171522.396225 read(4, "nodev\tsysfs\nnodev\trootfs\nnodev\tbdev\nnodev\tproc\nnodev\tcgroup\nnodev\tcpuset\nnodev\ttmpfs\nnodev\tdevtmpfs\nnodev\tdebugfs\nnodev\tsecurityfs\nnodev\tsockfs\nnodev\tpipefs\nnodev\tanon_inodefs\nnodev\tdevpts\n\text3\n\text4\nnodev\tramfs\nnodev\thugetlbfs\n\tvfat\nnodev\tecryptfs\n\tfuseb"..., 1024) = 406
26 | 1389171522.396269 read(4, "", 1024) = 0
27 | 1389171522.396341 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 4
28 | 1389171522.396437 mkdir("linux", 0775) = -1 EEXIST (File exists)
29 | 1389171522.396438 read(4, "/bin/mkdir", [/* 24 vars */]) = 0
30 | 1389171522.396667 write(1, "cat ./linux/ioctlent.h.in ./linux/x86_64/ioctlent.h.in | \\\n\t\tgcc -DHAVE_CONFIG_H -I. -I./linux/x86_64 -I./linux -I./linux -Wall -Wwrite-strings -g -O2 -E -P - | \\\n\t\tLC_ALL=C sort -u -k3,3 -k2,2 | \\\n", 200) = 200
31 | 1389171522.396583 +++ exited with 0 +++
32 |
--------------------------------------------------------------------------------
/tests/data/strace_mini2/trace/strace.2453403:
--------------------------------------------------------------------------------
1 | 1389171522.392656 execve("/bin/bash", ["/bin/bash", "-c", "/bin/mkdir -p ./linux"], [/* 25 vars */]) = 0
2 | 1389171522.393003 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
3 | 1389171522.393086 open("/lib/x86_64-linux-gnu/libtinfo.so.5", O_RDONLY|O_CLOEXEC) = 4
4 | 1389171522.393109 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\301\0\0\0\0\0\0@\0\0\0\0\0\0\0 g\2\0\0\0\0\0\0\0\0\0@\0008\0\7\0@\0\33\0\32\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\304\36\2\0\0\0\0\0\304\36\2\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\310-\2\0\0\0\0\0\310-\"\0\0\0\0\0\310-\"\0\0\0\0\0X8\0\0\0\0\0\0x>\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0h]\2\0\0\0\0\0h]\"\0\0\0\0\0h]\"\0\0\0\0\0\220\1\0\0\0\0\0\0\220\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\310\1\0\0\0\0\0\0\310\1\0\0\0\0\0\0"..., 832) = 832
5 | 1389171522.393251 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 4
6 | 1389171522.393274 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0@\0\0\0\0\0\0\0\2601\0\0\0\0\0\0\0\0\0\0@\0008\0\t\0@\0 \0\37\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\370\1\0\0\0\0\0\0\370\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230\37\0\0\0\0\0\0\230\37\0\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0H-\0\0\0\0\0\0H- \0\0\0\0\0"..., 832) = 832
7 | 1389171522.393389 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 4
8 | 1389171522.393412 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0@\0\0\0\0\0\0\0\370\251\33\0\0\0\0\0\0\0\0\0@\0008\0\n\0@\0#\0\"\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0000\2\0\0\0\0\0\0000\2\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34I\33\0\0\0\0\0\34I\33\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\0W\33\0\0\0\0\0\0W;\0\0\0\0\0"..., 832) = 832
9 | 1389171522.393570 arch_prctl(ARCH_SET_FS, 0x2aaaaaaea640) = 0
10 | 1389171522.393798 open("/dev/tty", O_RDWR|O_NONBLOCK) = 4
11 | 1389171522.393885 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 4
12 | 1389171522.394095 open("/proc/meminfo", O_RDONLY|O_CLOEXEC) = 4
13 | 1389171522.394148 read(4, "MemTotal: 12255004 kB\nMemFree: 146996 kB\nBuffers: 1435396 kB\nCached: 7897896 kB\nSwapCached: 187016 kB\nActive: 2352888 kB\nInactive: 8550408 kB\nActive(anon): 812692 kB\nInactive(anon): 757640 kB\nActi"..., 1024) = 1024
14 | 1389171522.394491 open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache", O_RDONLY) = 4
15 | 1389171522.394998 execve("/bin/mkdir", ["/bin/mkdir", "-p", "./linux"], [/* 24 vars */]) = 0
16 | 1389171522.395330 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
17 | 1389171522.395411 open("/lib/x86_64-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 4
18 | 1389171522.395433 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\20T\0\0\0\0\0\0@\0\0\0\0\0\0\0\320\324\1\0\0\0\0\0\0\0\0\0@\0008\0\10\0@\0\36\0\35\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\264\301\1\0\0\0\0\0\264\301\1\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\360\314\1\0\0\0\0\0\360\314!\0\0\0\0\0\360\314!\0\0\0\0\0\274\6\0\0\0\0\0\0\200\31\0\0\0\0\0\0\0\0 \0\0\0\0\0\2\0\0\0\6\0\0\0`\315\1\0\0\0\0\0`\315!\0\0\0\0\0`\315!\0\0\0\0\0\360\1\0\0\0\0\0\0\360\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0\2\0\0\0\0\0\0\0\2\0\0\0\0\0\0"..., 832) = 832
19 | 1389171522.395578 open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 4
20 | 1389171522.395602 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\30\2\0\0\0\0\0@\0\0\0\0\0\0\0\370\251\33\0\0\0\0\0\0\0\0\0@\0008\0\n\0@\0#\0\"\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0000\2\0\0\0\0\0\0000\2\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\20K\30\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\34I\33\0\0\0\0\0\34I\33\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0\0W\33\0\0\0\0\0\0W;\0\0\0\0\0"..., 832) = 832
21 | 1389171522.395736 open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 4
22 | 1389171522.395759 read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\r\0\0\0\0\0\0@\0\0\0\0\0\0\0\2601\0\0\0\0\0\0\0\0\0\0@\0008\0\t\0@\0 \0\37\0\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0\370\1\0\0\0\0\0\0\370\1\0\0\0\0\0\0\10\0\0\0\0\0\0\0\3\0\0\0\4\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\320\31\0\0\0\0\0\0\34\0\0\0\0\0\0\0\34\0\0\0\0\0\0\0\20\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\230\37\0\0\0\0\0\0\230\37\0\0\0\0\0\0\0\0 \0\0\0\0\0\1\0\0\0\6\0\0\0H-\0\0\0\0\0\0H- \0\0\0\0\0"..., 832) = 832
23 | 1389171522.395901 arch_prctl(ARCH_SET_FS, 0x2aaaaaaec740) = 0
24 | 1389171522.396166 open("/proc/filesystems", O_RDONLY) = 4
25 | 1389171522.396225 read(4, "nodev\tsysfs\nnodev\trootfs\nnodev\tbdev\nnodev\tproc\nnodev\tcgroup\nnodev\tcpuset\nnodev\ttmpfs\nnodev\tdevtmpfs\nnodev\tdebugfs\nnodev\tsecurityfs\nnodev\tsockfs\nnodev\tpipefs\nnodev\tanon_inodefs\nnodev\tdevpts\n\text3\n\text4\nnodev\tramfs\nnodev\thugetlbfs\n\tvfat\nnodev\tecryptfs\n\tfuseb"..., 1024) = 406
26 | 1389171522.396269 read(4, "", 1024) = 0
27 | 1389171522.377832 read(4, "# Makefile.in generated by automake 1.11.6 from Makefile.am.\n# Makefile. Generated from Makefile.in by configure.\n\n# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,\n# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software\n#"..., 4096) = 4096
28 | 1389171522.396341 open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 4
29 | 1389171522.396438 read(4, "/bin/mkdir", [/* 24 vars */]) = 0
30 | 1389171522.396437 mkdir("linux", 0775) = -1 EEXIST (File exists)
31 | 1389171522.396583 +++ exited with 0 +++
32 |
--------------------------------------------------------------------------------
/tests/data/validate/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/validate/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/data/validate_out_of_order/trace-archive.tar.bz2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aboutcode-org/tracecode-toolkit-strace/b8db222edc085924fc12477a2c787362098be16d/tests/data/validate_out_of_order/trace-archive.tar.bz2
--------------------------------------------------------------------------------
/tests/test_skeleton_codestyle.py:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (c) nexB Inc. and others. All rights reserved.
3 | # ScanCode is a trademark of nexB Inc.
4 | # SPDX-License-Identifier: Apache-2.0
5 | # See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6 | # See https://github.com/aboutcode-org/skeleton for support or download.
7 | # See https://aboutcode.org for more information about nexB OSS projects.
8 | #
9 |
10 | import subprocess
11 | import unittest
12 | import configparser
13 |
14 |
15 | class BaseTests(unittest.TestCase):
16 | def test_skeleton_codestyle(self):
17 | """
18 | This test shouldn't run in proliferated repositories.
19 | """
20 | setup_cfg = configparser.ConfigParser()
21 | setup_cfg.read("setup.cfg")
22 | if setup_cfg["metadata"]["name"] != "skeleton":
23 | return
24 |
25 | args = "venv/bin/black --check -l 100 setup.py etc tests"
26 | try:
27 | subprocess.check_output(args.split())
28 | except subprocess.CalledProcessError as e:
29 | print("===========================================================")
30 | print(e.output)
31 | print("===========================================================")
32 | raise Exception(
33 | "Black style check failed; please format the code using:\n"
34 | " python -m black -l 100 setup.py etc tests",
35 | e.output,
36 | ) from e
37 |
--------------------------------------------------------------------------------
/vendorize.toml:
--------------------------------------------------------------------------------
1 | target = "src/tracecode/_vendor"
2 | packages = [
3 | "docopt",
4 | "altgraph",
5 | ]
6 |
--------------------------------------------------------------------------------