summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* tests/inst/destructive: stop disabling fedora-coreos-pingerJonathan Lebon2022-06-231-2/+2
| | | | | It was removed from FCOS: https://github.com/coreos/fedora-coreos-tracker/issues/770
* RFE: Add a hidden option to `ostree admin kargs edit-in-place` toHuijing Hei2022-06-231-0/+44
| | | | | | | | | | | update all existing deployments in place Example: $ sudo ostree admin kargs edit-in-place --append-if-missing=rw See https://github.com/ostreedev/ostree/issues/2617 This will not add duplicate key, if there is `TESTARG=VAL1` in the kernel arguments, `--append-if-missing=TESTARG=VAL2` will be ignored.
* test-basic-c: Don't assert that extended attributes are availableSimon McVittie2022-06-171-2/+9
| | | | | | | | Not all filesystems support extended attributes. This test uses /var/tmp to try to get an extended-attributes-capable filesystem, but that might not succeed. Signed-off-by: Simon McVittie <smcv@debian.org>
* Merge pull request #2643 from cgwalters/rust-2021Colin Walters2022-06-133-7/+7
|\ | | | | rust: Switch to 2021 edition, bump MSRV, a few `format!` updates
| * rust: Use inline `format!` variables in a few placesColin Walters2022-06-092-6/+6
| | | | | | | | Since our MSRV now supports it.
| * rust: Switch to 2021 editionColin Walters2022-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No real changes. ``` $ cargo fix --edition note: Switching to Edition 2021 will enable the use of the version 2 feature resolver in Cargo. This may cause some dependencies to be built with fewer features enabled than previously. More information about the resolver changes may be found at https://doc.rust-lang.org/nightly/edition-guide/rust-2021/default-cargo-resolver.html When building the following dependencies, the given features will no longer be used: libc v0.2.126 removed features: extra_traits The following differences only apply when building with dev-dependencies: getrandom v0.2.6 removed features: std ``` which looks OK to me.
* | tests/inst: Bump the version of ostree-extColin Walters2022-06-091-1/+1
|/ | | | | | In the interest of cross-testing and keeping things up to date. Hmm, I think we need to set up dependabot here.
* lib: Fix symbol versioning inheritanceColin Walters2022-06-081-1/+1
| | | | | | | | | I messed this up; the last release should inherit from the previous release (N-1) and not the previous to that (N-2). I think (hope) this isn't an ABI break... Just noticed this when I was going to add a new symbol.
* Release 2022.4v2022.4Colin Walters2022-06-061-1/+1
|
* Teach --karg-delete option to ostree admin deployHuijing Hei2022-05-191-1/+11
| | | | See https://github.com/ostreedev/ostree/issues/2586
* Merge pull request #2575 from cgwalters/merge-ostree-rsColin Walters2022-05-093-1/+5
|\ | | | | Merge ostree-rs into this repository
| * tests/inst: Add .gitignoreColin Walters2022-05-091-0/+2
| | | | | | | | Need this now that it is it's own workspace.
| * tests/inst: Fix install rules for ostree-rs mergerColin Walters2022-05-091-1/+1
| | | | | | | | `tests/inst` became its own workspace.
| * build-sys: Adjust for merge of ostree-rsColin Walters2022-05-061-0/+2
| | | | | | | | | | | | | | | | | | | | Fix up the paths for the crates now that the Rust bindings are in `rust/`. We can't today include the test suite because it depends on `ostree-rs-ext` which would make everything circular. (Building that now requires a separate `cd tests/inst && cargo build`)
* | Add APIs to get xattrs from diskColin Walters2022-05-091-0/+72
|/ | | | | | | I'm aiming to do some more work on the Rust side around `fsck` like functionality, and this is a useful primitive. There isn't a great Rust crate for xattrs, and I think it's better to share this code.
* Add an `ostree-boot-complete.service` to propagate staging failuresColin Walters2022-04-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quite a while ago we added staged deployments, which solved a bunch of issues around the `/etc` merge. However...a persistent problem since then is that any failures in that process that happened in the *previous* boot are not very visible. We ship custom code in `rpm-ostree status` to query the previous journal. But that has a few problems - one is that on systems that have been up a while, that failure message may even get rotated out. And second, some systems may not even have a persistent journal at all. A general thing we do in e.g. Fedora CoreOS testing is to check for systemd unit failures. We do that both in our automated tests, and we even ship code that displays them on ssh logins. And beyond that obviously a lot of other projects do the same; it's easy via `systemctl --failed`. So to make failures more visible, change our `ostree-finalize-staged.service` to have an internal wrapper around the process that "catches" any errors, and copies the error message into a file in `/boot/ostree`. Then, a new `ostree-boot-complete.service` looks for this file on startup and re-emits the error message, and fails. It also deletes the file. The rationale is to avoid *continually* warning. For example we need to handle the case when an upgrade process creates a new staged deployment. Now, we could change the ostree core code to delete the warning file when that happens instead, but this is trying to be a conservative change. This should make failures here much more visible as is.
* ci: Mask zincati for synthetic updateColin Walters2022-04-201-0/+3
| | | | | | | | | | Our CI started falling over because coreos-assembler checks for units stuck activating as of https://github.com/coreos/coreos-assembler/pull/2810 Really need to centralize the code for this and fix the root problem, but...not today. xref https://github.com/coreos/coreos-assembler/pull/2814
* tests: move fixture to fix installed testsLuca BRUNO2022-04-122-1/+1
| | | | | This moves around the packed archive for bare-split-xattrs mode, in order to fix installed tests.
* tests/test-cli-extensions: Fix with single-binary coreutilsJan Tojnar2022-03-261-1/+3
| | | | | | | | | | | | On systems where `coreutils` are built with `--enable-single-binary=symlinks` like Nix, `/usr/bin/env` is symlinked to `/usr/bin/coreutils` and uses `argv[0]` to determine which program to run. Since the `test-cli-extensions.sh` created a new symlink named `ostree-env`, coreutils would be confused about the utility to choose, so running it would fail: ostree-env: unknown program ‘ostree-env’ Try 'ostree-env --help' for more information. Fixes: https://github.com/ostreedev/ostree/issues/2553
* Merge pull request #2528 from cgwalters/test-crate-updateJonathan Lebon2022-03-149-163/+67
|\
| * Update to sh-inline 0.2Colin Walters2022-03-144-20/+20
| | | | | | | | Syncing up with the latest.
| * Update to rand 0.8Colin Walters2022-03-114-5/+5
| | | | | | | | Part of general crate updates.
| * Update to ostree-ext 0.6Colin Walters2022-03-111-1/+1
| | | | | | | | Part of general crate updates.
| * Update to nix 0.23Colin Walters2022-03-111-1/+1
| | | | | | | | Part of general crate updates.
| * tests: Stop using inventory crateColin Walters2022-03-118-136/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was reading this thread https://internals.rust-lang.org/t/from-life-before-main-to-common-life-in-main/16006/30 and that reminded me about this code, which it turns out actually doesn't compile with my default local cargo config: ``` $ cat ~/.cargo/config [target.x86_64-unknown-linux-gnu] rustflags = ["-Ctarget-cpu=native", "-C", "link-arg=-fuse-ld=lld"] [profile.release] incremental = true $ cargo b ... error: linking with `cc` failed: exit status: 1 | = note: "cc" "-m64" "/var/srv/walters/src/github/ostreedev/ostree/target/debug/deps/ostree_test-4ca8e730f9dc6ffc.10325uqlhkyr5uol.rcgu.o" "/var/srv/walte" = note: ld.lld: error: undefined symbol: __start_linkme_NONDESTRUCTIVE_TESTS >>> referenced by 22nn09lfsklfqvyy >>> /var/srv/walters/src/github/ostreedev/ostree/target/debug/deps/ostree_test-4ca8e730f9dc6ffc.22nn09lfsklfqvyy.rcgu.o:(ostree_tes) ``` For now let's just go back to having a static list of functions. We don't have *too* many of those.
* | glib: bump glib requirement to 2.66 and port to GUriDaniel Kolesa2022-03-122-2/+4
|/ | | | | This removes the old SoupURI copypasta from previous generation of libsoup and opens up a path for a simple libsoup3 port.
* tmpfiles: Create `/run/ostree`Colin Walters2022-03-111-0/+13
| | | | | | | | | | This is referenced by https://github.com/ostreedev/ostree-rs-ext/blob/9645cee4f29786ba51ae9d62a52eeef9230146fd/lib/src/globals.rs#L16 specifically used for the (container image) pull secret in `/run/ostree/auth.json`. Let's pre-create the directory so users don't have to. Motivated by https://github.com/openshift/machine-config-operator/pull/3007#discussion_r824172564
* test-prune: Read to the end of cut(1) outputSimon McVittie2022-03-071-1/+1
| | | | | | | | | | | If we use head(1) to take only the first two lines, then cut(1) and earlier pipeline entries are killed by SIGPIPE (if they have not already terminated), and that's flagged as an error under `set -o pipefail`. Use an equivalent sed command to take exactly the second line, but without SIGPIPE. Signed-off-by: Simon McVittie <smcv@debian.org> Gbp-Pq: Name test-prune-Read-to-the-end-of-cut-1-output.patch
* Release 2022.2v2022.2Colin Walters2022-03-031-1/+1
|
* tests/basic-bare-split-xattrs: add fixture, check read logicLuca BRUNO2022-03-032-0/+28
|
* lib/commit: disallow writing content in 'bare-split-xattrs' modeLuca BRUNO2022-03-021-0/+22
| | | | | | This prevents writing content into 'bare-split-xattrs` repository, while carving some space for experimenting via a temporary `OSTREE_EXP_WRITE_BARE_SPLIT_XATTRS` environment flag.
* lib/core: introduce 'bare-split-xattrs' modeLuca BRUNO2022-03-021-0/+25
|
* tests/test-prune.sh: Use TAP APISaqib Ali2022-02-251-19/+18
| | | | | Change tests to use the newer TAP API introduced in https://github.com/ostreedev/ostree/pull/2440
* tests/test-prune.sh: expand testing for --commit-onlySaqib Ali2022-02-251-1/+72
| | | | | Let's add additional tests to expand the test suite for the new --commit-only functionality.
* lib/repo: Add commit version metadata to summary metadataDan Nicholson2022-02-041-0/+1
| | | | | | | | The commit metadata `version` key is well established but getting it for a remote commit is cumbersome since the commit object needs to be fetched and loaded. Including it in the summary additional metadata allows a much more convenient view of what each of the remote refs represents.
* tests/kolainst: Avoid recursive symlinksJonathan Lebon2022-01-256-4/+4
| | | | | | | | `kola` now follows symlinks when archiving an external test's `data/` dir. So the recursive `data` symlink we have here breaks it. Let's just move the shared files in its own directory and update the symlinks.
* ostree/deploy: Test finalization lockingJonathan Lebon2022-01-211-2/+10
| | | | | | | | | Support for that file was added previously, but the testing lived in rpm-ostree only. Let's add it here too. In the process add a hidden `--lock-finalization` to `ostree admin deploy` to make testing easier (though it could also be useful to update managers driving OSTree via the CLI).
* lib/commit: reject empty metadata keysLuca BRUNO2022-01-201-1/+12
| | | | | This adds one more check to the metadata validation logic in order to reject empty metadata keys.
* main: Also support CLI extensions in `/usr/libexec/libostree/ext`Colin Walters2022-01-112-0/+26
| | | | | | | | | | | | | In fixing https://github.com/coreos/rpm-ostree/pull/3323 I felt that it was a bit ugly we're installing `/usr/bin/ostree-container`. It's kind of an implementation detail. We want users to use `ostree container`. Let's support values outside of $PATH too. For example, this also ensures that TAB completion for `ost` expands to `ostree ` with a space.
* ostree: check g_setenv return valueLuca BRUNO2022-01-104-4/+8
| | | | | This adds proper return-value checks on g_setenv calls. It fixes a static analysis warning highlighted by Coverity.
* tests: Fix clang-analyzer not seeing through `g_error()`Colin Walters2021-12-211-4/+4
| | | | | | | | Basically due to the glib structured logging rework we lost the `noreturn` attribute on `g_error()`. This is fixed in glib as of https://gitlab.gnome.org/GNOME/glib/-/commit/f97ff20adf4eb7b952dd83e2c13046fe9e282f50 But we might as well just throw an error here.
* tests/cli-extensions: tweak test logicLuca BRUNO2021-12-211-2/+6
| | | | | | This updates the test logic for CLI extensions, actually checking for functional output from the subcommand. It also cleans up some environmental leftover.
* main: add support for CLI extensions via external binariesLuca BRUNO2021-12-201-0/+27
| | | | | | | | | | This adds some logic to detect and dispatch unknown subcommands to extensions available in `$PATH`. Additional commands can be implemented by adding relevant `ostree-$verb` binaries to the system. As an example, if a `/usr/bin/ostree-extcommand` extension is provided, the execution of `ostree extcommand --help` will be dispatched to that as `ostree-extcommand extcommand --help`.
* tests: assert mandatory values are presentLuca BRUNO2021-12-101-2/+4
| | | | | This adds a couple of string assertions to make sure that the test run is sane.
* Update FSF license notices to use URL instead of addressJoseph Marrero2021-12-07140-421/+141
|
* lib: misc static analysis fixesLuca BRUNO2021-11-261-0/+1
| | | | | This fixes a few warnings from coverity, none of which really interesting.
* tests/var-mount: tweak test setupLuca BRUNO2021-10-191-6/+3
| | | | | | | | This reworks the var-mount destructive test in order to properly use the datadir for the current stateroot instead of a duplicated one. In turn, it ensures that the resulting `var.mount` after reboot is correctly pointing to the same location which hosted `/var` on the previous boot.
* tests/rollsum: Use `g_malloc` not `malloc`Colin Walters2021-10-181-2/+2
| | | | To pacify gcc's `-fanalyzer`.
* Merge pull request #2459 from smcv/test-commit-signColin Walters2021-10-061-2/+6
|\ | | | | test-commit-sign.sh: Skip a unit test when running as an installed-test
| * test-commit-sign.sh: Skip a unit test when running as an installed-testSimon McVittie2021-10-051-2/+6
| | | | | | | | Signed-off-by: Simon McVittie <smcv@debian.org>