ostree/tests
Jason Wessel bdbce9d042 fsck: Add test for --delete corruption, fix repair, and partial commit checks
The ostree fsck test is aimed to check that it will still fail an fsck
if the repository has been repaired by fsck.  It also checks that a
pull operation corrects the error and ostree fsck will exit with zero.

The test was modeled after the following script:

rm -rf ./f1
mkdir -p ./f1
./ostree --repo=./f1 init --mode=archive-z2
mkdir -p ./trial
echo test > ./trial/test
./ostree --repo=./f1 commit --tree=dir=./trial --skip-if-unchanged --branch=exp1 --subject="test Commit"

rm -rf ./f2
mkdir -p ./f2
./ostree --repo=./f2 init
./ostree --repo=./f2 pull-local  ./f1

echo whoops > `find ./f2 |grep objects |grep \\.file `
./ostree fsck --repo=./f2 ; echo Exit: $?
./ostree fsck --delete --repo=./f2 ; echo Exit: $?
./ostree fsck --repo=./f2 ; echo Exit: $?
./ostree --repo=./f2 pull-local  ./f1
./ostree fsck --repo=./f2 ; echo Exit: $?

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

fsck: Update test so that it will pass on fs without xattrs

The fsck test does not require xattrs to prove that it works.  It is
simple enough to change it to use an archvie instead of a bare type
repository.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

