Commit Graph

13 Commits

Author SHA1 Message Date
Karel Zak e7db499f1c tests: cleanup fdisk based stuff
* use fdisk --noauto-pt to avoid re-creation of the default architecture specific PT
* use more verbose "Created a new" messages in the output

Signed-off-by: Karel Zak <kzak@redhat.com>
2020-03-24 14:30:16 +01:00
Karel Zak 18c1f9e643 tests: add remaining stderr outputs
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-08-30 16:10:01 +02:00
Patrick Steinhardt 8892f94c57 tests: (libfdisk) remove reliance on buffer behaviour of standard streams
The tests in libfdisk/mkpart-full all rely on the buffering behaviour of
standard output and standard error streams, most importantly that stderr
is non-buffering and stdout is buffering. This doesn't hold on all libc
implementations when redirecting to a file, breaking the test suite on
such platforms.

Use `ts_run --unbuffered` to stop buffering of the standard output
stream to fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
2019-08-27 09:36:26 +02:00
Karel Zak dd3b72b3e9 libfdisk: add --nopartno to mkpart sample
* disable dialogs for the mkpart sample
* add --nopartno use-case to force libfdisk to use default partno(s)
* add test for this feature

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-08-01 13:51:27 +02:00
Karel Zak ea36907965 libfdisk: support default partno in mkpart-fullspec sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-19 12:19:38 +02:00
Karel Zak 288acb4eee tests: don't use errno in output
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-12 12:34:22 +02:00
Karel Zak 4a61c960ce tests: use sample-fdisk-mkpart-fullspec
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-11 14:26:33 +02:00
Karel Zak 9e9b1afd39 tests: use sample-fdisk-mkpart
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-11 13:33:52 +02:00
Karel Zak a99c0eb09f tests: update sfdisk output
The output of the "New situation:" contains

 Disklabel type: <name>
 Disk identifier: <removed>

lines now.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-11-30 13:07:11 +01:00
Karel Zak 2862bda919 tests: update sfdisk output strings
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-09-01 11:43:42 +02:00
Sebastian Rasmussen d1b7bfe506 fdisk: Fix typo RequiredPartiton -> RequiredPartition
This typo fix is backwards compatible in that fdisk will accept both
the GPT attribute RequiredPartition and RequiredPartiton with the typo.
Update documentation and tests to all use the new attribute name.

Signed-off-by: Sebastian Rasmussen <sebras@gmail.com>
2016-05-31 23:51:07 +02:00
Ruediger Meier 01e8c90ca2 tests: ts_fdisk_clean(), remove optimal iosize
It's a pity a pity that we have to remove it. In past our test suite
could discover a kernel bug (4.4). But now they've changed optimal
iosizes on purpose.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-10 21:06:41 +01:00
Michael Marineau 4a4a0927c6 libfdisk: (gpt) add API for raw partition attributes
The existing APIs can only toggle individual bits or get and set bits in
a complex text representation, making it impractical to use libfdisk for
manipulating the GPT partition attribute field in more complex ways such
as updating a value that is multiple bits wide. For example priority
based partition selection originally designed for ChromeOS includes two
integer values that are 4-bits wide.

http://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Trusting-the-GPT

[kzak@redhat.com: - add new symbols to .sym file and docs
                  - remove unused variables from test program]

Signed-off-by: Michael Marineau <michael.marineau@coreos.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-05-05 12:39:36 +02:00