From 18c1f9e6433aee2f1add86e9a50016eae3642f08 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 30 Aug 2019 16:10:01 +0200 Subject: [PATCH] tests: add remaining stderr outputs Signed-off-by: Karel Zak --- .../libfdisk/mkpart-full-gpt-err-overlap | 2 -- .../libfdisk/mkpart-full-gpt-err-overlap.err | 2 ++ .../libfdisk/mkpart-full-mbr-err-logical | 1 - .../libfdisk/mkpart-full-mbr-err-logical.err | 1 + .../libfdisk/mkpart-full-mbr-err-nospace | 2 -- .../libfdisk/mkpart-full-mbr-err-nospace.err | 2 ++ .../libfdisk/mkpart-full-mbr-err-primary | 2 -- .../libfdisk/mkpart-full-mbr-err-primary.err | 2 ++ tests/ts/libfdisk/mkpart-full | 28 +++++++++---------- 9 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 tests/expected/libfdisk/mkpart-full-gpt-err-overlap.err create mode 100644 tests/expected/libfdisk/mkpart-full-mbr-err-logical.err create mode 100644 tests/expected/libfdisk/mkpart-full-mbr-err-nospace.err create mode 100644 tests/expected/libfdisk/mkpart-full-mbr-err-primary.err diff --git a/tests/expected/libfdisk/mkpart-full-gpt-err-overlap b/tests/expected/libfdisk/mkpart-full-gpt-err-overlap index ebf0784158..3d912ed5db 100644 --- a/tests/expected/libfdisk/mkpart-full-gpt-err-overlap +++ b/tests/expected/libfdisk/mkpart-full-gpt-err-overlap @@ -6,8 +6,6 @@ Created a new . Requested partition: Created a new . Requested partition: -Sector 5000 already used. -sample-fdisk-mkpart-fullspec: failed to add #4 partition Disk : 15 MiB, 15728640 bytes, 30720 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes diff --git a/tests/expected/libfdisk/mkpart-full-gpt-err-overlap.err b/tests/expected/libfdisk/mkpart-full-gpt-err-overlap.err new file mode 100644 index 0000000000..bd62a9b381 --- /dev/null +++ b/tests/expected/libfdisk/mkpart-full-gpt-err-overlap.err @@ -0,0 +1,2 @@ +Sector 5000 already used. +sample-fdisk-mkpart-fullspec: failed to add #4 partition diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-logical b/tests/expected/libfdisk/mkpart-full-mbr-err-logical index 6d48f487a6..a08070ea3f 100644 --- a/tests/expected/libfdisk/mkpart-full-mbr-err-logical +++ b/tests/expected/libfdisk/mkpart-full-mbr-err-logical @@ -11,7 +11,6 @@ Requested partition: Adding logical partition 5 Created a new . Requested partition: -sample-fdisk-mkpart-fullspec: failed to add #6 partition Disk : 15 MiB, 15728640 bytes, 30720 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-logical.err b/tests/expected/libfdisk/mkpart-full-mbr-err-logical.err new file mode 100644 index 0000000000..014b31633e --- /dev/null +++ b/tests/expected/libfdisk/mkpart-full-mbr-err-logical.err @@ -0,0 +1 @@ +sample-fdisk-mkpart-fullspec: failed to add #6 partition diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-nospace b/tests/expected/libfdisk/mkpart-full-mbr-err-nospace index a79c5800a1..3a1cd636cd 100644 --- a/tests/expected/libfdisk/mkpart-full-mbr-err-nospace +++ b/tests/expected/libfdisk/mkpart-full-mbr-err-nospace @@ -4,8 +4,6 @@ Created a new . Requested partition: Created a new . Requested partition: -Start sector 4096 out of range. -sample-fdisk-mkpart-fullspec: failed to add #3 partition Disk : 15 MiB, 15728640 bytes, 30720 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-nospace.err b/tests/expected/libfdisk/mkpart-full-mbr-err-nospace.err new file mode 100644 index 0000000000..7e44232ddd --- /dev/null +++ b/tests/expected/libfdisk/mkpart-full-mbr-err-nospace.err @@ -0,0 +1,2 @@ +Start sector 4096 out of range. +sample-fdisk-mkpart-fullspec: failed to add #3 partition diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-primary b/tests/expected/libfdisk/mkpart-full-mbr-err-primary index 93edf2b074..57fcc5c3f4 100644 --- a/tests/expected/libfdisk/mkpart-full-mbr-err-primary +++ b/tests/expected/libfdisk/mkpart-full-mbr-err-primary @@ -4,8 +4,6 @@ Created a new . Requested partition: Created a new . Requested partition: -Extended partition does not exists. Failed to add logical partition. -sample-fdisk-mkpart-fullspec: failed to add #7 partition Disk : 15 MiB, 15728640 bytes, 30720 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes diff --git a/tests/expected/libfdisk/mkpart-full-mbr-err-primary.err b/tests/expected/libfdisk/mkpart-full-mbr-err-primary.err new file mode 100644 index 0000000000..59e42e1fe7 --- /dev/null +++ b/tests/expected/libfdisk/mkpart-full-mbr-err-primary.err @@ -0,0 +1,2 @@ +Extended partition does not exists. Failed to add logical partition. +sample-fdisk-mkpart-fullspec: failed to add #7 partition diff --git a/tests/ts/libfdisk/mkpart-full b/tests/ts/libfdisk/mkpart-full index b08891d9f1..05b2b4793e 100755 --- a/tests/ts/libfdisk/mkpart-full +++ b/tests/ts/libfdisk/mkpart-full @@ -31,7 +31,7 @@ ts_check_test_command "$TS_CMD_WIPEFS" TEST_IMAGE_NAME=$(ts_image_init 15) ts_init_subtest "mbr-primary" -ts_run --unbuffered $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,4096,2048 \ 3,6144,2048 \ @@ -45,7 +45,7 @@ $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ts_init_subtest "mbr-primary-nopartno" -ts_run --unbuffered $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} -- \ +ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} -- \ -,2048,2048 \ -,4096,2048 \ -,6144,2048 \ @@ -59,7 +59,7 @@ $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ## no extended but partno > 4 requested ts_init_subtest "mbr-err-primary" -ts_run --unbuffered $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,4096,2048 \ 7,6144,2048 \ @@ -72,7 +72,7 @@ $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ## no extended but partno > 4 requested ts_init_subtest "mbr-err-nospace" -ts_run --unbuffered $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,4096,2048 \ 3,4096,2048 \ @@ -85,7 +85,7 @@ $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ts_init_subtest "mbr-logical" -ts_run --unbuffered $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,4096,2048 \ 3,6144,2048 \ @@ -101,7 +101,7 @@ ts_finalize_subtest $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ts_init_subtest "mbr-nopartno" -ts_run --unbuffered $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} -- \ +ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} -- \ -,2048,2048 \ -,4096,2048 \ -,6144,2048 \ @@ -118,7 +118,7 @@ $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ### 6th partition (logical) out of extended ts_init_subtest "mbr-err-logical" -ts_run --unbuffered $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,4096,2048 \ 3,6144,2048 \ @@ -134,7 +134,7 @@ ts_finalize_subtest $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ts_init_subtest "mbr-space-gap" -ts_run --unbuffered $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label mbr --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,6144,2048 \ 3,8192,2048 \ @@ -146,7 +146,7 @@ ts_finalize_subtest $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ts_init_subtest "gpt" -ts_run --unbuffered $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,4096,2048 \ 3,6144,2048 \ @@ -162,7 +162,7 @@ ts_finalize_subtest $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ts_init_subtest "gpt-nopartno" -ts_run --unbuffered $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} -- \ +ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} -- \ -,2048,2048 \ -,4096,2048 \ -,6144,2048 \ @@ -179,7 +179,7 @@ $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ### 4th partition overlap 4th and 5th ts_init_subtest "gpt-err-overlap" -ts_run --unbuffered $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,4096,2048 \ 3,6144,2048 \ @@ -195,7 +195,7 @@ ts_finalize_subtest $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ts_init_subtest "gpt-partno-gap" -ts_run --unbuffered $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,4096,2048 \ 4,6144,2048 \ @@ -211,7 +211,7 @@ ts_finalize_subtest $TS_CMD_WIPEFS --all --force ${TEST_IMAGE_NAME} &> /dev/null ts_init_subtest "gpt-space-gap" -ts_run --unbuffered $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \ +ts_run $TESTPROG --label gpt --device ${TEST_IMAGE_NAME} \ 1,2048,2048 \ 2,6144,2048 \ 3,8192,2048 \ @@ -222,6 +222,4 @@ $TS_CMD_SFDISK --list ${TEST_IMAGE_NAME} >> $TS_OUTPUT 2>> $TS_ERRLOG ts_fdisk_clean ${TEST_IMAGE_NAME} ts_finalize_subtest - - ts_finalize -- 2.39.2