Closes: #1910
Approved by: cgwalters
2019-09-09 13:40:36 +00:00
..
coccinelle Add Coccinelle usage: one for blacklisting, one for patch collection 2017-03-30 19:19:54 +00:00
gpg-verify-data gpg: Regenerate test data for test-gpg-verify-result 2015-03-19 12:43:04 -04:00
gpghome tests: Port to glib-tap.mk, make make check run all of the tests 2016-03-03 08:50:19 -05:00
installed tests: Put a regex in quotes 2019-04-11 14:28:32 +00:00
.gitignore lib/kargs: Make API public and upstream new rpm-ostree APIs 2019-06-18 14:29:14 +00:00
admin-test.sh lib/bootconfig-parser: Always include deployment index in BLS title 2019-09-02 21:08:58 +00:00
archive-test.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
basic-test.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00
bootloader-entries-crosscheck.py Use Python 3 for tests 2018-02-23 22:49:06 +00:00
coccinelle.sh Add Coccinelle usage: one for blacklisting, one for patch collection 2017-03-30 19:19:54 +00:00
corrupt-repo-ref.js Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
fah-deltadata-new.tar.xz tests: Add a "pull-test2" that uses slightly more realistic content 2017-11-01 17:38:26 +00:00
fah-deltadata-old.tar.xz tests: Add a "pull-test2" that uses slightly more realistic content 2017-11-01 17:38:26 +00:00
get-byte-order.c tests: Assert that byte-order is swapped on LE but not BE CPUs 2018-01-04 12:32:47 +00:00
glib.supp glib.supp: Suppress g_task -> thread leaks 2016-07-28 10:10:17 +00:00
grub2-entries-crosscheck.py tests: Port the last python2 script to python3 2018-04-23 18:33:45 +00:00
libostreetest.c tests: Remove unused includes in libostreetest.c 2019-02-11 13:44:07 +00:00
libostreetest.h Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
libtest-core.sh tests: Fix locale detection 2018-06-03 21:25:07 +00:00
libtest.sh tests/gpg: fix the check of GPG support 2019-08-01 02:06:47 +00:00
ostree-grub-generator Introducing ostree-grub-generator 2016-04-04 14:19:35 +00:00
ostree-path-traverse.tar.gz tests: Add a test case for path traversal in a dirtree 2018-01-12 19:38:34 +00:00
ostree.supp tests: Modernize valgrind infrastructure 2016-06-09 21:10:35 +00:00
pre-endian-deltas-repo-big.tar.xz deltas: Heuristically detect endianness for older deltas 2016-02-26 08:19:01 -05:00
pre-endian-deltas-repo-little.tar.xz deltas: Heuristically detect endianness for older deltas 2016-02-26 08:19:01 -05:00
pull-test2.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00
pull-test.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
readdir-rand.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
repo-finder-mount.c Fix building against old glib versions 2018-06-07 17:28:49 +00:00
test-admin-deploy-2.sh admin: allow multiple args for pin subcommand 2019-06-17 15:06:09 +00:00
test-admin-deploy-bootid-gc.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-admin-deploy-clean.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-admin-deploy-etcmerge-cornercases.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-admin-deploy-grub2.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-admin-deploy-karg.sh deploy: Change BootLoaderSpec filenames so they can be used for sorting 2018-06-27 18:08:28 +00:00
test-admin-deploy-none.sh tests/test-admin-deploy-none: Split grub.cfg directory and file creation 2019-04-24 21:29:39 +00:00
test-admin-deploy-switch.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-admin-deploy-syslinux.sh deploy: Change BootLoaderSpec filenames so they can be used for sorting 2018-06-27 18:08:28 +00:00
test-admin-deploy-uboot.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-admin-gpg.sh admin/status: test GPG signature check 2019-01-08 14:47:08 +00:00
test-admin-instutil-set-kargs.sh lib/kargs: allow empty-list arguments 2018-12-10 19:39:23 +00:00
test-admin-locking.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-admin-pull-deploy-commit.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-admin-pull-deploy-split.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00
test-admin-upgrade-endoflife.sh deploy: Change BootLoaderSpec filenames so they can be used for sorting 2018-06-27 18:08:28 +00:00
test-admin-upgrade-not-backwards.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-admin-upgrade-systemd-update.sh deploy: Delete .updated file from /etc and /var on new deployments 2018-06-18 13:21:52 +00:00
test-admin-upgrade-unconfigured.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-archivez.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-auto-summary.sh lib/config: Rename change-update-summary to auto-... 2018-08-01 19:59:07 +00:00
test-basic-c.c Only verify OSTREE_MAX_METADATA_SIZE for HTTP fetches 2018-10-01 13:23:50 +00:00
test-basic-root.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-basic-user-only.sh lib/commit: Try checksum+hardlink for untrusted local same-uid repos 2018-12-04 20:38:41 +00:00
test-basic-user.sh lib/commit: Try checksum+hardlink for untrusted local same-uid repos 2018-12-04 20:38:41 +00:00
test-basic.sh lib/commit: Try checksum+hardlink for untrusted local same-uid repos 2018-12-04 20:38:41 +00:00
test-bloom.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-bsdiff.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-checksum.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-commit-sign.sh tests: Always cleanup gpg-agent when exiting 2019-06-19 17:30:24 +00:00
test-concurrency.py lib/repo: Enable locking by default, but drop external API 2018-04-30 17:24:51 +00:00
test-config.sh bin: Better handle -- 2019-08-14 12:31:10 +00:00
test-core.js Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-corruption.sh fsck: Add --all to print all corrupted object 2018-05-24 21:00:52 +00:00
test-create-usb.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-delta.sh static-delta: Change show to display from/to commits 2019-03-11 13:59:27 +00:00
test-demo-buildsystem.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-export.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-find-remotes.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-fsck-collections.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00
test-fsck-delete.sh fsck: Add test for --delete corruption, fix repair, and partial commit checks 2019-09-09 13:40:36 +00:00
test-gpg-signed-commit.sh tests/gpg: Skip tests when subkeys can't be expired 2019-07-27 03:20:21 +00:00
test-gpg-verify-result.c lib/gpg: Show information for expired keys 2019-06-19 17:17:11 +00:00
test-help.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-include-ostree-h.c tests: Add test for including ostree.h 2018-06-07 17:28:49 +00:00
test-init-collections.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00
test-kargs.c lib/kargs: Make API public and upstream new rpm-ostree APIs 2019-06-18 14:29:14 +00:00
test-keyfile-utils.c libotutil: Add ot_keyfile_get_value_with_default_group_optional() 2019-03-01 21:20:35 +00:00
test-libarchive-import.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-libarchive.sh tests: Test committing archives from stdin 2019-05-28 17:03:22 +00:00
test-local-pull-depth.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-local-pull.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-lzma.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-mock-gio.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-mock-gio.h Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-mutable-tree.c OstreeMutableTree: Invalidate parent contents checksum when metadata changes 2018-06-29 21:31:08 +00:00
test-no-initramfs.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00
test-oldstyle-partial.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-ot-opt-utils.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-ot-tool-util.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-ot-unix-utils.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-parent.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-prune-collections.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-prune.sh prune: Error if --static-deltas-only without --delete-commit 2018-03-05 17:39:35 +00:00
test-pull2-bareuseronly.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-bare.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-bareuser.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-bareuseronly.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-c.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-collections.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-pull-commit-only.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-contenturl.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-corruption.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-depth.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-large-metadata.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-localcache.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-metalink.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-mirror-summary.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-pull-mirrorlist.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-override-url.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-repeated.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-pull-resume.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-subpath.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-pull-summary-sigs.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-pull-untrusted.sh lib/commit: Try checksum+hardlink for untrusted local same-uid repos 2018-12-04 20:38:41 +00:00
test-refs-collections.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00
test-refs.sh bin/refs: Allow overwriting existing ref 2019-06-12 15:00:19 +00:00
test-remote-add-collections.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-remote-add.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00
test-remote-cookies.sh lib/fetcher: Allow clients to append to User-Agent 2018-03-16 19:21:31 +00:00
test-remote-gpg-import.sh tests: Always cleanup gpg-agent when exiting 2019-06-19 17:30:24 +00:00
test-remote-headers.sh tests: Move assert_fail function to tests/libtest.sh 2018-07-05 17:59:09 +00:00
test-remotes-config-dir.js repo: Add OstreeRepoRemoteChange replace operation 2019-02-08 14:36:41 +00:00
test-repo-finder-avahi.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-repo-finder-config.c tests: Drop unused variable 2019-05-20 13:09:28 +00:00
test-repo-finder-mount-integration.sh tests/libtest: Allow appending actions to be run on EXIT 2019-06-19 17:30:24 +00:00
test-repo-finder-mount.c tests/test-repo-finder-mount: skip some tests if GPG is not supported 2019-08-01 02:06:47 +00:00
test-repo.c tests: Update tests for ostree_repo_get_min_free_space_bytes() 2018-09-21 15:09:12 +00:00
test-reset-nonlinear.sh Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-rofiles-fuse.sh tests/libtest: Allow appending actions to be run on EXIT 2019-06-19 17:30:24 +00:00
test-rollsum-cli.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-rollsum.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-sizes.js tests/sizes.js: Fix byte array unpacking 2019-07-23 12:49:26 +00:00
test-summary-collections.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00
test-summary-update.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-summary-view.sh tests/gpg: fix GPG-dependent shell tests if no GPG support 2019-08-01 02:06:47 +00:00
test-switchroot.sh test-switchroot.sh: skip if no busybox 2017-06-27 21:45:34 +00:00
test-symbols.sh Release 2019.3 2019-08-22 18:37:38 +00:00
test-sysroot-c.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-sysroot.js Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-varint.c Add SPDX-License-Identifier to source files 2018-01-30 20:03:42 +00:00
test-xattrs.sh tests: Escape periods when appropriate 2019-04-11 14:28:32 +00:00