├── .clang-format ├── .gitignore ├── .mailmap ├── .travis.yml ├── CMakeLists.txt ├── ChangeLog ├── LICENSE ├── README.md ├── STATUS.md ├── cmake_uninstall.cmake.in ├── codecov.yml ├── debian ├── changelog ├── compat ├── control ├── copyright ├── debug │ ├── control │ ├── libpmemfile-posix0-debug.install │ ├── libpmemfile-posix0-debug.lintian-overrides │ ├── libpmemfile0-debug.install │ ├── libpmemfile0-debug.lintian-overrides │ └── rules ├── libpmemfile-posix-dev.install ├── libpmemfile-posix-dev.lintian-overrides ├── libpmemfile-posix-dev.manpages ├── libpmemfile-posix0.install ├── libpmemfile-posix0.lintian-overrides ├── libpmemfile0.install ├── libpmemfile0.lintian-overrides ├── libpmemfile0.manpages ├── libpmemfile0.triggers ├── pmemfile-tools.install ├── pmemfile-tools.lintian-overrides ├── pmemfile-tools.manpages ├── rules └── source │ └── format ├── doc ├── CMakeLists.txt ├── default.man ├── generated │ ├── .gitignore │ ├── libpmemfile-posix.3 │ ├── libpmemfile.1 │ └── mkfs.pmemfile.1 ├── libpmemfile-posix.3.md ├── libpmemfile.1.md └── mkfs.pmemfile.1.md ├── include ├── libpmemfile-posix-stubs.h └── libpmemfile-posix.h ├── pmemfile-debug.spec ├── pmemfile.spec ├── src ├── compiler_utils.h ├── libpmemfile-posix │ ├── CMakeLists.txt │ ├── HACKING.txt │ ├── access.c │ ├── alloc.c │ ├── alloc.h │ ├── block_array.c │ ├── block_array.h │ ├── blocks.c │ ├── blocks.h │ ├── callbacks.c │ ├── callbacks.h │ ├── chdir.c │ ├── chmod.c │ ├── chown.c │ ├── copy_file_range.c │ ├── creds.c │ ├── creds.h │ ├── data.c │ ├── data.h │ ├── dir.c │ ├── dir.h │ ├── fallocate.c │ ├── fault_injection.h │ ├── fcntl.c │ ├── file.c │ ├── file.h │ ├── flock.c │ ├── getdents.c │ ├── hash_map.c │ ├── hash_map.h │ ├── inode.c │ ├── inode.h │ ├── inode_array.c │ ├── inode_array.h │ ├── layout.h │ ├── libpmemfile-posix.map.in │ ├── libpmemfile-posix.pc.in │ ├── link.c │ ├── locks.c │ ├── locks.h │ ├── lseek.c │ ├── mkdir.c │ ├── mkdir.h │ ├── mknod.c │ ├── mmap.c │ ├── offset_mapping.c │ ├── offset_mapping.h │ ├── os_thread.h │ ├── os_thread_pthread.c │ ├── os_util.h │ ├── os_util_linux.c │ ├── os_util_windows.c │ ├── out.c │ ├── out.h │ ├── pmemfile-posix.c │ ├── pool.c │ ├── pool.h │ ├── read.c │ ├── readlink.c │ ├── rename.c │ ├── rmdir.c │ ├── rmdir.h │ ├── stat.c │ ├── statfs.c │ ├── stats.c │ ├── symlink.c │ ├── timestamps.c │ ├── truncate.c │ ├── truncate.h │ ├── unlink.c │ ├── unlink.h │ ├── utils.c │ ├── utils.h │ ├── verify_consts.h │ └── write.c ├── libpmemfile │ ├── CMakeLists.txt │ ├── libpmemfile-posix-fd_first.h │ ├── libpmemfile-posix-wrappers.h │ ├── libpmemfile.map │ ├── path_resolve.c │ ├── preload.c │ ├── preload.h │ ├── sys_util.h │ ├── syscall_early_filter.c │ ├── syscall_early_filter.h │ ├── vfd_table.c │ └── vfd_table.h ├── pmemfile-fuse │ ├── CMakeLists.txt │ └── main.c ├── tools │ ├── CMakeLists.txt │ ├── antool │ │ ├── .gitignore │ │ ├── CMakeLists.txt │ │ ├── README │ │ ├── README.md │ │ ├── analyzer.py │ │ ├── antool.py │ │ ├── converter.py │ │ ├── exceptions.py │ │ ├── listsyscalls.py │ │ ├── syscall.py │ │ ├── syscallinfo.py │ │ ├── syscalltable.py │ │ └── utils.py │ ├── mkfs.pmemfile.c │ ├── pmemfile-cat.c │ └── pmemfile-mount.c ├── valgrind │ ├── drd.h │ ├── helgrind.h │ ├── memcheck.h │ ├── pmemcheck.h │ └── valgrind.h └── valgrind_internal.h ├── tests ├── CMakeLists.txt ├── antool │ ├── .coveragerc │ ├── CMakeLists.txt │ ├── common.sh │ ├── cut-1-1531-13.log.match │ ├── cut-1-1531-14.log.match │ ├── cut-1-382-1.log.match │ ├── cut-1-382-3.log.match │ ├── cut-1-382-5.log.match │ ├── cut-1-382-6.log.match │ ├── cut-1148-12.log.match │ ├── cut-126-15.log.match │ ├── cut-126-16.log.match │ ├── cut-126-9.log.match │ ├── cut-1531-10.log.match │ ├── cut-1531-11.log.match │ ├── cut-1531-12.log.match │ ├── cut-1531-8.log.match │ ├── cut-1531-9.log.match │ ├── cut-2-1531-13.log.match │ ├── cut-2-1531-14.log.match │ ├── cut-2-382-1.log.match │ ├── cut-2-382-3.log.match │ ├── cut-2-382-5.log.match │ ├── cut-2-382-6.log.match │ ├── cut-3-1531-14.log.match │ ├── cut-3-382-5.log.match │ ├── cut-3-382-6.log.match │ ├── cut-382-0.log.match │ ├── cut-382-2.log.match │ ├── cut-382-4.log.match │ ├── cut-382-7.log.match │ ├── cut-4-1531-14.log.match │ ├── cut-4-382-5.log.match │ ├── cut-4-382-6.log.match │ ├── decompress-bin-arch.sh │ ├── dir_pmem-126-15.txt │ ├── dir_pmem-126-16.txt │ ├── helper_functions.sh │ ├── output-126-15.log.match │ ├── output-126-16.log.match │ ├── output-bin-1148-12.log.bz2 │ ├── output-bin-126-15.log.bz2 │ ├── output-bin-126-16.log.bz2 │ ├── output-bin-126-9.log.bz2 │ ├── output-bin-1531-10.log.bz2 │ ├── output-bin-1531-11.log.bz2 │ ├── output-bin-1531-12.log.bz2 │ ├── output-bin-1531-13.log.bz2 │ ├── output-bin-1531-14.log.bz2 │ ├── output-bin-1531-8.log.bz2 │ ├── output-bin-1531-9.log.bz2 │ ├── output-bin-382-0.log.bz2 │ ├── output-bin-382-1.log.bz2 │ ├── output-bin-382-2.log.bz2 │ ├── output-bin-382-3.log.bz2 │ ├── output-bin-382-4.log.bz2 │ ├── output-bin-382-5.log.bz2 │ ├── output-bin-382-6.log.bz2 │ ├── output-bin-382-7.log.bz2 │ ├── output-err-1148-12.log.match │ ├── output-err-126-9.log.match │ ├── output-err-1531-10.log.match │ ├── output-err-1531-11.log.match │ ├── output-err-1531-12.log.match │ ├── output-err-1531-13.log.match │ ├── output-err-1531-14.log.match │ ├── output-err-1531-8.log.match │ ├── output-err-1531-9.log.match │ ├── output-err-382-0.log.match │ ├── output-err-382-1.log.match │ ├── output-err-382-2.log.match │ ├── output-err-382-3.log.match │ ├── output-err-382-4.log.match │ ├── output-err-382-5.log.match │ ├── output-err-382-6.log.match │ ├── output-err-382-7.log.match │ ├── output-err-fi-1.log.match │ ├── output-err-fi-10.log.match │ ├── output-err-fi-11.log.match │ ├── output-err-fi-12.log.match │ ├── output-err-fi-13.log.match │ ├── output-err-fi-14.log.match │ ├── output-err-fi-15.log.match │ ├── output-err-fi-16.log.match │ ├── output-err-fi-17.log.match │ ├── output-err-fi-18.log.match │ ├── output-err-fi-19.log.match │ ├── output-err-fi-2.log.match │ ├── output-err-fi-20.log.match │ ├── output-err-fi-21.log.match │ ├── output-err-fi-22.log.match │ ├── output-err-fi-23.log.match │ ├── output-err-fi-24.log.match │ ├── output-err-fi-25.log.match │ ├── output-err-fi-26.log.match │ ├── output-err-fi-27.log.match │ ├── output-err-fi-28.log.match │ ├── output-err-fi-29.log.match │ ├── output-err-fi-3.log.match │ ├── output-err-fi-30.log.match │ ├── output-err-fi-31.log.match │ ├── output-err-fi-32.log.match │ ├── output-err-fi-33.log.match │ ├── output-err-fi-34.log.match │ ├── output-err-fi-35.log.match │ ├── output-err-fi-36.log.match │ ├── output-err-fi-37.log.match │ ├── output-err-fi-38.log.match │ ├── output-err-fi-39.log.match │ ├── output-err-fi-4.log.match │ ├── output-err-fi-40.log.match │ ├── output-err-fi-41.log.match │ ├── output-err-fi-5.log.match │ ├── output-err-fi-6.log.match │ ├── output-err-fi-7.log.match │ ├── output-err-fi-8.log.match │ ├── output-err-fi-9.log.match │ ├── output-f-126-15.log.match │ ├── output-f-126-16.log.match │ ├── output-fi-1.log.match │ ├── output-fi-10.log.match │ ├── output-fi-11.log.match │ ├── output-fi-12.log.match │ ├── output-fi-13.log.match │ ├── output-fi-14.log.match │ ├── output-fi-15.log.match │ ├── output-fi-16.log.match │ ├── output-fi-17.log.match │ ├── output-fi-18.log.match │ ├── output-fi-19.log.match │ ├── output-fi-2.log.match │ ├── output-fi-20.log.match │ ├── output-fi-21.log.match │ ├── output-fi-22.log.match │ ├── output-fi-23.log.match │ ├── output-fi-24.log.match │ ├── output-fi-25.log.match │ ├── output-fi-26.log.match │ ├── output-fi-27.log.match │ ├── output-fi-28.log.match │ ├── output-fi-29.log.match │ ├── output-fi-3.log.match │ ├── output-fi-30.log.match │ ├── output-fi-31.log.match │ ├── output-fi-32.log.match │ ├── output-fi-33.log.match │ ├── output-fi-34.log.match │ ├── output-fi-35.log.match │ ├── output-fi-36.log.match │ ├── output-fi-37.log.match │ ├── output-fi-38.log.match │ ├── output-fi-39.log.match │ ├── output-fi-4.log.match │ ├── output-fi-40.log.match │ ├── output-fi-41.log.match │ ├── output-fi-5.log.match │ ├── output-fi-6.log.match │ ├── output-fi-7.log.match │ ├── output-fi-8.log.match │ ├── output-fi-9.log.match │ ├── output-fv-126-15.log.match │ ├── output-fv-126-16.log.match │ ├── output-fvv-126-15.log.match │ ├── output-fvv-126-16.log.match │ ├── output-v-126-15.log.match │ ├── output-v-126-16.log.match │ ├── output-vv-126-15.log.match │ ├── output-vv-126-16.log.match │ ├── regenerate-bin-arch.sh │ ├── syscalls_table.dat.bz2 │ ├── test-antool.sh │ ├── test-fi.sh │ ├── test-parser.sh │ └── test_syscalls.c ├── helpers.cmake ├── ld.supp ├── libpmemfile-pop │ ├── CMakeLists.txt │ ├── pmemfilepool.c │ ├── utils.c │ └── utils.h ├── match ├── posix │ ├── CMakeLists.txt │ ├── basic │ │ ├── basic.cmake │ │ └── basic.cpp │ ├── crash │ │ ├── crash.cmake │ │ └── crash.cpp │ ├── dirs │ │ ├── dirs.cmake │ │ └── dirs.cpp │ ├── fcntl │ │ ├── fcntl.cmake │ │ └── fcntl.cpp │ ├── getdents │ │ ├── getdents.cmake │ │ ├── getdents.cpp │ │ └── none.err.match │ ├── mt │ │ ├── mt.cmake │ │ └── mt.cpp │ ├── offset_mapping │ │ ├── offset_mapping.cmake │ │ ├── offset_mapping.cpp │ │ ├── offset_mapping_wrapper.c │ │ └── offset_mapping_wrapper.h │ ├── openp │ │ ├── openp.cmake │ │ └── openp.cpp │ ├── permissions │ │ ├── permissions.cmake │ │ └── permissions.cpp │ ├── pmemfile_test.cpp │ ├── pmemfile_test.hpp │ ├── pointer_caching │ │ ├── pointer_caching.cmake │ │ └── pointer_caching.cpp │ ├── posix-helpers.cmake │ ├── rw │ │ ├── rw.cmake │ │ └── rw.cpp │ ├── stat │ │ ├── stat.cmake │ │ └── stat.cpp │ ├── symlinks │ │ ├── symlinks.cmake │ │ └── symlinks.cpp │ └── timestamps │ │ ├── timestamps.cmake │ │ └── timestamps.cpp ├── preload │ ├── CMakeLists.txt │ ├── basic │ │ ├── a.expected_dump │ │ ├── basic.c │ │ ├── basic.cmake │ │ └── root_dir.expected_log │ ├── basic_commands │ │ ├── basic_commands.cmake │ │ ├── ls.log.match │ │ ├── ls_root_after_ln_expected_log │ │ ├── ls_root_after_lns_expected_log │ │ ├── ls_root_after_mv_expected_log │ │ ├── ls_root_after_rm_expected_log │ │ ├── ls_root_expected_log │ │ ├── ls_with_dir.log.match │ │ ├── ls_without_dir.log.match │ │ ├── readlink_after_lns_expected_log │ │ ├── repo_dummy_file_a │ │ └── repo_dummy_file_b │ ├── config │ │ ├── config.c │ │ └── config.cmake │ ├── dup │ │ ├── dup.c │ │ └── dup.cmake │ ├── nested_dirs │ │ ├── ls.log.match │ │ ├── ls_a.log.match │ │ ├── ls_f.log.match │ │ ├── ls_g.log.match │ │ ├── ls_g_no33.log.match │ │ ├── ls_g_no33_no32.log.match │ │ ├── nested_dirs.cmake │ │ ├── repo_dummy_file_a │ │ └── repo_dummy_file_b │ ├── pool_locking │ │ ├── pool_locking.c │ │ └── pool_locking.cmake │ ├── preload-helpers.cmake │ ├── setumask.c │ ├── sqlite │ │ ├── ins0.sql │ │ ├── out0.log.match │ │ ├── sel0.sql │ │ └── sqlite.cmake │ ├── unix │ │ ├── unix.c │ │ └── unix.cmake │ └── xattr │ │ ├── xattr.c │ │ └── xattr.cmake ├── test_backtrace.c └── test_backtrace.h └── utils ├── build-deb.sh ├── build-rpm.sh ├── check_license ├── check-headers.sh ├── check-license.c └── file-exceptions.sh ├── check_whitespace ├── cppstyle ├── cstyle ├── docker ├── 0001-travis-fix-travisci_build_coverity_scan.sh.patch ├── build.sh ├── external_tests │ ├── config.py │ ├── ltp │ │ ├── __init__.py │ │ ├── failing_short_tests │ │ ├── ltp.py │ │ └── short_tests │ ├── run-build-suite.sh │ ├── run-suite.py │ ├── sqlite │ │ ├── __init__.py │ │ ├── failing_all_tests │ │ ├── failing_short_tests │ │ ├── short_tests │ │ └── sqlite.py │ ├── suite.py │ ├── tester.py │ └── xfstests │ │ ├── __init__.py │ │ ├── failing_short_tests │ │ ├── short_tests │ │ └── xfs.py ├── images │ ├── 0001-disable-special-files-tests.patch │ ├── 0001-enable-pmemfile.patch │ ├── Dockerfile.fedora-23 │ ├── Dockerfile.fedora-24 │ ├── Dockerfile.fedora-25 │ ├── Dockerfile.ubuntu-16.04 │ ├── Dockerfile.ubuntu-16.10 │ ├── Dockerfile.ubuntu-17.04 │ ├── build-image.sh │ ├── install-ltp.sh │ ├── install-nvml.sh │ ├── install-pjdfstest.sh │ ├── install-sqlite.sh │ ├── install-syscall_intercept.sh │ ├── install-valgrind.sh │ ├── install-xfs.sh │ └── push-image.sh ├── pjdfstest │ ├── build-and-test.sh │ ├── pmemfile-summary.log.match │ └── test.sh ├── pull-or-rebuild-image.sh ├── run-build-package.sh ├── run-build.sh ├── run-coverage.sh └── run-coverity.sh ├── fio ├── append512.fio ├── append64.fio ├── append64k.fio ├── randread512.fio ├── randread64.fio ├── randread64k.fio ├── randrw512.fio ├── randrw64.fio ├── randrw64k.fio ├── randwrite512.fio ├── randwrite64.fio ├── randwrite64k.fio ├── read512.fio ├── read64.fio ├── read64k.fio ├── rw512.fio ├── rw64.fio ├── rw64k.fio ├── write512.fio ├── write64.fio └── write64k.fio ├── md2man.sh └── transform ├── CMakeLists.txt ├── function_decl_finder.c ├── function_decl_finder.h ├── generator.c ├── generator.h ├── transform_pmemfile_posix.c └── transform_pmemfile_posix_fd_first.c /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | IndentWidth: 8 3 | UseTab: Always 4 | BreakBeforeBraces: Custom 5 | BraceWrapping: 6 | AfterClass: false 7 | AfterControlStatement: false 8 | AfterEnum: false 9 | AfterFunction: true 10 | AfterNamespace: true 11 | AfterObjCDeclaration: false 12 | AfterStruct: false 13 | AfterUnion: false 14 | BeforeCatch: false 15 | BeforeElse: false 16 | IndentBraces: false 17 | AllowShortIfStatementsOnASingleLine: false 18 | IndentCaseLabels: false 19 | AlwaysBreakAfterDefinitionReturnType: true 20 | SpaceBeforeParens: ControlStatements 21 | SpacesBeforeTrailingComments: 1 22 | SpacesInCStyleCastParentheses: false 23 | SpacesInContainerLiterals: false 24 | PointerAlignment: Right 25 | ContinuationIndentWidth: 8 26 | AlignOperands: false 27 | IndentCaseLabels: true 28 | ConstructorInitializerAllOnOneLineOrOnePerLine: true 29 | AlwaysBreakTemplateDeclarations: true 30 | AccessModifierOffset: -8 31 | AllowShortBlocksOnASingleLine: false 32 | AllowShortFunctionsOnASingleLine: false 33 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.cproject 2 | /.project 3 | /.settings 4 | /build 5 | /build-deb 6 | tags 7 | /googletest-1.8.0.zip 8 | __pycache__/ 9 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Gábor Buella 2 | Igor Chorążewicz 3 | Maciej Ramotowski 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | dist: trusty 2 | 3 | services: 4 | - docker 5 | 6 | language: c 7 | 8 | env: 9 | matrix: 10 | - TYPE=package OS=ubuntu OS_VER=16.04 PUSH_IMAGE=1 11 | - TYPE=package OS=fedora OS_VER=25 PUSH_IMAGE=1 12 | - TYPE=normal OS=ubuntu OS_VER=16.04 C_COMPILER=clang CPP_COMPILER=clang++ 13 | - TYPE=normal OS=fedora OS_VER=25 C_COMPILER=clang CPP_COMPILER=clang++ 14 | - TYPE=normal OS=ubuntu OS_VER=16.04 15 | - TYPE=normal OS=fedora OS_VER=25 16 | - TYPE=coverage OS=ubuntu OS_VER=17.04 PUSH_IMAGE=1 AUTOGENSOURCES=1 17 | - TYPE=sqlite OS=ubuntu OS_VER=16.04 COVERAGE=1 18 | - TYPE=ltp OS=ubuntu OS_VER=16.04 COVERAGE=1 19 | - TYPE=coverity OS=ubuntu OS_VER=16.04 20 | 21 | before_install: 22 | - export HOST_WORKDIR=`pwd` 23 | - export GITHUB_REPO=pmem/pmemfile 24 | - export DOCKERHUB_REPO=pmem/pmemfile 25 | - export EXTRA_DOCKER_ARGS=-t 26 | - cd utils/docker 27 | - ./pull-or-rebuild-image.sh 28 | - if [[ -f push_image_to_repo_flag ]]; then PUSH_THE_IMAGE=1; fi 29 | - rm -f push_image_to_repo_flag 30 | 31 | script: 32 | - ./build.sh 33 | 34 | after_success: 35 | - if [[ $PUSH_THE_IMAGE -eq 1 ]]; then images/push-image.sh $OS-$OS_VER; fi 36 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | Thu Feb 9 2017 Marcin Ślusarz 2 | 3 | * Version 0.1 4 | Initial version. 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2016-2017, Intel Corporation 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | 15 | * Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived 17 | from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | 31 | 32 | Everything in this source tree is covered by the previous license 33 | with the following exceptions: 34 | 35 | * utils/cstyle (used only during development) licensed under CDDL. 36 | * cmake/cmake_uninstall.cmake.in licensed under Creative Commons. 37 | -------------------------------------------------------------------------------- /cmake_uninstall.cmake.in: -------------------------------------------------------------------------------- 1 | # From: https://cmake.org/Wiki/CMake_FAQ 2 | 3 | if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 4 | message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 5 | endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") 6 | 7 | file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) 8 | string(REGEX REPLACE "\n" ";" files "${files}") 9 | foreach(file ${files}) 10 | message(STATUS "Uninstalling $ENV{DESTDIR}${file}") 11 | if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 12 | exec_program("@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" 13 | OUTPUT_VARIABLE rm_out 14 | RETURN_VALUE rm_retval 15 | ) 16 | if(NOT "${rm_retval}" STREQUAL 0) 17 | message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") 18 | endif(NOT "${rm_retval}" STREQUAL 0) 19 | else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 20 | message(STATUS "File $ENV{DESTDIR}${file} does not exist.") 21 | endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") 22 | endforeach(file) 23 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: 4 | posix: 5 | threshold: 0.2 6 | paths: 7 | - src/libpmemfile-posix/ 8 | preload: 9 | threshold: 0.2 10 | paths: 11 | - src/libpmemfile/ 12 | antool: 13 | paths: 14 | - src/tools/antool/ 15 | other: 16 | paths: 17 | - src/tools/mkfs.pmemfile.c 18 | - src/tools/pmemfile-cat.c 19 | - src/tools/pmemfile-mount.c 20 | ignore: 21 | - utils/ 22 | - tests/ 23 | - src/valgrind/ 24 | - src/libpmemfile/sys_util.h 25 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | pmemfile (0.1-1) UNRELEASED; urgency=medium 2 | 3 | * Initial release. 4 | 5 | -- Marcin Ślusarz Mon, 13 Feb 2017 15:08:12 +0100 6 | -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 9 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: pmemfile 2 | Maintainer: Marcin Ślusarz 3 | Section: misc 4 | Priority: optional 5 | Standards-version: 3.9.8 6 | Build-Depends: debhelper (>= 9), libsyscall-intercept-dev, libpmemobj-dev 7 | 8 | Package: libpmemfile-posix0 9 | Architecture: any 10 | Depends: libpmemobj, ${shlibs:Depends}, ${misc:Depends} 11 | Description: File System in Persistent Memory 12 | Persistent memory-backed, userspace implementation of POSIX-like API. 13 | 14 | Package: libpmemfile-posix-dev 15 | Section: libdevel 16 | Architecture: any 17 | Depends: libpmemfile-posix0 (=${binary:Version}), ${misc:Depends} 18 | Description: Development files for libpmemfile-posix 19 | Development files for libpmemfile-posix library. 20 | 21 | Package: libpmemfile0 22 | Architecture: any 23 | Depends: libpmemfile-posix0, libsyscall-intercept0, ${shlibs:Depends}, ${misc:Depends} 24 | Description: File System in Persistent Memory 25 | Persistent memory-backed, transaparent (LD_PRELOAD) userspace implementation 26 | of POSIX-like API. 27 | 28 | Package: pmemfile-tools 29 | Section: misc 30 | Architecture: any 31 | Priority: optional 32 | Depends: libpmemfile-posix0, python3, ${shlibs:Depends}, ${misc:Depends} 33 | Description: Tools for pmemfile 34 | Utilities for pmemfile. 35 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Copyright 2016-2017, Intel Corporation 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions 5 | are met: 6 | 7 | * Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | 15 | * Neither the name of the copyright holder nor the names of its 16 | contributors may be used to endorse or promote products derived 17 | from this software without specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /debian/debug/control: -------------------------------------------------------------------------------- 1 | Source: pmemfile 2 | Maintainer: Marcin Ślusarz 3 | Section: debug 4 | Priority: extra 5 | Standards-version: 3.9.8 6 | Build-Depends: debhelper (>= 9), libsyscall-intercept-dev, libpmemobj-dev 7 | 8 | Package: libpmemfile-posix0-debug 9 | Architecture: any 10 | Depends: libpmemobj, ${shlibs:Depends}, ${misc:Depends} 11 | Description: File System in Persistent Memory - debug library 12 | Persistent memory-backed, userspace implementation of POSIX-like API - debug 13 | library. 14 | 15 | Package: libpmemfile0-debug 16 | Architecture: any 17 | Depends: libpmemfile-posix0 | libpmemfile-posix0-debug, libsyscall-intercept0, ${shlibs:Depends}, ${misc:Depends} 18 | Description: File System in Persistent Memory - debug library 19 | Persistent memory-backed, transaparent (LD_PRELOAD) userspace implementation 20 | of POSIX-like API - debug library. 21 | -------------------------------------------------------------------------------- /debian/debug/libpmemfile-posix0-debug.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/pmemfile_debug/libpmemfile-posix.so.* 2 | usr/lib/*/pmemfile_debug/libpmemfile-posix.so 3 | usr/lib/*/pmemfile_debug/libpmemfile-posix.a 4 | -------------------------------------------------------------------------------- /debian/debug/libpmemfile-posix0-debug.lintian-overrides: -------------------------------------------------------------------------------- 1 | # https://lintian.debian.org/tags/new-package-should-close-itp-bug.html 2 | new-package-should-close-itp-bug 3 | -------------------------------------------------------------------------------- /debian/debug/libpmemfile0-debug.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/pmemfile_debug/libpmemfile.so.* 2 | usr/lib/*/pmemfile_debug/libpmemfile.so 3 | -------------------------------------------------------------------------------- /debian/debug/libpmemfile0-debug.lintian-overrides: -------------------------------------------------------------------------------- 1 | # https://lintian.debian.org/tags/new-package-should-close-itp-bug.html 2 | new-package-should-close-itp-bug 3 | -------------------------------------------------------------------------------- /debian/debug/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | #export DH_VERBOSE=1 3 | %: 4 | dh $@ --buildsystem=cmake --parallel 5 | 6 | override_dh_auto_configure: 7 | dh_auto_configure -- -DCMAKE_BUILD_TYPE=Debug -DTESTS_USE_FORCED_PMEM=1 8 | 9 | override_dh_shlibdeps: 10 | dh_shlibdeps -O--buildsystem=cmake -l /usr/lib/x86_64-linux-gnu/pmemfile_debug 11 | 12 | override_dh_auto_test: 13 | dh_auto_test -- ARGS+="-E preload_unix --output-on-failure" 14 | -------------------------------------------------------------------------------- /debian/libpmemfile-posix-dev.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/pkgconfig/libpmemfile-posix.pc 2 | usr/lib/*/libpmemfile-posix.so 3 | usr/lib/*/libpmemfile-posix.a 4 | usr/include/libpmemfile-posix.h 5 | usr/include/libpmemfile-posix-stubs.h 6 | usr/share/man/man3/libpmemfile-posix.3 7 | -------------------------------------------------------------------------------- /debian/libpmemfile-posix-dev.lintian-overrides: -------------------------------------------------------------------------------- 1 | # https://lintian.debian.org/tags/new-package-should-close-itp-bug.html 2 | new-package-should-close-itp-bug 3 | -------------------------------------------------------------------------------- /debian/libpmemfile-posix-dev.manpages: -------------------------------------------------------------------------------- 1 | doc/generated/libpmemfile-posix.3 2 | -------------------------------------------------------------------------------- /debian/libpmemfile-posix0.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libpmemfile-posix.so.* 2 | -------------------------------------------------------------------------------- /debian/libpmemfile-posix0.lintian-overrides: -------------------------------------------------------------------------------- 1 | # https://lintian.debian.org/tags/new-package-should-close-itp-bug.html 2 | new-package-should-close-itp-bug 3 | -------------------------------------------------------------------------------- /debian/libpmemfile0.install: -------------------------------------------------------------------------------- 1 | usr/lib/*/libpmemfile.so 2 | usr/lib/*/libpmemfile.so.* 3 | usr/share/man/man1/libpmemfile.1 4 | -------------------------------------------------------------------------------- /debian/libpmemfile0.lintian-overrides: -------------------------------------------------------------------------------- 1 | # https://lintian.debian.org/tags/new-package-should-close-itp-bug.html 2 | new-package-should-close-itp-bug 3 | 4 | # libpmemfile.so does not really belong to dev package 5 | non-dev-pkg-with-shlib-symlink 6 | -------------------------------------------------------------------------------- /debian/libpmemfile0.manpages: -------------------------------------------------------------------------------- 1 | doc/generated/libpmemfile.1 2 | -------------------------------------------------------------------------------- /debian/libpmemfile0.triggers: -------------------------------------------------------------------------------- 1 | activate-noawait ldconfig 2 | -------------------------------------------------------------------------------- /debian/pmemfile-tools.install: -------------------------------------------------------------------------------- 1 | usr/bin/mkfs.pmemfile 2 | usr/bin/pmemfile-fuse 3 | usr/bin/pmemfile-mount 4 | usr/share/man/man1/mkfs.pmemfile.1 5 | usr/bin/antool 6 | usr/share/antool/* 7 | -------------------------------------------------------------------------------- /debian/pmemfile-tools.lintian-overrides: -------------------------------------------------------------------------------- 1 | # https://lintian.debian.org/tags/new-package-should-close-itp-bug.html 2 | new-package-should-close-itp-bug 3 | -------------------------------------------------------------------------------- /debian/pmemfile-tools.manpages: -------------------------------------------------------------------------------- 1 | doc/generated/mkfs.pmemfile.1 2 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | #export DH_VERBOSE=1 3 | %: 4 | dh $@ --buildsystem=cmake --parallel 5 | 6 | override_dh_auto_configure: 7 | dh_auto_configure -- -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTESTS_USE_FORCED_PMEM=1 8 | 9 | override_dh_auto_test: 10 | dh_auto_test -- ARGS+="-E preload_unix --output-on-failure" 11 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (quilt) 2 | -------------------------------------------------------------------------------- /doc/default.man: -------------------------------------------------------------------------------- 1 | $if(has-tables)$ 2 | .\"t 3 | $endif$ 4 | $if(pandoc-version)$ 5 | .\" Automatically generated by Pandoc $pandoc-version$ 6 | .\" 7 | $endif$ 8 | $if(adjusting)$ 9 | .ad $adjusting$ 10 | $endif$ 11 | .TH "$title$" "$section$" "$version$" "$date$" "$footer$" "$header$" 12 | $if(hyphenate)$ 13 | .hy 14 | $else$ 15 | .nh \" Turn off hyphenation by default. 16 | $endif$ 17 | $for(header-includes)$ 18 | $header-includes$ 19 | $endfor$ 20 | .\" Copyright 2016-$year$, Intel Corporation 21 | .\" 22 | .\" Redistribution and use in source and binary forms, with or without 23 | .\" modification, are permitted provided that the following conditions 24 | .\" are met: 25 | .\" 26 | .\" * Redistributions of source code must retain the above copyright 27 | .\" notice, this list of conditions and the following disclaimer. 28 | .\" 29 | .\" * Redistributions in binary form must reproduce the above copyright 30 | .\" notice, this list of conditions and the following disclaimer in 31 | .\" the documentation and/or other materials provided with the 32 | .\" distribution. 33 | .\" 34 | .\" * Neither the name of the copyright holder nor the names of its 35 | .\" contributors may be used to endorse or promote products derived 36 | .\" from this software without specific prior written permission. 37 | .\" 38 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 39 | .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 40 | .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 41 | .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 42 | .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 44 | .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 45 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 46 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 47 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 48 | .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 49 | $for(include-before)$ 50 | $include-before$ 51 | $endfor$ 52 | $body$ 53 | $for(include-after)$ 54 | $include-after$ 55 | $endfor$ 56 | $if(author)$ 57 | .SH AUTHORS 58 | $for(author)$$author$$sep$; $endfor$. 59 | $endif$ 60 | -------------------------------------------------------------------------------- /doc/generated/.gitignore: -------------------------------------------------------------------------------- 1 | *.txt 2 | -------------------------------------------------------------------------------- /doc/generated/mkfs.pmemfile.1: -------------------------------------------------------------------------------- 1 | .\" Automatically generated by Pandoc 1.17.2 2 | .\" 3 | .TH "mkfs" "1" "mkfs.pmemfile API version 0.1.0" "" "" "" 4 | .hy 5 | .\" Copyright 2016-2017, Intel Corporation 6 | .\" 7 | .\" Redistribution and use in source and binary forms, with or without 8 | .\" modification, are permitted provided that the following conditions 9 | .\" are met: 10 | .\" 11 | .\" * Redistributions of source code must retain the above copyright 12 | .\" notice, this list of conditions and the following disclaimer. 13 | .\" 14 | .\" * Redistributions in binary form must reproduce the above copyright 15 | .\" notice, this list of conditions and the following disclaimer in 16 | .\" the documentation and/or other materials provided with the 17 | .\" distribution. 18 | .\" 19 | .\" * Neither the name of the copyright holder nor the names of its 20 | .\" contributors may be used to endorse or promote products derived 21 | .\" from this software without specific prior written permission. 22 | .\" 23 | .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 24 | .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 25 | .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 26 | .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 27 | .\" OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 28 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 29 | .\" LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 30 | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 31 | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 33 | .\" OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 | .SH NAME 35 | .PP 36 | \f[B]mkfs.pmemfile\f[] \-\- create a pmemfile filesystem 37 | -------------------------------------------------------------------------------- /pmemfile-debug.spec: -------------------------------------------------------------------------------- 1 | Name: pmemfile 2 | Version: 0.1 3 | Release: 0%{?dist} 4 | Summary: Persistent memory-backed, userspace implementation of POSIX-like API. 5 | License: BSD 6 | URL: http://github.com/pmem/pmemfile 7 | Source0: pmemfile-%{version}.tar.gz 8 | #Source0: https://github.com/pmem/pmemfile/archive/%{version}.tar.gz#/pmemfile-%{version}.tar.gz 9 | 10 | BuildRequires: glibc-devel 11 | BuildRequires: cmake 12 | BuildRequires: pkgconfig 13 | BuildRequires: libpmemobj-devel 14 | BuildRequires: libsyscall_intercept-devel 15 | 16 | #ExclusiveArch: x86_64 17 | 18 | %description 19 | XXX 20 | 21 | %package -n libpmemfile-posix-debug 22 | Summary: Persistent memory-backed, userspace implementation of POSIX-like API 23 | Group: System Environment/Libraries 24 | %description -n libpmemfile-posix-debug 25 | XXX 26 | 27 | %files -n libpmemfile-posix-debug 28 | %defattr(-,root,root,-) 29 | %{_libdir}/pmemfile_debug/libpmemfile-posix.so.* 30 | %{_libdir}/pmemfile_debug/libpmemfile-posix.so 31 | %{_libdir}/pmemfile_debug/libpmemfile-posix.a 32 | %license LICENSE 33 | 34 | %package -n libpmemfile-debug 35 | Summary: Persistent memory-backed, transaparent (LD_PRELOAD) userspace implementation of POSIX-like API 36 | Group: System Environment/Libraries 37 | %description -n libpmemfile-debug 38 | XXX 39 | 40 | %files -n libpmemfile-debug 41 | %defattr(-,root,root,-) 42 | %{_libdir}/pmemfile_debug/libpmemfile.so.* 43 | %{_libdir}/pmemfile_debug/libpmemfile.so 44 | %license LICENSE 45 | %doc 46 | 47 | %prep 48 | %setup -q -n %{name}-%{version} 49 | 50 | %build 51 | mkdir dbg_build && cd dbg_build 52 | %cmake .. -DCMAKE_BUILD_TYPE=Debug -DTESTS_USE_FORCED_PMEM=1 53 | make %{?_smp_mflags} 54 | 55 | %install 56 | cd dbg_build 57 | make install DESTDIR=%{buildroot} 58 | 59 | %check 60 | cd dbg_build 61 | ctest %{?_smp_mflags} -E preload_unix --output-on-failure 62 | 63 | %changelog 64 | * Tue Feb 14 2017 Marcin Ślusarz - 0.1-1 65 | - Initial RPM release 66 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/HACKING.txt: -------------------------------------------------------------------------------- 1 | Inode/vinode accessing rules: 2 | - When accessing vinode or inode you must hold a reference on vinode. 3 | - Refing and unrefing inodes must be done outside of pmemobj transaction. 4 | - Lock in vinode protects both vinode and inode. 5 | - You have to take the vinode lock at least in "read" mode if you want to read 6 | any field in vinode or inode (of course with an exception of refcnt and lock 7 | itself). 8 | - You have to take the vinode lock in "write" mode if you want to modify vinode 9 | or inode. 10 | - If you want to modify multiple vinodes/inodes you have to take their locks 11 | in ascending order. There are helper functions to do that. 12 | - Rename and exchange operations require taking up to 4 vinode locks (2 possible 13 | parents and 2 children). 14 | - To prevent races between 2 threads doing cross-directory rename, 15 | rename implementation must take the global pool lock. 16 | - Unref does not take the vinode lock, even when reading some of the vinode 17 | fields. This is safe because it's done only when refcnt drops to 0, when we 18 | are sure nobody has access to unrefed vinode. 19 | - That also means that initial ref (inode_ref) and all unrefs need to take 20 | the inode map lock in write mode. 21 | 22 | Other stuff: 23 | - All transactions should use cb_queue as callback, just in case anything in 24 | the transaction will use callbacks. 25 | - If you take a lock that protects persistent memory structures in transaction 26 | you have to keep this lock until the end of transaction. 27 | - If you modify any runtime data in transaction you need to rollback them on 28 | tx abort, because only persistent memory is tracked by transaction. 29 | It's better to avoid modifying runtime structures inside of transaction and 30 | do that after commit. 31 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/callbacks.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | #ifndef PMEMFILE_CALLBACKS_H 33 | #define PMEMFILE_CALLBACKS_H 34 | 35 | #include "libpmemobj.h" 36 | 37 | typedef void (*cb_basic)(void *, void *); 38 | 39 | void cb_queue(PMEMobjpool *pop, enum pobj_tx_stage stage, void *arg); 40 | 41 | int cb_push_back(enum pobj_tx_stage stage, cb_basic func, void *arg); 42 | int cb_push_front(enum pobj_tx_stage stage, cb_basic func, void *arg); 43 | 44 | void cb_init(void); 45 | void cb_fini(void); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/copy_file_range.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | /* 34 | * copy_file_range.c -- pmemfile_copy_file_range implementation 35 | */ 36 | 37 | #include 38 | #include "libpmemfile-posix.h" 39 | #include "out.h" 40 | 41 | pmemfile_ssize_t 42 | pmemfile_copy_file_range(PMEMfilepool *pfp, 43 | PMEMfile *file_in, pmemfile_off_t *off_in, 44 | PMEMfile *file_out, pmemfile_off_t *off_out, 45 | size_t len, unsigned flags) 46 | { 47 | (void) file_in; 48 | (void) off_in; 49 | (void) file_out; 50 | (void) off_out; 51 | (void) len; 52 | (void) flags; 53 | 54 | errno = ENOTSUP; 55 | return -1; 56 | } 57 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/fault_injection.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef PMEMFILE_FAULT_INJECTION 34 | #define PMEMFILE_FAULT_INJECTION 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | enum pf_allocation_type { PF_MALLOC, PF_CALLOC, PF_REALLOC }; 41 | 42 | #ifdef FAULT_INJECTION 43 | void _pmemfile_inject_fault_at(enum pf_allocation_type type, 44 | int nth, const char *at); 45 | 46 | int _pmemfile_fault_injection_enabled(void); 47 | #endif 48 | 49 | #ifdef __cplusplus 50 | } 51 | #endif 52 | 53 | #ifndef FAULT_INJECTION 54 | static inline void 55 | _pmemfile_inject_fault_at(enum pf_allocation_type type, int nth, const char *at) 56 | { 57 | abort(); 58 | } 59 | 60 | static inline int 61 | _pmemfile_fault_injection_enabled(void) 62 | { 63 | return 0; 64 | } 65 | #endif 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/flock.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | /* 34 | * flock.c -- pmemfile_flock implementation 35 | */ 36 | 37 | #include 38 | #include "libpmemfile-posix.h" 39 | #include "out.h" 40 | 41 | int 42 | pmemfile_flock(PMEMfilepool *pfp, PMEMfile *file, int operation) 43 | { 44 | (void) operation; 45 | 46 | errno = ENOTSUP; 47 | return -1; 48 | } 49 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/hash_map.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | #ifndef PMEMFILE_HASHMAP_H 33 | #define PMEMFILE_HASHMAP_H 34 | 35 | #include 36 | 37 | struct hash_map; 38 | typedef void (*hash_map_cb)(uint64_t, void *, void *); 39 | 40 | struct hash_map *hash_map_alloc(void); 41 | void hash_map_free(struct hash_map *map); 42 | 43 | int hash_map_traverse(struct hash_map *c, hash_map_cb fun, void *arg); 44 | 45 | int hash_map_remove(struct hash_map *map, uint64_t key, void *value); 46 | 47 | void *hash_map_get(struct hash_map *map, uint64_t key); 48 | 49 | void *hash_map_put(struct hash_map *map, 50 | uint64_t key, void *value); 51 | #endif 52 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/libpmemfile-posix.map.in: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016-2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | # 32 | 33 | # 34 | # src/libpmemfile-posix/libpmemfile-posix.map.in -- linker map file for libpmemfile-posix 35 | # 36 | { 37 | global: 38 | @LINKER_SCRIPT_EXPORTED_SYMBOLS@; 39 | local: 40 | *; 41 | }; 42 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/libpmemfile-posix.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | libdir=@CMAKE_INSTALL_PREFIX@/lib 3 | version=@VERSION@ 4 | includedir=@CMAKE_INSTALL_PREFIX@/include 5 | 6 | Name: libpmemfile-posix 7 | Description: libpmemfile-posix - persistent memory filesystem with POSIX-like API 8 | Version: @VERSION@ 9 | URL: http://github.com/pmem/pmemfile 10 | Requires.private: libpmemobj 11 | Libs: -L@CMAKE_INSTALL_PREFIX@/lib -lpmemfile-posix 12 | Cflags: -I@CMAKE_INSTALL_PREFIX@/include 13 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/mkdir.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | #ifndef PMEMFILE_MKDIR_H 33 | #define PMEMFILE_MKDIR_H 34 | 35 | #include "creds.h" 36 | #include "inode.h" 37 | 38 | TOID(struct pmemfile_inode) vinode_new_dir(PMEMfilepool *pfp, 39 | struct pmemfile_vinode *parent, const char *name, 40 | size_t namelen, struct pmemfile_cred *cred, 41 | pmemfile_mode_t mode); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/mknod.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | /* 34 | * mknod.c -- pmemfile_mknod(at) implementation 35 | */ 36 | 37 | #include 38 | #include "libpmemfile-posix.h" 39 | 40 | int 41 | pmemfile_mknodat(PMEMfilepool *pfp, PMEMfile *dir, const char *path, 42 | pmemfile_mode_t mode, pmemfile_dev_t dev) 43 | { 44 | (void) dev; 45 | 46 | if (PMEMFILE_S_ISREG(mode) || PMEMFILE_S_ISTYPE(mode, 0)) { 47 | PMEMfile *f = pmemfile_openat(pfp, dir, path, 48 | PMEMFILE_O_CREAT | PMEMFILE_O_EXCL, mode); 49 | if (!f) 50 | return -1; 51 | 52 | pmemfile_close(pfp, f); 53 | 54 | return 0; 55 | } 56 | 57 | errno = ENOTSUP; 58 | return -1; 59 | } 60 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/offset_mapping.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | #ifndef PMEMFILE_OFFSET_MAPPING_H 33 | #define PMEMFILE_OFFSET_MAPPING_H 34 | 35 | #include 36 | #include 37 | 38 | #include "layout.h" 39 | #include "libpmemfile-posix.h" 40 | 41 | struct offset_map; 42 | 43 | struct offset_map *offset_map_new(PMEMfilepool *pfp); 44 | 45 | void offset_map_delete(struct offset_map *m); 46 | 47 | struct pmemfile_block_desc *block_find_closest(struct offset_map *map, 48 | uint64_t offset); 49 | 50 | int insert_block(struct offset_map *map, struct pmemfile_block_desc *block); 51 | 52 | int remove_block(struct offset_map *map, struct pmemfile_block_desc *block); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/os_util.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | #ifndef OS_UTIL_H 33 | #define OS_UTIL_H 34 | 35 | int os_getpid(void); 36 | void os_describe_errno(int errnum, char *buf, size_t buflen); 37 | 38 | #ifdef DEBUG 39 | 40 | /* 41 | * os_getexecname -- return name of current executable 42 | * 43 | * This function is only used when logging is enabled, to make 44 | * it more clear in the log which program was running. 45 | */ 46 | const char *os_getexecname(void); 47 | 48 | #endif /* DEBUG */ 49 | 50 | int os_usleep(unsigned usec); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/os_util_windows.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | #include "os_util.h" 38 | 39 | int 40 | os_getpid(void) 41 | { 42 | return _getpid(); 43 | } 44 | 45 | void 46 | os_describe_errno(int errnum, char *buf, size_t buflen) 47 | { 48 | if (strerror_s(buf, buflen, errnum)) 49 | snprintf(buf, buflen, "Unknown errno %d", errnum); 50 | } 51 | 52 | #ifdef DEBUG 53 | const char * 54 | os_getexecname(void) 55 | { 56 | static char namepath[MAX_PATH]; 57 | 58 | DWORD cc; 59 | if ((cc = GetModuleFileNameA(NULL, namepath, MAX_PATH)) == 0) 60 | strcpy(namepath, "unknown"); 61 | else 62 | namepath[cc] = '\0'; 63 | 64 | return namepath; 65 | } 66 | #endif /* DEBUG */ 67 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/rmdir.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | #ifndef PMEMFILE_RMDIR_H 33 | #define PMEMFILE_RMDIR_H 34 | 35 | #include "inode.h" 36 | 37 | void vinode_unlink_dir(PMEMfilepool *pfp, 38 | struct pmemfile_vinode *vparent, 39 | struct pmemfile_dirent *dirent, 40 | struct pmemfile_vinode *vdir, 41 | const char *path, 42 | struct pmemfile_time tm); 43 | 44 | int pmemfile_rmdirat(PMEMfilepool *pfp, struct pmemfile_vinode *dir, 45 | const char *path); 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/truncate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | #ifndef PMEMFILE_TRUNCATE_H 33 | #define PMEMFILE_TRUNCATE_H 34 | 35 | #include "inode.h" 36 | #include "pool.h" 37 | 38 | int vinode_truncate(PMEMfilepool *pfp, struct pmemfile_vinode *vinode, 39 | uint64_t size); 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /src/libpmemfile-posix/unlink.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2016-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | #ifndef PMEMFILE_UNLINK_H 33 | #define PMEMFILE_UNLINK_H 34 | 35 | #include "inode.h" 36 | 37 | void vinode_unlink_file(PMEMfilepool *pfp, 38 | struct pmemfile_vinode *parent, 39 | struct pmemfile_dirent *dirent, 40 | struct pmemfile_vinode *vinode, 41 | struct pmemfile_time tm); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /src/libpmemfile/libpmemfile.map: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2016, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | # 32 | # 33 | # src/libpmemfile/libpmemfile.map 34 | # 35 | # linker map file for the preloadable libpmemfile library 36 | # intentionally not exposing any symbols 37 | # 38 | { 39 | global: 40 | __xpg_strerror_r; 41 | strerror_r; 42 | strerror; 43 | local: 44 | *; 45 | }; 46 | -------------------------------------------------------------------------------- /src/tools/antool/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | __pycache__ 3 | -------------------------------------------------------------------------------- /src/tools/antool/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | set(ANTOOL_BIN "${CMAKE_CURRENT_BINARY_DIR}/antool") 33 | set(ANTOOL_DIR "${CMAKE_INSTALL_PREFIX}/share/antool") 34 | 35 | # create a main antool startup file 36 | file(WRITE ${ANTOOL_BIN} "#!/bin/sh\n") 37 | file(APPEND ${ANTOOL_BIN} "exec python3 ${ANTOOL_DIR}/antool.py \$*\n") 38 | 39 | install(PROGRAMS ${ANTOOL_BIN} 40 | CONFIGURATIONS Release None RelWithDebInfo 41 | DESTINATION ${CMAKE_INSTALL_BINDIR}) 42 | 43 | install(DIRECTORY . DESTINATION ${ANTOOL_DIR} 44 | CONFIGURATIONS Release None RelWithDebInfo 45 | FILES_MATCHING PATTERN "*.py") 46 | -------------------------------------------------------------------------------- /src/tools/antool/README: -------------------------------------------------------------------------------- 1 | Analyzing Tool 2 | -------------- 3 | 4 | Analyzing Tool - analyze binary logs of vltrace and check if all recorded 5 | syscalls are supported by pmemfile. 6 | 7 | 1) Usage: 8 | 9 | usage: antool.py [-h] -b BINLOG [-c] [-p PMEM] [-m MAX_PACKETS] [-l] 10 | [-o OUTPUT] [-s] [-v] [-d] [-f] [-t] 11 | [--slink-file SLINK_FILE] 12 | 13 | Required arguments: 14 | -b BINLOG, --binlog BINLOG 15 | path to a vltrace log in binary format 16 | Optional arguments: 17 | -h, --help show this help message and exit 18 | -c, --convert converter mode - only converts vltrace log from binary 19 | to text format 20 | -p PMEM, --pmem PMEM paths to colon-separated pmem filesystems 21 | -m MAX_PACKETS, --max-packets MAX_PACKETS 22 | maximum number of packets to be read from the vltrace 23 | binary log 24 | -l, --log print converted log in analyze mode 25 | -o OUTPUT, --output OUTPUT 26 | file to save analysis output 27 | -s, --script script mode - print only the most important 28 | information (eg. no info about progress) 29 | -v, --verbose verbose mode (-v: verbose, -vv: very verbose) 30 | -d, --debug debug mode 31 | -f, --offline offline analysis mode 32 | -t, --print-all-syscalls 33 | print also syscalls without path or file descriptor 34 | among arguments to the analysis log 35 | --slink-file SLINK_FILE 36 | resolve symlinks saved in the given file 37 | 38 | 2) Examples: 39 | 40 | antool -b vltrace-bin-log.dat -p /mnt/pmem1:/mnt/pmem2 41 | Run antool in the default mode: check whether all syscalls recorded 42 | in the log are supported by pmemfile (mounted at two mount points). 43 | 44 | antool -b vltrace-bin-log.dat -c 45 | Run antool in converter mode: only convert vltrace binary log 46 | to the text format. 47 | -------------------------------------------------------------------------------- /src/tools/antool/README.md: -------------------------------------------------------------------------------- 1 | Antool - Analyzing Tool 2 | ======================= 3 | 4 | Analyzing Tool analyzes binary logs of vltrace and checks 5 | whether all recorded syscalls are supported by pmemfile. 6 | 7 | Antool uses vltrace's bin2txt converter to read and parse its binary logs, 8 | so the following files: 9 | 10 | - converter.py 11 | - exceptions.py 12 | - syscallinfo.py 13 | - syscall.py 14 | - syscalltable.py 15 | - utils.py 16 | 17 | should be kept in sync in these two projects: 18 | 19 | 1) https://github.com/pmem/vltrace/tree/master/tools/bin2txt 20 | 2) https://github.com/pmem/pmemfile/tree/master/src/tools/antool 21 | 22 | 23 | ### CONTACTS ### 24 | 25 | For more information about this tool contact: 26 | 27 | - Lukasz Dorau (lukasz.dorau at intel.com) 28 | 29 | or create an issue [here](https://github.com/pmem/pmemfile/issues). 30 | -------------------------------------------------------------------------------- /src/tools/antool/exceptions.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # 3 | # Copyright 2017, Intel Corporation 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | 33 | 34 | class EndOfFile(Exception): 35 | def __init__(self): 36 | Exception.__init__(self) 37 | 38 | 39 | class CriticalError(Exception): 40 | def __init__(self, string): 41 | self.message = string 42 | -------------------------------------------------------------------------------- /tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | option(TESTS_USE_FORCED_PMEM "let tests force enable or force disable use of optimized flush in libpmemobj (to speed them up)" OFF) 33 | 34 | set(GLOBAL_TEST_ARGS 35 | -DPERL_EXECUTABLE=${PERL_EXECUTABLE} 36 | -DMATCH_SCRIPT=${PROJECT_SOURCE_DIR}/tests/match 37 | -DMKFS_EXECUTABLE=$ 38 | -DCAT_EXECUTABLE=$ 39 | -DPARENT_DIR=${TEST_DIR}/ 40 | -DTESTS_USE_FORCED_PMEM=${TESTS_USE_FORCED_PMEM}) 41 | 42 | if(TRACE_TESTS) 43 | set(GLOBAL_TEST_ARGS ${GLOBAL_TEST_ARGS} --trace-expand) 44 | endif() 45 | 46 | if(BUILD_LIBPMEMFILE_POSIX_TESTS) 47 | add_subdirectory(posix) 48 | endif() 49 | 50 | if(BUILD_LIBPMEMFILE_TESTS) 51 | add_subdirectory(preload) 52 | endif() 53 | 54 | add_subdirectory(antool) 55 | -------------------------------------------------------------------------------- /tests/antool/.coveragerc: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | # .coveragerc -- config file for coverage.py 33 | 34 | [run] 35 | branch = True 36 | 37 | [report] 38 | exclude_lines = 39 | pragma: no cover 40 | 41 | if self.debug_mode 42 | elif self.debug_mode 43 | if debug_mode 44 | if debug_on 45 | if debug 46 | 47 | except FileNotFoundError 48 | except CriticalError 49 | except EndOfFile 50 | except: 51 | 52 | assert_msg 53 | 54 | raise CriticalError 55 | raise AssertionError 56 | raise NotImplementedError 57 | 58 | if 0: 59 | if __name__ == .__main__.: 60 | 61 | ignore_errors = True 62 | -------------------------------------------------------------------------------- /tests/antool/common.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | # 32 | 33 | SYSCALL_TABLE="syscalls_table.dat" 34 | 35 | MASK_BIN="output-bin-*.log" 36 | MASK_DIR_PMEM="dir_pmem-*.txt" 37 | 38 | ARCH_EXT="bz2" 39 | ARCHIVES="*.$ARCH_EXT" 40 | 41 | FI_SRC_BIN_LOG=output-bin-1531-14.log 42 | FI_BIN_LOG=output-bin-fi.log 43 | -------------------------------------------------------------------------------- /tests/antool/cut-126-16.log.match: -------------------------------------------------------------------------------- 1 | close (0x0000000012345678) 2 | open "/tmp/antool $(S)" 3 | open "/tmp/antool $(S)/pmem $(S)/tmp $(S)" [PMEM] 4 | open "/tmp/antool $(S)/nonp $(S)/tmp $(S)" 5 | symlink "/tmp/antool $(S)/nonp $(S)/tmp $(S)" "$(S)/tests/antool/$(S)/link1" 6 | symlink "/tmp/antool $(S)/pmem $(S)/tmp $(S)" [PMEM] "$(S)/tests/antool/$(S)/link2" [PMEM] 7 | INFO: new symlink added to pmem paths: "$(S)/tests/antool/$(S)/link2" 8 | symlinkat "/tmp/antool $(S)/nonp $(S)/tmp $(S)" "$(S)/tests/antool/$(S)" "link3" 9 | symlinkat "/tmp/antool $(S)/pmem $(S)/tmp $(S)" [PMEM] "$(S)/tests/antool/$(S)" "link4" [PMEM] 10 | INFO: new symlink added to pmem paths: "$(S)/tests/antool/$(S)/link4" 11 | symlinkat "/tmp/antool $(S)/nonp $(S)/tmp $(S)" "/tmp/antool $(S)" "link5" 12 | symlinkat "/tmp/antool $(S)/pmem $(S)/tmp $(S)" [PMEM] "/tmp/antool $(S)" "link6" [PMEM] 13 | INFO: new symlink added to pmem paths: "/tmp/antool $(S)/link6" 14 | dup2 (305419896) 15 | fallocate "/tmp/antool $(S)/nonp $(S)/tmp $(S)" 16 | fallocate "/tmp/antool $(S)/pmem $(S)/tmp $(S)" [PMEM] 17 | newfstatat "/tmp/antool $(S)/nonp $(S)/tmp $(S)" "" 18 | newfstatat "/tmp/antool $(S)/pmem $(S)/tmp $(S)" "" [PMEM] 19 | close (0x0000000087654321) 20 | -------------------------------------------------------------------------------- /tests/antool/cut-1531-8.log.match: -------------------------------------------------------------------------------- 1 | $(XX) $(XX) ------------------ ------------------ close 0x0000000012345678 2 | $(XX) $(XX) $(XX) $(XX) close 3 | $(XX) $(XX) ------------------ ------------------ open "START 111 1234567890 111 END" 0x0000000000000102 0x0000000000000103 4 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF open 5 | $(XX) $(XX) ------------------ ------------------ openat 0x0000000000000101 "START 222 1234567890 222 END" 0x0000000000000103 0x0000000000000104 6 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF openat 7 | $(XX) $(XX) ------------------ ------------------ rename "START 111 1234567890 111 END" "START 222 1234567890 222 END" 8 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF rename 9 | $(XX) $(XX) ------------------ ------------------ llistxattr "START 222 1234567890 222 END" $(XX) 0x0000000000000103 10 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF llistxattr 11 | $(XX) $(XX) ------------------ ------------------ symlinkat "START 111 1234567890 111 END" 0x0000000000000102 "START 222 1234567890 222 END" 12 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF symlinkat 13 | $(XX) $(XX) ------------------ ------------------ renameat 0x0000000000000101 "START 111 1234567890 111 END" 0x0000000000000103 "START 222 1234567890 222 END" 14 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF renameat 15 | $(XX) $(XX) ------------------ ------------------ mount "START 111 1234567890 111 END" "START 222 1234567890 222 END" "START 333 1234567890 333 END" 0x0000000000000101 0x0000000000000102 16 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF mount 17 | $(XX) $(XX) ------------------ ------------------ request_key "START 111 1234567890 111 END" "START 222 1234567890 222 END" "START 333 1234567890 333 END" 0x0000000000000104 18 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF request_key 19 | $(XX) $(XX) ------------------ ------------------ init_module 0x0000000000000101 0x0000000000000102 "START 111 1234567890 111 END" 20 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF init_module 21 | $(XX) $(XX) ------------------ ------------------ kexec_file_load 0x0000000000000101 0x0000000000000102 0x0000000000000103 "START 222 1234567890 222 END" 0x0000000000000105 22 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF kexec_file_load 23 | $(XX) $(XX) ------------------ ------------------ fanotify_mark 0x0000000000000101 0x0000000000000102 0x0000000000000103 0x0000000000000104 "START 111 1234567890 111 END" 24 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF fanotify_mark 25 | $(XX) $(XX) ------------------ ------------------ close 0x0000000087654321 26 | -------------------------------------------------------------------------------- /tests/antool/cut-382-4.log.match: -------------------------------------------------------------------------------- 1 | $(XX) $(XX) ------------------ ------------------ close 0x0000000012345678 2 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF close 3 | $(XX) $(XX) ------------------ ------------------ open "111 non exist" 0x0000000000000101 0x0000000000000102 4 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF open 5 | $(XX) $(XX) ------------------ ------------------ close 0x0000000000000101 6 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF close 7 | $(XX) $(XX) ------------------ ------------------ vfork 8 | $(XX) $(XX) 0x0000000000000000 $(XX) vfork 9 | $(XX) $(XX) ------------------ ------------------ open "222 non exist" 0x0000000000000102 0x0000000000000103 10 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF open 11 | $(XX) $(XX) ------------------ ------------------ close 0x0000000000000102 12 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF close 13 | $(XX) $(XX) ------------------ ------------------ close 0x0000000087654321 14 | -------------------------------------------------------------------------------- /tests/antool/cut-382-7.log.match: -------------------------------------------------------------------------------- 1 | $(XX) $(XX) ------------------ ------------------ close 0x0000000012345678 2 | $(XX) $(XX) $(XX) 0xFFFFFFFFFFFFFFFF close 3 | $(XX) $(XX) ------------------ ------------------ rt_sigaction 0x000000000000000A $(XX) 0x0000000000000000 0x0000000000000008 4 | $(XX) $(XX) 0x0000000000000000 0x0000000000000000 rt_sigaction 5 | $(OPT)$(XX) $(XX) ------------------ ------------------ rt_sigprocmask 0x0000000000000000 $(XX) $(XX) 0x0000000000000008 6 | $(OPT)$(XX) $(XX) 0x0000000000000000 0x0000000000000000 rt_sigprocmask 7 | $(OPT)$(XX) $(XX) ------------------ ------------------ getpid 8 | $(OPT)$(XX) $(XX) 0x0000000000000000 $(XX) getpid 9 | $(OPT)$(XX) $(XX) ------------------ ------------------ gettid 10 | $(OPT)$(XX) $(XX) 0x0000000000000000 $(XX) gettid 11 | $(XX) $(XX) ------------------ ------------------ tgkill $(XX) $(XX) 0x000000000000000A 12 | $(XX) $(XX) 0x0000000000000000 0x0000000000000000 tgkill 13 | $(OPT)$(XX) $(XX) ------------------ ------------------ rt_sigprocmask 0x0000000000000002 $(XX) $(XX) 0x0000000000000008 14 | $(OPT)$(XX) $(XX) 0x0000000000000000 0x0000000000000000 rt_sigprocmask 15 | $(XX) $(XX) ------------------ ------------------ rt_sigreturn 0x000000000000000A $(*) 16 | $(XX) $(XX) 0x0000000000000000 0x0000000000000000 $(*) 17 | $(OPT)$(XX) $(XX) ------------------ ------------------ nanosleep $(XX) $(XX) 18 | $(OPT)$(XX) $(XX) $(XX) $(XX) nanosleep 19 | $(XX) $(XX) ------------------ ------------------ close 0x0000000087654321 20 | -------------------------------------------------------------------------------- /tests/antool/dir_pmem-126-15.txt: -------------------------------------------------------------------------------- 1 | /tmp/antool LAz/pmem QAl 2 | -------------------------------------------------------------------------------- /tests/antool/dir_pmem-126-16.txt: -------------------------------------------------------------------------------- 1 | /tmp/antool TL9/pmem 9Ot 2 | -------------------------------------------------------------------------------- /tests/antool/output-126-15.log.match: -------------------------------------------------------------------------------- 1 | Unsupported syscalls detected: 2 | chroot 3 | setxattr 4 | lsetxattr 5 | fsetxattr 6 | listxattr 7 | llistxattr 8 | flistxattr 9 | removexattr 10 | lremovexattr 11 | fremovexattr 12 | execve 13 | execveat 14 | readahead 15 | name_to_handle_at 16 | fork 17 | vfork 18 | 19 | Unsupported syscall's flag detected: 20 | open 21 | openat 22 | renameat2 23 | fallocate 24 | fallocate 25 | fallocate 26 | fcntl 27 | fcntl 28 | fcntl 29 | fcntl 30 | fcntl 31 | fcntl 32 | fcntl 33 | fcntl 34 | fcntl 35 | fcntl 36 | fcntl 37 | fcntl 38 | fcntl 39 | fcntl 40 | fcntl 41 | fcntl 42 | fcntl 43 | clone 44 | 45 | Yet-unsupported syscalls detected (will be supported): 46 | mmap 47 | flock 48 | sendfile64 49 | splice 50 | copy_file_range 51 | 52 | -------------------------------------------------------------------------------- /tests/antool/output-126-16.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-bin-1148-12.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-1148-12.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-126-15.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-126-15.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-126-16.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-126-16.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-126-9.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-126-9.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-1531-10.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-1531-10.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-1531-11.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-1531-11.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-1531-12.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-1531-12.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-1531-13.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-1531-13.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-1531-14.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-1531-14.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-1531-8.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-1531-8.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-1531-9.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-1531-9.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-382-0.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-382-0.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-382-1.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-382-1.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-382-2.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-382-2.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-382-3.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-382-3.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-382-4.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-382-4.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-382-5.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-382-5.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-382-6.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-382-6.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-bin-382-7.log.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-bin-382-7.log.bz2 -------------------------------------------------------------------------------- /tests/antool/output-err-126-9.log.match: -------------------------------------------------------------------------------- 1 | ERROR(parser): string argument is truncated: START 333 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 2 | ERROR(parser): string argument is truncated: START 333 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 3 | ERROR(parser): string argument is truncated: START 333 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 4 | ERROR(parser): string argument is truncated: START 333 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567 5 | -------------------------------------------------------------------------------- /tests/antool/output-err-1531-10.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-1531-10.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-1531-11.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-1531-11.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-1531-12.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-1531-12.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-1531-13.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-1531-13.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-1531-14.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-1531-14.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-1531-8.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-1531-8.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-1531-9.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-1531-9.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-382-0.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-382-0.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-382-1.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-382-1.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-382-2.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-382-2.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-382-3.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-382-3.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-382-4.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-382-4.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-382-5.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-382-5.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-382-6.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-382-6.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-382-7.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-382-7.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-fi-1.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-fi-1.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-fi-10.log.match: -------------------------------------------------------------------------------- 1 | ERROR: log file is truncated: output-bin-$(*).log 2 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-11.log.match: -------------------------------------------------------------------------------- 1 | CRITICAL:$(*)/src/tools/antool/utils.py:$(N):read_bdata(): input file is truncated 2 | ERROR: input file is truncated 3 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-12.log.match: -------------------------------------------------------------------------------- 1 | ERROR: wrong signature of vltrace log: VLTRACE_TA__ (expected: VLTRACE_TAB) 2 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-13.log.match: -------------------------------------------------------------------------------- 1 | ERROR: wrong version of vltrace log: 0.0.0 (required: 0.1.0 or later) 2 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-14.log.match: -------------------------------------------------------------------------------- 1 | ERROR: wrong architecture of vltrace log: Unknown (0) (required: x86_64) 2 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-15.log.match: -------------------------------------------------------------------------------- 1 | ERROR: wrong architecture of vltrace log: Unknown (1684234849) (required: x86_64) 2 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-16.log.match: -------------------------------------------------------------------------------- 1 | ERROR(syscalltable): wrong format of syscalls table: 2 | ERROR(syscalltable): format size : 80 3 | ERROR(syscalltable): data size : 1684234849 4 | ERROR: log file is truncated: output-bin-$(*).log 5 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-19.log.match: -------------------------------------------------------------------------------- 1 | DEBUG(main): convert_mode = 0 2 | DEBUG(main): script_mode = 0 3 | DEBUG(main): offline_mode = 0 4 | DEBUG(main): verbose_mode = 0 5 | DEBUG(main): debug_mode = 1 6 | DEBUG(main): print_progress = 0 7 | DEBUG(syscalltable): format of syscall table OK, reading 1000 records... 8 | DEBUG(syscalltable): read 1000 records of syscall table. 9 | INFO(converter): Command line: vltrace -f -l bin -r -s 1531 -f -o output-bin-14.log $(*)/tests/antool/test_syscalls 14 10 | INFO(converter): Current working directory: $(*)/tests/antool/logs-test-parser.sh-14-1531-2017-07-27_09:05:31_242116266-9110 11 | 12 | DEBUG(parser): 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(*)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 13 | DEBUG(parser): Notice: no exit info found, packet saved to 'list_no_exit': 0000254E0000254E execve 14 | DEBUG(parser): WARNING: no entry found: exit without entry info found: 0000254E0000254E brk 15 | DEBUG(parser): Notice: packet saved (to 'list_no_entry'): 0000254E0000254E brk 16 | DEBUG(parser): 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 17 | DEBUG(parser): 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 18 | DEBUG(analysis): mmap (-1) 19 | DEBUG(parser): 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 20 | DEBUG(parser): 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 21 | DEBUG(analysis): access "/etc/ld.so.preload" 22 | DEBUG(parser): 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 23 | DEBUG(parser): 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "/etc/ld.so.cache" 0x0000000000080000 0x0000000000000001 24 | DEBUG(analysis): open "/etc/ld.so.cache" 25 | DEBUG(parser): 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 26 | DEBUG(parser): 0x000447D4D14054EC 0x0000254E0000254E ------------------ ------------------ newfstat 0x0000000000000005 0x00007FFCFA956EF0 27 | DEBUG(analysis): execve "$(*)/tests/antool/test_syscalls" 28 | WARNING(analysis): missing info about arguments of syscall: 'brk' - skipping... 29 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-2.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-fi-2.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-fi-24.log.match: -------------------------------------------------------------------------------- 1 | DEBUG(main): convert_mode = 0 2 | DEBUG(main): script_mode = 1 3 | DEBUG(main): offline_mode = 0 4 | DEBUG(main): verbose_mode = 0 5 | DEBUG(main): debug_mode = 1 6 | DEBUG(main): print_progress = 0 7 | DEBUG(syscalltable): format of syscall table OK, reading 1000 records... 8 | DEBUG(syscalltable): read 1000 records of syscall table. 9 | DEBUG(parser): 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(*)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 10 | DEBUG(analysis): execve "$(*)/tests/antool/test_syscalls" 11 | DEBUG(parser): 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 12 | DEBUG(parser): 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 13 | DEBUG(parser): 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 14 | DEBUG(parser): 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 15 | DEBUG(analysis): mmap (-1) 16 | DEBUG(parser): 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 17 | DEBUG(parser): 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 18 | DEBUG(analysis): access "/etc/ld.so.preload" 19 | DEBUG(parser): 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 20 | WARNING(parser): BPF read error occurred, a string argument is empty in syscall: open 21 | DEBUG(parser): 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "" 0x0000000000080000 0x0000000000000001 22 | WARNING(analysis): BPF read error occurred, path is empty in syscall: open 23 | DEBUG(analysis): open "" 24 | DEBUG(parser): 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 25 | DEBUG(parser): 0x000447D4D14054EC 0x0000254E0000254E ------------------ ------------------ newfstat 0x0000000000000005 0x00007FFCFA956EF0 26 | DEBUG(analysis): newfstat "" 27 | DEBUG(parser): 0x000447D4D1405BAC 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 newfstat 28 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-25.log.match: -------------------------------------------------------------------------------- 1 | WARNING(analysis): BPF read error occurred, path is empty in syscall: open 2 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-26.log.match: -------------------------------------------------------------------------------- 1 | DEBUG(main): convert_mode = 0 2 | DEBUG(main): script_mode = 1 3 | DEBUG(main): offline_mode = 0 4 | DEBUG(main): verbose_mode = 0 5 | DEBUG(main): debug_mode = 1 6 | DEBUG(main): print_progress = 0 7 | DEBUG(syscalltable): format of syscall table OK, reading 1000 records... 8 | DEBUG(syscalltable): read 1000 records of syscall table. 9 | DEBUG(parser): 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(*)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 10 | DEBUG(analysis): execve "$(*)/tests/antool/test_syscalls" 11 | DEBUG(parser): 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 12 | DEBUG(parser): 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 13 | DEBUG(parser): 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 14 | DEBUG(parser): 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 15 | DEBUG(analysis): mmap (-1) 16 | DEBUG(parser): 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 17 | DEBUG(parser): 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 18 | DEBUG(analysis): access "/etc/ld.so.preload" 19 | DEBUG(parser): 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 20 | DEBUG(parser): corrupted entry packet information of syscall open: 21 | DEBUG(parser): 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open [corrupted entry packet] 22 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-27.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-fi-27.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-fi-3.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-fi-3.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-fi-37.log.match: -------------------------------------------------------------------------------- 1 | DEBUG(main): convert_mode = 0 2 | DEBUG(main): script_mode = 1 3 | DEBUG(main): offline_mode = 0 4 | DEBUG(main): verbose_mode = 0 5 | DEBUG(main): debug_mode = 1 6 | DEBUG(main): print_progress = 0 7 | DEBUG(syscalltable): format of syscall table OK, reading 1000 records... 8 | DEBUG(syscalltable): read 1000 records of syscall table. 9 | DEBUG(parser): 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(S)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 10 | DEBUG(analysis): execve "$(S)/tests/antool/test_syscalls" 11 | DEBUG(parser): 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 12 | DEBUG(parser): 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 13 | DEBUG(parser): 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 14 | DEBUG(parser): 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 15 | DEBUG(analysis): mmap (-1) 16 | DEBUG(parser): 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 17 | WARNING(parser): BPF read error occurred, a string argument is empty in syscall: access 18 | DEBUG(parser): 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "" 0x0000000000000004 19 | WARNING(analysis): BPF read error occurred, path is empty in syscall: access 20 | DEBUG(analysis): access "" 21 | DEBUG(parser): 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 22 | DEBUG(parser): 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "/etc/ld.so.cache" 0x0000000000080000 0x0000000000000001 23 | DEBUG(analysis): open "/etc/ld.so.cache" 24 | DEBUG(parser): 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 25 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-38.log.match: -------------------------------------------------------------------------------- 1 | WARNING(analysis): BPF read error occurred, path is empty in syscall: access 2 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-4.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-err-fi-4.log.match -------------------------------------------------------------------------------- /tests/antool/output-err-fi-40.log.match: -------------------------------------------------------------------------------- 1 | DEBUG(main): convert_mode = 0 2 | DEBUG(main): script_mode = 1 3 | DEBUG(main): offline_mode = 0 4 | DEBUG(main): verbose_mode = 0 5 | DEBUG(main): debug_mode = 1 6 | DEBUG(main): print_progress = 0 7 | DEBUG(syscalltable): format of syscall table OK, reading 1000 records... 8 | DEBUG(syscalltable): read 1000 records of syscall table. 9 | DEBUG(parser): 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(S)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 10 | DEBUG(analysis): execve "$(S)/tests/antool/test_syscalls" 11 | DEBUG(parser): 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 12 | DEBUG(parser): 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 13 | DEBUG(parser): 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 14 | DEBUG(parser): WARNING: no entry found: exit without entry info found: 0000254E0000254E mmap 15 | DEBUG(parser): Notice: packet saved (to 'list_no_entry'): 0000254E0000254E mmap 16 | DEBUG(parser): 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 17 | DEBUG(parser): 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 18 | DEBUG(analysis): access "/etc/ld.so.preload" 19 | DEBUG(parser): 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 20 | DEBUG(parser): 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 21 | DEBUG(parser): Notice: found matching exit for syscall: 0000254E0000254E mmap 22 | DEBUG(analysis): mmap (-1) 23 | DEBUG(parser): 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "/etc/ld.so.cache" 0x0000000000080000 0x0000000000000001 24 | DEBUG(analysis): open "/etc/ld.so.cache" 25 | DEBUG(parser): 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 26 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-41.log.match: -------------------------------------------------------------------------------- 1 | DEBUG(main): convert_mode = 0 2 | DEBUG(main): script_mode = 1 3 | DEBUG(main): offline_mode = 0 4 | DEBUG(main): verbose_mode = 0 5 | DEBUG(main): debug_mode = 1 6 | DEBUG(main): print_progress = 0 7 | DEBUG(syscalltable): format of syscall table OK, reading 1000 records... 8 | DEBUG(syscalltable): read 1000 records of syscall table. 9 | DEBUG(parser): 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(S)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 10 | DEBUG(analysis): execve "$(S)/tests/antool/test_syscalls" 11 | DEBUG(parser): 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 12 | DEBUG(parser): 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 13 | DEBUG(parser): Notice: no exit info found, packet saved to 'list_no_exit': 0000254E0000254E brk 14 | DEBUG(parser): WARNING: no entry found: exit without entry info found: 0000254E0000254E mmap 15 | DEBUG(parser): Notice: packet saved (to 'list_no_entry'): 0000254E0000254E mmap 16 | DEBUG(parser): 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 17 | DEBUG(parser): 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 18 | DEBUG(analysis): access "/etc/ld.so.preload" 19 | DEBUG(parser): 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 20 | DEBUG(parser): Notice: found matching entry for syscall: 0000254E0000254E brk 21 | DEBUG(parser): 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 22 | DEBUG(parser): 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 23 | DEBUG(parser): Notice: found matching exit for syscall: 0000254E0000254E mmap 24 | DEBUG(analysis): mmap (-1) 25 | DEBUG(parser): 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "/etc/ld.so.cache" 0x0000000000080000 0x0000000000000001 26 | DEBUG(analysis): open "/etc/ld.so.cache" 27 | DEBUG(parser): 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 28 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-5.log.match: -------------------------------------------------------------------------------- 1 | DEBUG(main): convert_mode = 0 2 | DEBUG(main): script_mode = 1 3 | DEBUG(main): offline_mode = 1 4 | DEBUG(main): verbose_mode = 0 5 | DEBUG(main): debug_mode = 1 6 | DEBUG(main): print_progress = 0 7 | DEBUG(syscalltable): format of syscall table OK, reading 1000 records... 8 | DEBUG(syscalltable): read 1000 records of syscall table. 9 | DEBUG(parser): 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(*)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 10 | DEBUG(parser): 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 11 | DEBUG(parser): 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 12 | DEBUG(parser): 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 13 | DEBUG(parser): 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 14 | DEBUG(parser): 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 15 | DEBUG(parser): 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 16 | DEBUG(parser): 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 17 | DEBUG(parser): 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "/etc/ld.so.cache" 0x0000000000080000 0x0000000000000001 18 | DEBUG(parser): 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 19 | DEBUG(analysis): PID[0] = 0x000000000000254E 20 | DEBUG(analysis): execve "$(*)/tests/antool/test_syscalls" 21 | DEBUG(analysis): brk 22 | DEBUG(analysis): mmap (-1) 23 | DEBUG(analysis): access "/etc/ld.so.preload" 24 | DEBUG(analysis): open "/etc/ld.so.cache" 25 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-6.log.match: -------------------------------------------------------------------------------- 1 | ERROR: file not found: /tmp/tmp.$(*) 2 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-7.log.match: -------------------------------------------------------------------------------- 1 | CRITICAL:$(*)/src/tools/antool/utils.py:$(N):read_bdata(): input file is truncated 2 | ERROR: input file is truncated 3 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-8.log.match: -------------------------------------------------------------------------------- 1 | ERROR: log file is truncated: output-bin-$(*).log 2 | -------------------------------------------------------------------------------- /tests/antool/output-err-fi-9.log.match: -------------------------------------------------------------------------------- 1 | CRITICAL:$(*)/src/tools/antool/utils.py:$(N):read_bdata(): input file is truncated 2 | ERROR: input file is truncated 3 | ERROR: unexpected error 4 | -------------------------------------------------------------------------------- /tests/antool/output-f-126-15.log.match: -------------------------------------------------------------------------------- 1 | Unsupported syscalls detected: 2 | chroot 3 | setxattr 4 | lsetxattr 5 | fsetxattr 6 | listxattr 7 | llistxattr 8 | flistxattr 9 | removexattr 10 | lremovexattr 11 | fremovexattr 12 | execve 13 | execveat 14 | readahead 15 | name_to_handle_at 16 | fork 17 | vfork 18 | 19 | Unsupported syscall's flag detected: 20 | open 21 | openat 22 | renameat2 23 | fallocate 24 | fallocate 25 | fallocate 26 | fcntl 27 | fcntl 28 | fcntl 29 | fcntl 30 | fcntl 31 | fcntl 32 | fcntl 33 | fcntl 34 | fcntl 35 | fcntl 36 | fcntl 37 | fcntl 38 | fcntl 39 | fcntl 40 | fcntl 41 | fcntl 42 | fcntl 43 | clone 44 | 45 | Yet-unsupported syscalls detected (will be supported): 46 | mmap 47 | flock 48 | sendfile64 49 | splice 50 | copy_file_range 51 | 52 | -------------------------------------------------------------------------------- /tests/antool/output-f-126-16.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-1.log.match: -------------------------------------------------------------------------------- 1 | Reading packets: 2 | 1 (35% bytes) 2 (35% bytes) 3 (35% bytes) 4 (35% bytes) 5 (35% bytes) 6 (35% bytes) 7 (35% bytes) 8 (35% bytes) 9 (36% bytes) 10 (36% bytes) done (read maximum number of packets: 10) 3 | Done (read 10 packets). 4 | All syscalls are supported. 5 | -------------------------------------------------------------------------------- /tests/antool/output-fi-10.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-10.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-11.log.match: -------------------------------------------------------------------------------- 1 | Reading packets: 2 | 1 (98% bytes) 2 (98% bytes) 3 (98% bytes) 4 (98% bytes) 5 (98% bytes) 6 (98% bytes) 7 (99% bytes) 8 (99% bytes) 9 (99% bytes) 10 (99% bytes) -------------------------------------------------------------------------------- /tests/antool/output-fi-12.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-12.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-13.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-13.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-14.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-14.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-15.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-15.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-16.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-16.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-17.log.match: -------------------------------------------------------------------------------- 1 | Reading packets: 2 | All syscalls are supported. 3 | -------------------------------------------------------------------------------- /tests/antool/output-fi-18.log.match: -------------------------------------------------------------------------------- 1 | Reading packets: 2 | 3 | Counting PIDs: 4 | 5 | Analyzing: 6 | All syscalls are supported. 7 | -------------------------------------------------------------------------------- /tests/antool/output-fi-19.log.match: -------------------------------------------------------------------------------- 1 | Reading packets: 2 | All syscalls are supported. 3 | -------------------------------------------------------------------------------- /tests/antool/output-fi-2.log.match: -------------------------------------------------------------------------------- 1 | Reading packets: 2 | 1 (35% bytes) 2 (35% bytes) 3 (35% bytes) 4 (35% bytes) 5 (35% bytes) 6 (35% bytes) 7 (35% bytes) 8 (35% bytes) 9 (36% bytes) 10 (36% bytes) done (read maximum number of packets: 10) 3 | Done (read 10 packets). 4 | 5 | Counting PIDs: 6 | 1 of 5 (20%) 2 of 5 (40%) 3 of 5 (60%) 4 of 5 (80%) 5 of 5 (100%) done. 7 | 8 | Analyzing: 9 | 1 of 5 (20%) 2 of 5 (40%) 3 of 5 (60%) 4 of 5 (80%) 5 of 5 (100%) done. 10 | 11 | All syscalls are supported. 12 | -------------------------------------------------------------------------------- /tests/antool/output-fi-20.log.match: -------------------------------------------------------------------------------- 1 | Reading packets: 2 | 3 | Counting PIDs: 4 | 5 | Analyzing: 6 | All syscalls are supported. 7 | -------------------------------------------------------------------------------- /tests/antool/output-fi-21.log.match: -------------------------------------------------------------------------------- 1 | Reading packets: 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-23.log.match: -------------------------------------------------------------------------------- 1 | Unsupported syscalls detected: 2 | fork 3 | 4 | -------------------------------------------------------------------------------- /tests/antool/output-fi-24.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-25.log.match: -------------------------------------------------------------------------------- 1 | 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(*)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 2 | 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 3 | 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 4 | 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 5 | 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 6 | 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 7 | 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 8 | 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 9 | WARNING: BPF read error occurred, a string argument is empty in syscall: open 10 | 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "" 0x0000000000080000 0x0000000000000001 11 | 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 12 | 0x000447D4D14054EC 0x0000254E0000254E ------------------ ------------------ newfstat 0x0000000000000005 0x00007FFCFA956EF0 13 | 0x000447D4D1405BAC 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 newfstat 14 | All syscalls are supported. 15 | -------------------------------------------------------------------------------- /tests/antool/output-fi-26.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-27.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-28.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-28.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-29.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-3.log.match: -------------------------------------------------------------------------------- 1 | Reading packets: 2 | 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(*)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 3 | 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 4 | 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 5 | 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 6 | 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 7 | 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 8 | 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 9 | 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 10 | 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "/etc/ld.so.cache" 0x0000000000080000 0x0000000000000001 11 | 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 12 | done (read maximum number of packets: 10) 13 | All syscalls are supported. 14 | -------------------------------------------------------------------------------- /tests/antool/output-fi-30.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-31.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-32.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-32.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-33.log.match: -------------------------------------------------------------------------------- 1 | Unsupported syscall's flag detected: 2 | fcntl 3 | 4 | Yet-unsupported syscalls detected (will be supported): 5 | mmap 6 | 7 | -------------------------------------------------------------------------------- /tests/antool/output-fi-34.log.match: -------------------------------------------------------------------------------- 1 | Yet-unsupported syscalls detected (will be supported): 2 | mmap 3 | 4 | -------------------------------------------------------------------------------- /tests/antool/output-fi-35.log.match: -------------------------------------------------------------------------------- 1 | Unsupported syscalls detected: 2 | execve 3 | 4 | Yet-unsupported syscalls detected (will be supported): 5 | mmap 6 | 7 | -------------------------------------------------------------------------------- /tests/antool/output-fi-36.log.match: -------------------------------------------------------------------------------- 1 | Yet-unsupported syscalls detected (will be supported): 2 | mmap 3 | 4 | -------------------------------------------------------------------------------- /tests/antool/output-fi-37.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-38.log.match: -------------------------------------------------------------------------------- 1 | 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(S)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 2 | 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 3 | 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 4 | 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 5 | 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 6 | 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 7 | WARNING: BPF read error occurred, a string argument is empty in syscall: access 8 | 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "" 0x0000000000000004 9 | 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 10 | 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "/etc/ld.so.cache" 0x0000000000080000 0x0000000000000001 11 | 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 12 | All syscalls are supported. 13 | -------------------------------------------------------------------------------- /tests/antool/output-fi-39.log.match: -------------------------------------------------------------------------------- 1 | Unsupported syscall's flag detected: 2 | fcntl 3 | 4 | Yet-unsupported syscalls detected (will be supported): 5 | mmap 6 | 7 | -------------------------------------------------------------------------------- /tests/antool/output-fi-4.log.match: -------------------------------------------------------------------------------- 1 | 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(*)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 2 | 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 3 | 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 4 | 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 5 | 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 6 | 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 7 | 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 8 | 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 9 | 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "/etc/ld.so.cache" 0x0000000000080000 0x0000000000000001 10 | 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 11 | All syscalls are supported. 12 | -------------------------------------------------------------------------------- /tests/antool/output-fi-40.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-41.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fi-5.log.match: -------------------------------------------------------------------------------- 1 | 0x000447D4D13A8361 0x0000254E0000254E ------------------ ------------------ execve "$(*)/tests/antool/test_syscalls" 0x00007FFC9E8BC528 0x00007FFC9E8BC540 2 | 0x000447D4D13F74C1 0x0000254E0000254E 0x0000000000000000 0x0000000000000000 execve 3 | 0x000447D4D13FBA92 0x0000254E0000254E ------------------ ------------------ brk 0x0000000000000000 4 | 0x000447D4D13FC18C 0x0000254E0000254E 0x0000000000000000 0x0000000001F0E000 brk 5 | 0x000447D4D13FE878 0x0000254E0000254E ------------------ ------------------ mmap 0x0000000000000000 0x0000000000001000 0x0000000000000003 0x0000000000000022 0xFFFFFFFFFFFFFFFF 0x0000000000000000 6 | 0x000447D4D13FF72A 0x0000254E0000254E 0x0000000000000000 0x00007F6C96F25000 mmap 7 | 0x000447D4D14012A2 0x0000254E0000254E ------------------ ------------------ access "/etc/ld.so.preload" 0x0000000000000004 8 | 0x000447D4D14027FE 0x0000254E0000254E 0x0000000000000002 0xFFFFFFFFFFFFFFFF access 9 | 0x000447D4D1403BB4 0x0000254E0000254E ------------------ ------------------ open "/etc/ld.so.cache" 0x0000000000080000 0x0000000000000001 10 | 0x000447D4D1404F48 0x0000254E0000254E 0x0000000000000000 0x0000000000000005 open 11 | All syscalls are supported. 12 | -------------------------------------------------------------------------------- /tests/antool/output-fi-6.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-6.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-7.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-7.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-8.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-8.log.match -------------------------------------------------------------------------------- /tests/antool/output-fi-9.log.match: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/output-fi-9.log.match -------------------------------------------------------------------------------- /tests/antool/output-fv-126-16.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-fvv-126-16.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-v-126-16.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/output-vv-126-16.log.match: -------------------------------------------------------------------------------- 1 | All syscalls are supported. 2 | -------------------------------------------------------------------------------- /tests/antool/syscalls_table.dat.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/tests/antool/syscalls_table.dat.bz2 -------------------------------------------------------------------------------- /tests/ld.supp: -------------------------------------------------------------------------------- 1 | { 2 | 3 | Memcheck:Cond 4 | fun:index 5 | fun:expand_dynamic_string_token 6 | fun:_dl_map_object 7 | fun:map_doit 8 | fun:_dl_catch_error 9 | fun:do_preload 10 | fun:dl_main 11 | fun:_dl_sysdep_start 12 | fun:_dl_start 13 | obj:/lib/x86_64-linux-gnu/ld-2.*.so 14 | obj:* 15 | obj:* 16 | } 17 | 18 | -------------------------------------------------------------------------------- /tests/libpmemfile-pop/utils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef PMEMFILE_POP_UTILS 34 | #define PMEMFILE_POP_UTILS 35 | 36 | #include 37 | 38 | char *merge_paths(const char *path1, const char *path2); 39 | bool is_tmpfile(int flags); 40 | bool ends_with(char *path, char c); 41 | bool starts_with(char *string1, char *string2); 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /tests/posix/basic/basic.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/crash/crash.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | set(ENV{ASAN_OPTIONS} detect_leaks=0) 37 | 38 | function(exec_stage name) 39 | execute(${TEST_EXECUTABLE} ${name}) 40 | endfunction() 41 | 42 | exec_stage(prep) 43 | exec_stage(openclose1) 44 | exec_stage(crash1) 45 | exec_stage(openclose2) 46 | exec_stage(crash2) 47 | exec_stage(openclose3) 48 | 49 | cleanup() 50 | -------------------------------------------------------------------------------- /tests/posix/dirs/dirs.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE} ${ops}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/fcntl/fcntl.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/getdents/getdents.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/mt/mt.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE} ${ops} ${filter}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/offset_mapping/offset_mapping.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/openp/openp.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/permissions/permissions.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/pointer_caching/pointer_caching.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/rw/rw.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | if(LONG_TESTS OR NOT (TRACER STREQUAL "pmemcheck")) 37 | execute(${TEST_EXECUTABLE}) 38 | else() 39 | execute(${TEST_EXECUTABLE} --gtest_filter=-rw.huge_file:rw.failed_write) 40 | endif() 41 | 42 | cleanup() 43 | -------------------------------------------------------------------------------- /tests/posix/stat/stat.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/symlinks/symlinks.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/posix/timestamps/timestamps.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../posix-helpers.cmake) 33 | 34 | setup() 35 | 36 | execute(${TEST_EXECUTABLE}) 37 | 38 | cleanup() 39 | -------------------------------------------------------------------------------- /tests/preload/basic/a.expected_dump: -------------------------------------------------------------------------------- 1 | Hello #0 World! 2 | -------------------------------------------------------------------------------- /tests/preload/basic/root_dir.expected_log: -------------------------------------------------------------------------------- 1 | . 2 | .. 3 | a 4 | b 5 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/ls.log.match: -------------------------------------------------------------------------------- 1 | total $(N) 2 | drwxrwxrwx 2 $(N) . 3 | drwxrwxrwx 2 $(N) .. 4 | -rw-r--r-- 1 391 file_a 5 | -rw-r--r-- 1 4401 file_b 6 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/ls_root_after_ln_expected_log: -------------------------------------------------------------------------------- 1 | dir_inside 2 | file_b 3 | file_b_linked 4 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/ls_root_after_lns_expected_log: -------------------------------------------------------------------------------- 1 | dir_inside 2 | file_b 3 | file_b_linked 4 | file_b_symlinked 5 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/ls_root_after_mv_expected_log: -------------------------------------------------------------------------------- 1 | dir_inside 2 | file_b_linked 3 | file_b_moved 4 | file_b_symlinked 5 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/ls_root_after_rm_expected_log: -------------------------------------------------------------------------------- 1 | dir_inside 2 | file_b 3 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/ls_root_expected_log: -------------------------------------------------------------------------------- 1 | file_a 2 | file_b 3 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/ls_with_dir.log.match: -------------------------------------------------------------------------------- 1 | total $(N) 2 | drwxrwxrwx 3 $(N) . 3 | drwxrwxrwx 3 $(N) .. 4 | drwxr-xr-x 2 $(N) dummy_dir_a 5 | -rw-r--r-- 1 391 file_a 6 | -rw-r--r-- 1 4401 file_b 7 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/ls_without_dir.log.match: -------------------------------------------------------------------------------- 1 | total $(N) 2 | drwxrwxrwx 2 $(N) . 3 | drwxrwxrwx 2 $(N) .. 4 | -rw-r--r-- 1 391 file_a 5 | -rw-r--r-- 1 4401 file_b 6 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/readlink_after_lns_expected_log: -------------------------------------------------------------------------------- 1 | file_b 2 | -------------------------------------------------------------------------------- /tests/preload/basic_commands/repo_dummy_file_a: -------------------------------------------------------------------------------- 1 | We shall go on to the end. We shall fight in France, we shall fight on the seas and oceans, we shall fight with growing confidence and growing strength in the air, we shall defend our island, whatever the cost may be. We shall fight on the beaches, we shall fight on the landing grounds, we shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender 2 | -------------------------------------------------------------------------------- /tests/preload/config/config.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../preload-helpers.cmake) 33 | 34 | setup() 35 | 36 | mkfs(${DIR}/fs 128m) 37 | 38 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${DIR}/mount_point) 39 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${DIR}/mount_point_wrong) 40 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${DIR}/some_dir) 41 | execute_process(COMMAND ln -s ../mount_point ${DIR}/some_dir/some_link) 42 | 43 | set(ENV{LD_PRELOAD} ${PRELOAD_LIB}) 44 | set(ENV{PMEMFILE_POOLS} "${DIR}/mount_point:${DIR}/fs;${DIR}/mount_point_wrong:${DIR}/invalid") 45 | set(ENV{PMEMFILE_PRELOAD_LOG} ${BIN_DIR}/pmemfile_preload.log) 46 | set(ENV{INTERCEPT_LOG} ${BIN_DIR}/intercept.log) 47 | 48 | execute(${MAIN_EXECUTABLE} ${DIR}/${TEST_PATH}) 49 | 50 | cleanup() 51 | -------------------------------------------------------------------------------- /tests/preload/nested_dirs/ls.log.match: -------------------------------------------------------------------------------- 1 | total $(N) 2 | drwxr-xr-x 4 $(N) . 3 | drwxrwxrwx 4 $(N) .. 4 | drwxr-xr-x 3 $(N) a 5 | -rw-r--r-- 1 391 file_a 6 | drwxr-xr-x 2 $(N) test_subdir 7 | -------------------------------------------------------------------------------- /tests/preload/nested_dirs/ls_a.log.match: -------------------------------------------------------------------------------- 1 | total $(N) 2 | drwxr-xr-x 3 $(N) . 3 | drwxr-xr-x 4 $(N) .. 4 | drwxr-xr-x 3 $(N) b 5 | -------------------------------------------------------------------------------- /tests/preload/nested_dirs/ls_f.log.match: -------------------------------------------------------------------------------- 1 | total $(N) 2 | drwxr-xr-x 3 $(N) . 3 | drwxr-xr-x 3 $(N) .. 4 | drwxr-xr-x 68 $(N) g 5 | -------------------------------------------------------------------------------- /tests/preload/nested_dirs/ls_g.log.match: -------------------------------------------------------------------------------- 1 | total $(N) 2 | drwxr-xr-x 68 $(N) . 3 | drwxr-xr-x 3 $(N) .. 4 | drwxr-xr-x 3 $(N) h 5 | drwxr-xr-x 2 $(N) x0 6 | drwxr-xr-x 2 $(N) x1 7 | drwxr-xr-x 2 $(N) x10 8 | drwxr-xr-x 2 $(N) x11 9 | drwxr-xr-x 2 $(N) x12 10 | drwxr-xr-x 2 $(N) x13 11 | drwxr-xr-x 2 $(N) x14 12 | drwxr-xr-x 2 $(N) x15 13 | drwxr-xr-x 2 $(N) x16 14 | drwxr-xr-x 2 $(N) x17 15 | drwxr-xr-x 2 $(N) x18 16 | drwxr-xr-x 2 $(N) x19 17 | drwxr-xr-x 2 $(N) x2 18 | drwxr-xr-x 2 $(N) x20 19 | drwxr-xr-x 2 $(N) x21 20 | drwxr-xr-x 2 $(N) x22 21 | drwxr-xr-x 2 $(N) x23 22 | drwxr-xr-x 2 $(N) x24 23 | drwxr-xr-x 2 $(N) x25 24 | drwxr-xr-x 2 $(N) x26 25 | drwxr-xr-x 2 $(N) x27 26 | drwxr-xr-x 2 $(N) x28 27 | drwxr-xr-x 2 $(N) x29 28 | drwxr-xr-x 2 $(N) x3 29 | drwxr-xr-x 2 $(N) x30 30 | drwxr-xr-x 2 $(N) x31 31 | drwxr-xr-x 2 $(N) x32 32 | drwxr-xr-x 2 $(N) x33 33 | drwxr-xr-x 2 $(N) x34 34 | drwxr-xr-x 2 $(N) x35 35 | drwxr-xr-x 2 $(N) x36 36 | drwxr-xr-x 2 $(N) x37 37 | drwxr-xr-x 2 $(N) x38 38 | drwxr-xr-x 2 $(N) x39 39 | drwxr-xr-x 2 $(N) x4 40 | drwxr-xr-x 2 $(N) x40 41 | drwxr-xr-x 2 $(N) x41 42 | drwxr-xr-x 2 $(N) x42 43 | drwxr-xr-x 2 $(N) x43 44 | drwxr-xr-x 2 $(N) x44 45 | drwxr-xr-x 2 $(N) x45 46 | drwxr-xr-x 2 $(N) x46 47 | drwxr-xr-x 2 $(N) x47 48 | drwxr-xr-x 2 $(N) x48 49 | drwxr-xr-x 2 $(N) x49 50 | drwxr-xr-x 2 $(N) x5 51 | drwxr-xr-x 2 $(N) x50 52 | drwxr-xr-x 2 $(N) x51 53 | drwxr-xr-x 2 $(N) x52 54 | drwxr-xr-x 2 $(N) x53 55 | drwxr-xr-x 2 $(N) x54 56 | drwxr-xr-x 2 $(N) x55 57 | drwxr-xr-x 2 $(N) x56 58 | drwxr-xr-x 2 $(N) x57 59 | drwxr-xr-x 2 $(N) x58 60 | drwxr-xr-x 2 $(N) x59 61 | drwxr-xr-x 2 $(N) x6 62 | drwxr-xr-x 2 $(N) x60 63 | drwxr-xr-x 2 $(N) x61 64 | drwxr-xr-x 2 $(N) x62 65 | drwxr-xr-x 2 $(N) x63 66 | drwxr-xr-x 2 $(N) x64 67 | drwxr-xr-x 2 $(N) x7 68 | drwxr-xr-x 2 $(N) x8 69 | drwxr-xr-x 2 $(N) x9 70 | -------------------------------------------------------------------------------- /tests/preload/nested_dirs/ls_g_no33.log.match: -------------------------------------------------------------------------------- 1 | total $(N) 2 | drwxr-xr-x 67 $(N) . 3 | drwxr-xr-x 3 $(N) .. 4 | drwxr-xr-x 3 $(N) h 5 | drwxr-xr-x 2 $(N) x0 6 | drwxr-xr-x 2 $(N) x1 7 | drwxr-xr-x 2 $(N) x10 8 | drwxr-xr-x 2 $(N) x11 9 | drwxr-xr-x 2 $(N) x12 10 | drwxr-xr-x 2 $(N) x13 11 | drwxr-xr-x 2 $(N) x14 12 | drwxr-xr-x 2 $(N) x15 13 | drwxr-xr-x 2 $(N) x16 14 | drwxr-xr-x 2 $(N) x17 15 | drwxr-xr-x 2 $(N) x18 16 | drwxr-xr-x 2 $(N) x19 17 | drwxr-xr-x 2 $(N) x2 18 | drwxr-xr-x 2 $(N) x20 19 | drwxr-xr-x 2 $(N) x21 20 | drwxr-xr-x 2 $(N) x22 21 | drwxr-xr-x 2 $(N) x23 22 | drwxr-xr-x 2 $(N) x24 23 | drwxr-xr-x 2 $(N) x25 24 | drwxr-xr-x 2 $(N) x26 25 | drwxr-xr-x 2 $(N) x27 26 | drwxr-xr-x 2 $(N) x28 27 | drwxr-xr-x 2 $(N) x29 28 | drwxr-xr-x 2 $(N) x3 29 | drwxr-xr-x 2 $(N) x30 30 | drwxr-xr-x 2 $(N) x31 31 | drwxr-xr-x 2 $(N) x32 32 | drwxr-xr-x 2 $(N) x34 33 | drwxr-xr-x 2 $(N) x35 34 | drwxr-xr-x 2 $(N) x36 35 | drwxr-xr-x 2 $(N) x37 36 | drwxr-xr-x 2 $(N) x38 37 | drwxr-xr-x 2 $(N) x39 38 | drwxr-xr-x 2 $(N) x4 39 | drwxr-xr-x 2 $(N) x40 40 | drwxr-xr-x 2 $(N) x41 41 | drwxr-xr-x 2 $(N) x42 42 | drwxr-xr-x 2 $(N) x43 43 | drwxr-xr-x 2 $(N) x44 44 | drwxr-xr-x 2 $(N) x45 45 | drwxr-xr-x 2 $(N) x46 46 | drwxr-xr-x 2 $(N) x47 47 | drwxr-xr-x 2 $(N) x48 48 | drwxr-xr-x 2 $(N) x49 49 | drwxr-xr-x 2 $(N) x5 50 | drwxr-xr-x 2 $(N) x50 51 | drwxr-xr-x 2 $(N) x51 52 | drwxr-xr-x 2 $(N) x52 53 | drwxr-xr-x 2 $(N) x53 54 | drwxr-xr-x 2 $(N) x54 55 | drwxr-xr-x 2 $(N) x55 56 | drwxr-xr-x 2 $(N) x56 57 | drwxr-xr-x 2 $(N) x57 58 | drwxr-xr-x 2 $(N) x58 59 | drwxr-xr-x 2 $(N) x59 60 | drwxr-xr-x 2 $(N) x6 61 | drwxr-xr-x 2 $(N) x60 62 | drwxr-xr-x 2 $(N) x61 63 | drwxr-xr-x 2 $(N) x62 64 | drwxr-xr-x 2 $(N) x63 65 | drwxr-xr-x 2 $(N) x64 66 | drwxr-xr-x 2 $(N) x7 67 | drwxr-xr-x 2 $(N) x8 68 | drwxr-xr-x 2 $(N) x9 69 | -------------------------------------------------------------------------------- /tests/preload/nested_dirs/ls_g_no33_no32.log.match: -------------------------------------------------------------------------------- 1 | total $(N) 2 | drwxr-xr-x 66 $(N) . 3 | drwxr-xr-x 3 $(N) .. 4 | drwxr-xr-x 3 $(N) h 5 | drwxr-xr-x 2 $(N) x0 6 | drwxr-xr-x 2 $(N) x1 7 | drwxr-xr-x 2 $(N) x10 8 | drwxr-xr-x 2 $(N) x11 9 | drwxr-xr-x 2 $(N) x12 10 | drwxr-xr-x 2 $(N) x13 11 | drwxr-xr-x 2 $(N) x14 12 | drwxr-xr-x 2 $(N) x15 13 | drwxr-xr-x 2 $(N) x16 14 | drwxr-xr-x 2 $(N) x17 15 | drwxr-xr-x 2 $(N) x18 16 | drwxr-xr-x 2 $(N) x19 17 | drwxr-xr-x 2 $(N) x2 18 | drwxr-xr-x 2 $(N) x20 19 | drwxr-xr-x 2 $(N) x21 20 | drwxr-xr-x 2 $(N) x22 21 | drwxr-xr-x 2 $(N) x23 22 | drwxr-xr-x 2 $(N) x24 23 | drwxr-xr-x 2 $(N) x25 24 | drwxr-xr-x 2 $(N) x26 25 | drwxr-xr-x 2 $(N) x27 26 | drwxr-xr-x 2 $(N) x28 27 | drwxr-xr-x 2 $(N) x29 28 | drwxr-xr-x 2 $(N) x3 29 | drwxr-xr-x 2 $(N) x30 30 | drwxr-xr-x 2 $(N) x31 31 | drwxr-xr-x 2 $(N) x34 32 | drwxr-xr-x 2 $(N) x35 33 | drwxr-xr-x 2 $(N) x36 34 | drwxr-xr-x 2 $(N) x37 35 | drwxr-xr-x 2 $(N) x38 36 | drwxr-xr-x 2 $(N) x39 37 | drwxr-xr-x 2 $(N) x4 38 | drwxr-xr-x 2 $(N) x40 39 | drwxr-xr-x 2 $(N) x41 40 | drwxr-xr-x 2 $(N) x42 41 | drwxr-xr-x 2 $(N) x43 42 | drwxr-xr-x 2 $(N) x44 43 | drwxr-xr-x 2 $(N) x45 44 | drwxr-xr-x 2 $(N) x46 45 | drwxr-xr-x 2 $(N) x47 46 | drwxr-xr-x 2 $(N) x48 47 | drwxr-xr-x 2 $(N) x49 48 | drwxr-xr-x 2 $(N) x5 49 | drwxr-xr-x 2 $(N) x50 50 | drwxr-xr-x 2 $(N) x51 51 | drwxr-xr-x 2 $(N) x52 52 | drwxr-xr-x 2 $(N) x53 53 | drwxr-xr-x 2 $(N) x54 54 | drwxr-xr-x 2 $(N) x55 55 | drwxr-xr-x 2 $(N) x56 56 | drwxr-xr-x 2 $(N) x57 57 | drwxr-xr-x 2 $(N) x58 58 | drwxr-xr-x 2 $(N) x59 59 | drwxr-xr-x 2 $(N) x6 60 | drwxr-xr-x 2 $(N) x60 61 | drwxr-xr-x 2 $(N) x61 62 | drwxr-xr-x 2 $(N) x62 63 | drwxr-xr-x 2 $(N) x63 64 | drwxr-xr-x 2 $(N) x64 65 | drwxr-xr-x 2 $(N) x7 66 | drwxr-xr-x 2 $(N) x8 67 | drwxr-xr-x 2 $(N) x9 68 | -------------------------------------------------------------------------------- /tests/preload/nested_dirs/repo_dummy_file_a: -------------------------------------------------------------------------------- 1 | We shall go on to the end. We shall fight in France, we shall fight on the seas and oceans, we shall fight with growing confidence and growing strength in the air, we shall defend our island, whatever the cost may be. We shall fight on the beaches, we shall fight on the landing grounds, we shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender 2 | -------------------------------------------------------------------------------- /tests/preload/pool_locking/pool_locking.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../preload-helpers.cmake) 33 | 34 | setup() 35 | 36 | mkfs(${DIR}/fs 128m) 37 | 38 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${DIR}/mount_point) 39 | 40 | set(ENV{LD_PRELOAD} ${PRELOAD_LIB}) 41 | set(ENV{PMEMFILE_POOLS} ${DIR}/mount_point:${DIR}/fs) 42 | 43 | if (NOT TEST_PROCESS_SWITCHING) 44 | set(ENV{PMEMFILE_PRELOAD_LOG} ${BIN_DIR}/pmemfile_preload.log) 45 | set(ENV{INTERCEPT_LOG} ${BIN_DIR}/intercept.log) 46 | endif() 47 | 48 | execute(${MAIN_EXECUTABLE} ${DIR}/mount_point/file) 49 | 50 | cleanup() 51 | -------------------------------------------------------------------------------- /tests/preload/preload-helpers.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../../helpers.cmake) 33 | 34 | function(setup) 35 | common_setup() 36 | 37 | if (TEST_PROCESS_SWITCHING) 38 | set(ENV{PMEMFILE_PRELOAD_PROCESS_SWITCHING} 1) 39 | endif() 40 | 41 | if(TESTS_USE_FORCED_PMEM) 42 | set(ENV{PMEM_IS_PMEM_FORCE} 1) 43 | endif() 44 | endfunction() 45 | 46 | function(cleanup) 47 | unset(ENV{LD_PRELOAD}) 48 | 49 | if(TESTS_USE_FORCED_PMEM) 50 | unset(ENV{PMEM_IS_PMEM_FORCE}) 51 | endif() 52 | 53 | common_cleanup() 54 | endfunction() 55 | -------------------------------------------------------------------------------- /tests/preload/setumask.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #include "compiler_utils.h" 34 | #include 35 | 36 | /* set umask value to some known value independent of the environment */ 37 | pf_constructor void 38 | setumask_init(void) 39 | { 40 | umask(022); 41 | } 42 | -------------------------------------------------------------------------------- /tests/preload/sqlite/ins0.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE Persons(PersonID int, LastName varchar(255), FirstName varchar(255), Address varchar(255), City varchar(255)); 2 | CREATE UNIQUE INDEX Persons_PK ON Persons (PersonId); 3 | INSERT INTO Persons (PersonID, LastName, FirstName, Address, City) Values(1,'LN1','FN1','Address1','City1'); 4 | INSERT INTO Persons (PersonID, LastName, FirstName, Address, City) Values(2,'LN2','FN2','Address2','City2'); 5 | INSERT INTO Persons (PersonID, LastName, FirstName, Address, City) Values(3,'LN3','FN3','Address3','City3'); 6 | INSERT INTO Persons (PersonID, LastName, FirstName, Address, City) Values(4,'LN4','FN4','Address4','City4'); 7 | -------------------------------------------------------------------------------- /tests/preload/sqlite/out0.log.match: -------------------------------------------------------------------------------- 1 | 1st select 2 | 1|LN1|FN1|Address1|City1 3 | 2|LN2|FN2|Address2|City2 4 | 3|LN3|FN3|Address3|City3 5 | 4|LN4|FN4|Address4|City4 6 | 2nd select 7 | 4|LN4|FN4|Address4|City4 8 | -------------------------------------------------------------------------------- /tests/preload/sqlite/sel0.sql: -------------------------------------------------------------------------------- 1 | select '1st select'; 2 | select * from persons; 3 | select '2nd select'; 4 | select * from persons where city = 'City4'; 5 | -------------------------------------------------------------------------------- /tests/preload/unix/unix.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../preload-helpers.cmake) 33 | 34 | setup() 35 | 36 | mkfs(${DIR}/fs 128m) 37 | 38 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${DIR}/mount_point) 39 | 40 | set(ENV{LD_PRELOAD} ${PRELOAD_LIB}) 41 | set(ENV{PMEMFILE_POOLS} ${DIR}/mount_point:${DIR}/fs) 42 | set(ENV{PMEMFILE_PRELOAD_LOG} ${BIN_DIR}/pmemfile_preload.log) 43 | set(ENV{INTERCEPT_LOG} ${BIN_DIR}/intercept.log) 44 | 45 | execute(${MAIN_EXECUTABLE} ${DIR}) 46 | 47 | unset(ENV{LD_PRELOAD}) 48 | 49 | cleanup() 50 | -------------------------------------------------------------------------------- /tests/preload/xattr/xattr.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright 2017, Intel Corporation 3 | # 4 | # Redistribution and use in source and binary forms, with or without 5 | # modification, are permitted provided that the following conditions 6 | # are met: 7 | # 8 | # * Redistributions of source code must retain the above copyright 9 | # notice, this list of conditions and the following disclaimer. 10 | # 11 | # * Redistributions in binary form must reproduce the above copyright 12 | # notice, this list of conditions and the following disclaimer in 13 | # the documentation and/or other materials provided with the 14 | # distribution. 15 | # 16 | # * Neither the name of the copyright holder nor the names of its 17 | # contributors may be used to endorse or promote products derived 18 | # from this software without specific prior written permission. 19 | # 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | 32 | include(${SRC_DIR}/../preload-helpers.cmake) 33 | 34 | setup() 35 | 36 | mkfs(${DIR}/fs 128m) 37 | 38 | execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${DIR}/mount_point) 39 | 40 | set(ENV{LD_PRELOAD} ${PRELOAD_LIB}) 41 | set(ENV{PMEMFILE_POOLS} ${DIR}/mount_point:${DIR}/fs) 42 | set(ENV{PMEMFILE_PRELOAD_LOG} ${BIN_DIR}/pmemfile_preload.log) 43 | set(ENV{INTERCEPT_LOG} ${BIN_DIR}/intercept.log) 44 | 45 | execute(${MAIN_EXECUTABLE} ${DIR}) 46 | 47 | unset(ENV{LD_PRELOAD}) 48 | 49 | cleanup() 50 | -------------------------------------------------------------------------------- /tests/test_backtrace.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef TEST_BACKTRACE_H 34 | #define TEST_BACKTRACE_H 35 | 36 | #ifdef __cplusplus 37 | extern "C" { 38 | #endif 39 | 40 | void test_dump_backtrace(void); 41 | void test_sighandler(int sig); 42 | void test_register_sighandlers(void); 43 | 44 | #ifdef __cplusplus 45 | } 46 | #endif 47 | #endif 48 | -------------------------------------------------------------------------------- /utils/build-rpm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -ex 2 | # 3 | # Copyright 2017, Intel Corporation 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | 34 | export LC_ALL=C 35 | export VER=0.1 36 | 37 | rm -rf ~/rpmbuild/BUILDROOT/pmemfile-$VER* 38 | mkdir -p ~/rpmbuild/SOURCES 39 | git archive --prefix=pmemfile-$VER/ HEAD > pmemfile-$VER.tar 40 | if [ -n "$1" ]; then 41 | file=`basename "$1"` 42 | tar -r --transform "s/.*/pmemfile-$VER\/$file/" -f pmemfile-$VER.tar $1 43 | fi 44 | gzip pmemfile-$VER.tar 45 | mv pmemfile-$VER.tar.gz ~/rpmbuild/SOURCES/ 46 | rpmbuild -ba pmemfile-debug.spec 47 | rpmbuild -ba pmemfile.spec 48 | -------------------------------------------------------------------------------- /utils/check_license/file-exceptions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # 3 | # Copyright 2016-2017, Intel Corporation 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | # 33 | 34 | grep -v -E -e 'src/libpmemfile-posix/valgrind/' 35 | -------------------------------------------------------------------------------- /utils/docker/0001-travis-fix-travisci_build_coverity_scan.sh.patch: -------------------------------------------------------------------------------- 1 | From b5179dc4822eaab192361da05aa95d98f523960f Mon Sep 17 00:00:00 2001 2 | From: Lukasz Dorau 3 | Date: Mon, 7 May 2018 12:05:40 +0200 4 | Subject: [PATCH] travis: fix travisci_build_coverity_scan.sh 5 | 6 | --- 7 | travisci_build_coverity_scan.sh | 4 ++-- 8 | 1 file changed, 2 insertions(+), 2 deletions(-) 9 | 10 | diff --git a/travisci_build_coverity_scan.sh b/travisci_build_coverity_scan.sh 11 | index ad9d4afcf..562b08bcc 100644 12 | --- a/travisci_build_coverity_scan.sh 13 | +++ b/travisci_build_coverity_scan.sh 14 | @@ -92,8 +92,8 @@ response=$(curl \ 15 | --form description="Travis CI build" \ 16 | $UPLOAD_URL) 17 | status_code=$(echo "$response" | sed -n '$p') 18 | -if [ "$status_code" != "201" ]; then 19 | +if [ "$status_code" != "200" ]; then 20 | TEXT=$(echo "$response" | sed '$d') 21 | - echo -e "\033[33;1mCoverity Scan upload failed: $TEXT.\033[0m" 22 | + echo -e "\033[33;1mCoverity Scan upload failed: $response.\033[0m" 23 | exit 1 24 | fi 25 | -- 26 | 2.13.6 27 | 28 | -------------------------------------------------------------------------------- /utils/docker/external_tests/ltp/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/utils/docker/external_tests/ltp/__init__.py -------------------------------------------------------------------------------- /utils/docker/external_tests/sqlite/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/utils/docker/external_tests/sqlite/__init__.py -------------------------------------------------------------------------------- /utils/docker/external_tests/sqlite/failing_all_tests: -------------------------------------------------------------------------------- 1 | attach4.test 2 | corrupt.test 3 | crash2.test 4 | crash4.test 5 | crash6.test 6 | crash7.test 7 | crash8.test 8 | crash.test 9 | dbstatus2.test 10 | delete_db.test 11 | eqp.test 12 | e_vacuum.test 13 | e_walauto.test 14 | e_walckpt.test 15 | e_walhook.test 16 | e_wal.test 17 | exists.test 18 | fallocate.test 19 | incrvacuum2.test 20 | incrvacuum3.test 21 | indexfault.test 22 | ioerr.test 23 | lock2.test 24 | lock4.test 25 | malloc.test 26 | mmap1.test 27 | mmap2.test 28 | mmap3.test 29 | mmap4.test 30 | multiplex2.test 31 | multiplex.test 32 | nockpt.test 33 | nolock.test 34 | pager1.test 35 | pagerfault2.test 36 | pagerfault.test 37 | pragma3.test 38 | rowallock.test 39 | savepoint4.test 40 | savepoint.test 41 | schema3.test 42 | shared2.test 43 | shared9.test 44 | superlock.test 45 | symlink.test 46 | sync2.test 47 | syscall.test 48 | sysfault.test 49 | thread1.test 50 | thread2.test 51 | tkt-2d1a5c67d.test 52 | tkt-313723c356.test 53 | tkt4018.test 54 | tkt-5d863f876e.test 55 | tkt-fc62af4523.test 56 | unixexcl.test 57 | wal2.test 58 | wal3.test 59 | wal4.test 60 | wal5.test 61 | wal64k.test 62 | wal6.test 63 | wal7.test 64 | wal8.test 65 | wal9.test 66 | walbak.test 67 | walbig.test 68 | walcksum.test 69 | walcrash2.test 70 | walcrash3.test 71 | walcrash4.test 72 | walcrash.test 73 | walfault.test 74 | walhook.test 75 | walmode.test 76 | waloverwrite.test 77 | walpersist.test 78 | walprotocol.test 79 | walro.test 80 | walshared.test 81 | walslow.test 82 | wal.test 83 | walthread.test 84 | -------------------------------------------------------------------------------- /utils/docker/external_tests/sqlite/failing_short_tests: -------------------------------------------------------------------------------- 1 | attach4.test # mmap 2 | crash8.test # ??? 3 | dbstatus2.test # mmap 4 | delete_db.test # mmap 5 | eqp.test # multiprocess? 6 | e_vacuum.test # mmap 7 | e_walauto.test # mmap 8 | e_walckpt.test # mmap 9 | e_walhook.test # mmap 10 | e_wal.test # mmap 11 | exists.test # ?, broken pipe 12 | fallocate.test # mmap 13 | incrvacuum2.test # mmap 14 | incrvacuum3.test # mmap 15 | lock2.test # ?, broken pipe 16 | mmap1.test # mmap? broken pipe 17 | mmap2.test # mmap 18 | mmap3.test # mmap 19 | multiplex2.test # ?, broken pipe 20 | multiplex.test # ?, works for me 21 | nockpt.test # mmap 22 | nolock.test # mmap 23 | pager1.test # ?, broken pipe 24 | pragma3.test # mmap 25 | rowallock.test # ?, broken pipe 26 | savepoint.test # ?, broken pipe 27 | schema3.test # ?, broken pipe 28 | shared2.test # ?, broken pipe 29 | shared9.test # ?, broken pipe 30 | superlock.test # mmap 31 | symlink.test # mmap 32 | sync2.test # mmap 33 | syscall.test # mmap 34 | tkt-2d1a5c67d.test # mmap 35 | tkt-313723c356.test # mmap 36 | tkt4018.test # multiprocess? 37 | tkt-5d863f876e.test # ?, broken pipe 38 | tkt-fc62af4523.test # ?, broken pipe 39 | unixexcl.test # ?, broken pipe 40 | wal2.test # mmap 41 | wal3.test # mmap 42 | wal4.test # mmap 43 | wal5.test # ?, broken pipe 44 | wal64k.test # mmap 45 | wal6.test # mmap 46 | wal7.test # mmap 47 | wal8.test # mmap 48 | wal9.test # mmap 49 | walbak.test # mmap 50 | walbig.test # mmap 51 | walcksum.test # mmap 52 | walcrash4.test # mmap 53 | walhook.test # mmap 54 | walmode.test # mmap 55 | waloverwrite.test # mmap 56 | walpersist.test # mmap 57 | walro.test # ?, broken pipe 58 | walshared.test # mmap 59 | wal.test # mmap 60 | -------------------------------------------------------------------------------- /utils/docker/external_tests/xfstests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pmem/pmemfile/bdb204b1903233115bec44d6011778e0fd525508/utils/docker/external_tests/xfstests/__init__.py -------------------------------------------------------------------------------- /utils/docker/external_tests/xfstests/failing_short_tests: -------------------------------------------------------------------------------- 1 | 002 2 | 035 3 | 192 4 | 236 5 | 245 6 | 004 7 | 013 8 | 198 9 | 257 10 | 308 11 | 428 12 | 443 13 | 006 14 | 258 15 | 309 16 | 360 17 | 394 18 | 007 19 | 020 20 | 028 21 | 088 22 | 248 23 | 313 24 | 420 25 | 437 26 | -------------------------------------------------------------------------------- /utils/docker/external_tests/xfstests/short_tests: -------------------------------------------------------------------------------- 1 | 002 2 | 010 3 | 023 4 | 035 5 | 075 6 | 091 7 | 127 8 | 192 9 | 208 10 | 212 11 | 236 12 | 245 13 | 249 14 | 285 15 | 323 16 | 423 17 | 438 18 | 448 19 | 004 20 | 013 21 | 024 22 | 036 23 | 080 24 | 112 25 | 131 26 | 198 27 | 209 28 | 214 29 | 237 30 | 246 31 | 257 32 | 308 33 | 350 34 | #391 takes over 2 minutes 35 | 428 36 | 443 37 | 006 38 | 014 39 | 025 40 | 087 41 | 113 42 | 133 43 | 205 44 | 210 45 | 215 46 | 239 47 | 247 48 | 258 49 | 309 50 | 360 51 | 394 52 | 436 53 | 444 54 | 007 55 | 020 56 | 028 57 | 074 58 | 088 59 | 126 60 | 184 61 | 207 62 | 211 63 | 221 64 | 241 65 | 248 66 | 263 67 | 313 68 | 375 69 | 420 70 | 437 71 | 445 72 | -------------------------------------------------------------------------------- /utils/docker/images/0001-enable-pmemfile.patch: -------------------------------------------------------------------------------- 1 | From b655a8f024ababe4d7e2fe2ffe37b65d3bac7222 Mon Sep 17 00:00:00 2001 2 | From: mramotowski 3 | Date: Wed, 20 Sep 2017 08:40:01 +0200 4 | Subject: [PATCH] common: added pmemfile handling 5 | 6 | --- 7 | common/config | 2 ++ 8 | common/rc | 2 +- 9 | 2 files changed, 3 insertions(+), 1 deletion(-) 10 | 11 | diff --git a/common/config b/common/config 12 | index 71798f0a..b7868fac 100644 13 | --- a/common/config 14 | +++ b/common/config 15 | @@ -465,6 +465,8 @@ _check_device() 16 | _fatal "common/config: $name ($dev) is not a character device" 17 | fi 18 | ;; 19 | + pmemfile) 20 | + ;; 21 | *) 22 | _fatal "common/config: $name ($dev) is not a block device or a network filesystem" 23 | esac 24 | diff --git a/common/rc b/common/rc 25 | index cd53a373..ec47680b 100644 26 | --- a/common/rc 27 | +++ b/common/rc 28 | @@ -189,7 +189,7 @@ fi 29 | 30 | _mount() 31 | { 32 | - $MOUNT_PROG `_mount_ops_filter $*` 33 | + pmemfile-mount $TEST_DEVX $TEST_DIR 34 | } 35 | 36 | # Call _mount to do mount operation but also save mountpoint to 37 | -- 38 | 2.11.0 39 | 40 | -------------------------------------------------------------------------------- /utils/docker/images/install-pjdfstest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | # 3 | # Copyright 2017, Intel Corporation 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | 33 | # 34 | # install-pjdfstest.sh - installs (surprise!) pjdfstest 35 | # 36 | 37 | export commitid=d379e7fd28e9075c2d816287bf4b321b8e13a16a 38 | 39 | cd $HOME 40 | curl -L -o pjdfstest.zip https://github.com/pjd/pjdfstest/archive/${commitid}.zip 41 | unzip pjdfstest.zip 42 | mv pjdfstest-${commitid} pjdfstest 43 | cd pjdfstest 44 | patch -p1 < /0001-disable-special-files-tests.patch 45 | autoreconf -ifs 46 | ./configure 47 | make pjdfstest 48 | -------------------------------------------------------------------------------- /utils/docker/images/install-sqlite.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | # 3 | # Copyright 2017, Intel Corporation 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | 33 | # 34 | # install-sqlite.sh - installs sqlite with test binaries 35 | # 36 | 37 | SQLITE_LINK=http://sqlite.org/2017/sqlite-src-3190300.zip 38 | SQLITE_DIR=sqlite-src-3190300 39 | cd $HOME 40 | wget $SQLITE_LINK 41 | unzip $SQLITE_DIR.zip 42 | mv $SQLITE_DIR sqlite 43 | cd sqlite 44 | ./configure 45 | make -j2 46 | make smoketest -j2 47 | cd $HOME 48 | rm -rf $SQLITE_DIR.zip 49 | 50 | -------------------------------------------------------------------------------- /utils/docker/images/install-syscall_intercept.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | # 3 | # Copyright 2017, Intel Corporation 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | 33 | # 34 | # install-syscall_intercept.sh - installs libsyscall_intercept 35 | # 36 | 37 | git clone https://github.com/pmem/syscall_intercept syscall_intercept 38 | cd syscall_intercept 39 | git checkout 7c4d1345b641221e860f707b946f1365304f629a 40 | ./utils/build-$1.sh 41 | if [ "$1" = "deb" ]; then 42 | sudo dpkg -i build-deb/libsyscall-*.deb 43 | elif [ "$1" = "rpm" ]; then 44 | sudo rpm -i ~/rpmbuild/RPMS/*/*syscall_intercept*.rpm 45 | fi 46 | 47 | cd .. 48 | rm -rf syscall_intercept 49 | -------------------------------------------------------------------------------- /utils/docker/images/install-xfs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -xe 2 | # 3 | # Copyright 2017, Intel Corporation 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | 33 | USER_DIR=/home/user 34 | 35 | cd $USER_DIR 36 | git clone https://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git 37 | cd xfsprogs-dev 38 | git checkout 0602fbe880e59c3aff13a081632b79532a40a328 39 | make -j4 40 | make install-dev -j4 41 | 42 | cd $USER_DIR 43 | git clone https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git 44 | cd xfstests-dev 45 | git checkout 11cf6e7a4a232308114d471a2b64ac4e35d76638 46 | make -j4 47 | patch -p1 < /0001-enable-pmemfile.patch 48 | 49 | chown user $USER_DIR/xfstests-dev -R 50 | -------------------------------------------------------------------------------- /utils/docker/pjdfstest/pmemfile-summary.log.match: -------------------------------------------------------------------------------- 1 | Test Summary Report 2 | ------------------- 3 | $(S)/pjdfstest/tests/chown/00.t (Wstat: 0 Tests: 467 Failed: 8) 4 | Failed tests: 230, 234, 245-246, 251-252, 266, 270 5 | TODO passed: 385, 389, 395, 400, 404, 410, 415 6 | $(S)/pjdfstest/tests/open/06.t (Wstat: 0 Tests: 144 Failed: 47) 7 | Failed tests: 65-111 8 | $(S)/pjdfstest/tests/open/24.t (Wstat: 0 Tests: 5 Failed: 5) 9 | Failed tests: 1-5 10 | $(S)/pjdfstest/tests/rename/09.t (Wstat: 0 Tests: 441 Failed: 72) 11 | Failed tests: 140-142, 144-145, 150-151, 154, 158-160 12 | 162-163, 168-169, 172, 306-308, 310-311 13 | 316-317, 320, 324-326, 328-329, 334-335 14 | 338, 354-357, 359-364, 367, 369, 374-377 15 | 379-384, 387, 389, 418-425, 430-437 16 | $(S)/pjdfstest/tests/rename/10.t (Wstat: 0 Tests: 323 Failed: 32) 17 | Failed tests: 111-113, 117-118, 121, 127-129, 133-134 18 | 137, 243-245, 249-250, 253, 259-261, 265-266 19 | 269, 308-311, 316-319 20 | $(S)/pjdfstest/tests/rmdir/01.t (Wstat: 0 Tests: 14 Failed: 3) 21 | Failed tests: 12-14 22 | $(S)/pjdfstest/tests/rmdir/11.t (Wstat: 0 Tests: 47 Failed: 6) 23 | Failed tests: 36-38, 43-45 24 | $(S)/pjdfstest/tests/unlink/00.t (Wstat: 0 Tests: 112 Failed: 66) 25 | Failed tests: 10-12, 14-16, 18-20, 22-24, 31-50, 55-70 26 | 75, 78-81, 84-87, 90-93, 96-99, 105 27 | $(S)/pjdfstest/tests/unlink/11.t (Wstat: 0 Tests: 94 Failed: 12) 28 | Failed tests: 39-41, 46-48, 83-85, 90-92 29 | $(S)/pjdfstest/tests/utimensat/06.t (Wstat: 0 Tests: 13 Failed: 1) 30 | Failed test: 4 31 | $(S)/pjdfstest/tests/utimensat/07.t (Wstat: 0 Tests: 17 Failed: 6) 32 | Failed tests: 5-7, 9-11 33 | Files=232, Tests=3074, $(*) 34 | Result: FAIL 35 | -------------------------------------------------------------------------------- /utils/docker/run-build-package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -ex 2 | # 3 | # Copyright 2016-2017, Intel Corporation 4 | # 5 | # Redistribution and use in source and binary forms, with or without 6 | # modification, are permitted provided that the following conditions 7 | # are met: 8 | # 9 | # * Redistributions of source code must retain the above copyright 10 | # notice, this list of conditions and the following disclaimer. 11 | # 12 | # * Redistributions in binary form must reproduce the above copyright 13 | # notice, this list of conditions and the following disclaimer in 14 | # the documentation and/or other materials provided with the 15 | # distribution. 16 | # 17 | # * Neither the name of the copyright holder nor the names of its 18 | # contributors may be used to endorse or promote products derived 19 | # from this software without specific prior written permission. 20 | # 21 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | 33 | # 34 | # run-build-package.sh - is called inside a Docker container; 35 | # starts a build of PMEMFILE project. 36 | # 37 | 38 | # Build all and run tests 39 | cd $WORKDIR 40 | ./utils/build-${PACKAGE_MANAGER}.sh /googletest-1.8.0.zip 41 | -------------------------------------------------------------------------------- /utils/fio/append512.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=512 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [write] 14 | rw=write 15 | file_append=1 16 | -------------------------------------------------------------------------------- /utils/fio/append64.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [write] 14 | rw=write 15 | file_append=1 16 | -------------------------------------------------------------------------------- /utils/fio/append64k.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64k 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [write] 14 | rw=write 15 | file_append=1 16 | -------------------------------------------------------------------------------- /utils/fio/randread512.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=512 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [rand_read] 14 | rw=randread 15 | 16 | -------------------------------------------------------------------------------- /utils/fio/randread64.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [rand_read] 14 | rw=randread 15 | 16 | -------------------------------------------------------------------------------- /utils/fio/randread64k.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64k 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [rand_read] 14 | rw=randread 15 | 16 | -------------------------------------------------------------------------------- /utils/fio/randrw512.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=512 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [rand_read_write] 14 | rw=randrw 15 | rwmixread=66 16 | -------------------------------------------------------------------------------- /utils/fio/randrw64.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [rand_read_write] 14 | rw=randrw 15 | rwmixread=66 16 | -------------------------------------------------------------------------------- /utils/fio/randrw64k.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64k 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [rand_read_write] 14 | rw=randrw 15 | rwmixread=66 16 | -------------------------------------------------------------------------------- /utils/fio/randwrite512.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=512 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [rand_write] 14 | rw=randwrite 15 | 16 | -------------------------------------------------------------------------------- /utils/fio/randwrite64.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [rand_write] 14 | rw=randwrite 15 | 16 | -------------------------------------------------------------------------------- /utils/fio/randwrite64k.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64k 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [rand_write] 14 | rw=randwrite 15 | 16 | -------------------------------------------------------------------------------- /utils/fio/read512.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=512 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [read] 14 | rw=read 15 | 16 | -------------------------------------------------------------------------------- /utils/fio/read64.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [read] 14 | rw=read 15 | 16 | -------------------------------------------------------------------------------- /utils/fio/read64k.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64k 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [read] 14 | rw=read 15 | 16 | -------------------------------------------------------------------------------- /utils/fio/rw512.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=512 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [read_write] 14 | rw=readwrite 15 | rwmixread=66 16 | -------------------------------------------------------------------------------- /utils/fio/rw64.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [read_write] 14 | rw=readwrite 15 | rwmixread=66 16 | -------------------------------------------------------------------------------- /utils/fio/rw64k.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64k 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [read_write] 14 | rw=readwrite 15 | rwmixread=66 16 | -------------------------------------------------------------------------------- /utils/fio/write512.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=512 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [write] 14 | rw=write 15 | -------------------------------------------------------------------------------- /utils/fio/write64.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [write] 14 | rw=write 15 | -------------------------------------------------------------------------------- /utils/fio/write64k.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | ioengine=sync 3 | size=7G 4 | thread=1 5 | runtime=30 6 | time_based 7 | bs=64k 8 | direct=0 9 | sync=1 10 | 11 | filename=/tmp/mountpoint/test 12 | 13 | [write] 14 | rw=write 15 | -------------------------------------------------------------------------------- /utils/transform/generator.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017, Intel Corporation 3 | * 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions 6 | * are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 11 | * * Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in 13 | * the documentation and/or other materials provided with the 14 | * distribution. 15 | * 16 | * * Neither the name of the copyright holder nor the names of its 17 | * contributors may be used to endorse or promote products derived 18 | * from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef PMEMFILE_UTILS_GENERATOR_H 34 | #define PMEMFILE_UTILS_GENERATOR_H 35 | 36 | #include "function_decl_finder.h" 37 | 38 | #include 39 | 40 | struct generator_parameters { 41 | const char **copyrights; 42 | const char *include_guard_macro; 43 | const char **includes; 44 | const char *input_path; 45 | const char *output_path; 46 | int (*callback)(struct func_desc *, FILE *); 47 | int clang_argc; 48 | char **clang_argv; 49 | }; 50 | 51 | int generate_source(struct generator_parameters); 52 | 53 | #endif 54 | --------------------------------------------------------------------------------