From 47661e575aa98b32df123d0a4ae49668ccdc06ea Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Tue, 22 Aug 2023 23:17:43 +0900 Subject: [PATCH] Run passing tests from pjdfstest This downloads a tarball by hash instead of using a submodule. References #1589. --- .github/workflows/linux-ci-helper.sh | 10 +++---- .gitignore | 3 +++ test/integration-test-common.sh | 14 ++++++++++ test/integration-test-main.sh | 39 ++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-ci-helper.sh b/.github/workflows/linux-ci-helper.sh index 6e9bd86..13f680d 100755 --- a/.github/workflows/linux-ci-helper.sh +++ b/.github/workflows/linux-ci-helper.sh @@ -146,7 +146,7 @@ elif [ "${CONTAINER_FULLNAME}" = "rockylinux:9" ]; then # PACKAGE_INSTALL_ADDITIONAL_OPTIONS="--allowerasing" - INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-17-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel attr diffutils curl python3 procps unzip xz https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm" + INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-17-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel perl-Test-Harness attr diffutils curl python3 procps unzip xz https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm" INSTALL_CHECKER_PKGS="cppcheck" INSTALL_CHECKER_PKG_OPTIONS="--enablerepo=epel" @@ -160,7 +160,7 @@ elif [ "${CONTAINER_FULLNAME}" = "rockylinux:8" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-17-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel attr diffutils curl python3 unzip" + INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-17-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel perl-Test-Harness attr diffutils curl python3 unzip" INSTALL_CHECKER_PKGS="cppcheck" INSTALL_CHECKER_PKG_OPTIONS="--enablerepo=powertools" @@ -188,7 +188,7 @@ elif [ "${CONTAINER_FULLNAME}" = "fedora:38" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel curl attr diffutils procps python3-pip unzip" + INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel perl-Test-Harness curl attr diffutils procps python3-pip unzip" INSTALL_CHECKER_PKGS="cppcheck ShellCheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -197,7 +197,7 @@ elif [ "${CONTAINER_FULLNAME}" = "fedora:37" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel curl attr diffutils procps python3-pip unzip" + INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel perl-Test-Harness curl attr diffutils procps python3-pip unzip" INSTALL_CHECKER_PKGS="cppcheck ShellCheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -215,7 +215,7 @@ elif [ "${CONTAINER_FULLNAME}" = "alpine:3.17" ]; then PACKAGE_UPDATE_OPTIONS="update --no-progress" PACKAGE_INSTALL_OPTIONS="add --no-progress --no-cache" - INSTALL_PACKAGES="bash clang-extra-tools curl g++ make automake autoconf libtool git curl-dev fuse-dev jq libxml2-dev openssl coreutils procps attr sed mailcap openjdk17 aws-cli" + INSTALL_PACKAGES="bash clang-extra-tools curl g++ make automake autoconf libtool git curl-dev fuse-dev jq libxml2-dev openssl coreutils procps attr sed mailcap openjdk17 perl-test-harness-utils aws-cli" INSTALL_CHECKER_PKGS="cppcheck shellcheck" INSTALL_CHECKER_PKG_OPTIONS="" diff --git a/.gitignore b/.gitignore index 2baaf73..5142c42 100644 --- a/.gitignore +++ b/.gitignore @@ -82,8 +82,11 @@ src/s3fs src/test_curl_util src/test_page_list src/test_string_util + test/chaos-http-proxy-* test/junk_data +test/pjdfstest +test/pjd-pjdfstest-* test/s3proxy-* test/write_multiblock test/mknod_test diff --git a/test/integration-test-common.sh b/test/integration-test-common.sh index 6ab53f3..0355e74 100644 --- a/test/integration-test-common.sh +++ b/test/integration-test-common.sh @@ -94,6 +94,8 @@ S3PROXY_BINARY="${S3PROXY_BINARY-"s3proxy-${S3PROXY_VERSION}"}" CHAOS_HTTP_PROXY_VERSION="1.1.0" CHAOS_HTTP_PROXY_BINARY="chaos-http-proxy-${CHAOS_HTTP_PROXY_VERSION}" +PJDFSTEST_HASH="c711b5f6b666579846afba399a998f74f60c488b" + if [ ! -f "$S3FS_CREDENTIALS_FILE" ] then echo "Missing credentials file: ${S3FS_CREDENTIALS_FILE}" @@ -194,6 +196,18 @@ function start_s3proxy { # wait for Chaos HTTP Proxy to start wait_for_port 1080 fi + + if [ ! -d "pjd-pjdfstest-${PJDFSTEST_HASH:0:7}" ]; then + curl "https://api.github.com/repos/pjd/pjdfstest/tarball/${PJDFSTEST_HASH}" \ + --fail --location --silent --output /tmp/pjdfstest.tar.gz + tar zxf /tmp/pjdfstest.tar.gz + rm -f /tmp/pjdfstest.tar.gz + + rm -f pjdfstest + ln -s "pjd-pjdfstest-${PJDFSTEST_HASH:0:7}" pjdfstest + + (cd pjdfstest && autoreconf -ifs && ./configure && make) + fi } function stop_s3proxy { diff --git a/test/integration-test-main.sh b/test/integration-test-main.sh index 16a7423..d96c594 100755 --- a/test/integration-test-main.sh +++ b/test/integration-test-main.sh @@ -2573,6 +2573,43 @@ function test_statvfs() { fi } +function test_pjdfstest() { + # TODO: explain exclusions + # fails with -o use_cache: ../../pjdfstest/tests/rmdir/01.t + prove -rv \ + ../../pjdfstest/tests/chflags/*.t \ + ../../pjdfstest/tests/chmod/0[4689].t \ + ../../pjdfstest/tests/chmod/10.t \ + ../../pjdfstest/tests/chown/0[4689].t \ + ../../pjdfstest/tests/chown/10.t \ + ../../pjdfstest/tests/ftruncate/0[147-9].t \ + ../../pjdfstest/tests/ftruncate/1[0134].t \ + ../../pjdfstest/tests/granular/*.t \ + ../../pjdfstest/tests/link/*.t \ + ../../pjdfstest/tests/mkdir/0[347-9].t \ + ../../pjdfstest/tests/mkdir/1[12]*.t \ + ../../pjdfstest/tests/mkfifo/0[3478].t \ + ../../pjdfstest/tests/mkfifo/1*.t \ + ../../pjdfstest/tests/mknod/0[479].t \ + ../../pjdfstest/tests/mknod/10.t \ + ../../pjdfstest/tests/open/0[49].t \ + ../../pjdfstest/tests/open/1*.t \ + ../../pjdfstest/tests/open/2[0-134].t \ + ../../pjdfstest/tests/posix_fallocate/*.t \ + ../../pjdfstest/tests/rename/0[2-36-8].t \ + ../../pjdfstest/tests/rename/1[15-9].t \ + ../../pjdfstest/tests/rename/22.t \ + ../../pjdfstest/tests/rmdir/0[3-59].t \ + ../../pjdfstest/tests/rmdir/1[02-5].t \ + ../../pjdfstest/tests/symlink/0[13479].t \ + ../../pjdfstest/tests/symlink/1*.t \ + ../../pjdfstest/tests/truncate/0[147-9].t \ + ../../pjdfstest/tests/truncate/1[0134].t \ + ../../pjdfstest/tests/unlink/0[47-8].t \ + ../../pjdfstest/tests/unlink/1[02-4].t \ + ../../pjdfstest/tests/utimensat/0[1-58-9].t +} + function add_all_tests { if s3fs_args | grep -q use_cache; then add_tests test_cache_file_stat @@ -2677,6 +2714,8 @@ function add_all_tests { # add_tests test_chown_mountpoint add_tests test_time_mountpoint add_tests test_statvfs + + add_tests test_pjdfstest } init_suite