44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
|
From 3228fcc714347701f48034288b5fa98c6bb0a50d Mon Sep 17 00:00:00 2001
|
||
|
From: "Brian C. Lane" <bcl@redhat.com>
|
||
|
Date: Thu, 22 Dec 2016 16:59:27 -0800
|
||
|
Subject: [PATCH 63/75] tests: Update t0220 and t0280 for the swap flag.
|
||
|
|
||
|
---
|
||
|
tests/t0220-gpt-msftres.sh | 6 +++++-
|
||
|
tests/t0280-gpt-corrupt.sh | 2 +-
|
||
|
2 files changed, 6 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/tests/t0220-gpt-msftres.sh b/tests/t0220-gpt-msftres.sh
|
||
|
index 79518ae..6721a47 100755
|
||
|
--- a/tests/t0220-gpt-msftres.sh
|
||
|
+++ b/tests/t0220-gpt-msftres.sh
|
||
|
@@ -56,7 +56,11 @@ printf "BYT;\n$dev:${n_sectors}s:file:$ss:$ss:gpt::;\n" > exp
|
||
|
i=1
|
||
|
for type in $fs_types; do
|
||
|
end=$(expr $start + $part_size - 1)
|
||
|
- case $type in fat*|NTFS) flag=msftdata;; *) flag=;; esac
|
||
|
+ case $type in
|
||
|
+ fat*|NTFS) flag=msftdata;;
|
||
|
+ linux-swap) flag=swap;;
|
||
|
+ *) flag=;;
|
||
|
+ esac
|
||
|
echo "$i:${start}s:${end}s:${part_size}s::$type:$flag;" >> exp || fail=1
|
||
|
parted -s $dev mkpart p-name $type ${start}s ${end}s > err 2>&1 || fail=1
|
||
|
compare /dev/null err || fail=1
|
||
|
diff --git a/tests/t0280-gpt-corrupt.sh b/tests/t0280-gpt-corrupt.sh
|
||
|
index a7c8d82..1b4d86b 100755
|
||
|
--- a/tests/t0280-gpt-corrupt.sh
|
||
|
+++ b/tests/t0280-gpt-corrupt.sh
|
||
|
@@ -89,7 +89,7 @@ compare exp err || fail=1
|
||
|
parted -m -s $dev u s print > out 2>&1 || fail=1
|
||
|
|
||
|
# check for expected output
|
||
|
-printf "BYT;\nfile\n1:2048s:4095s:2048s::foo:;\n" > exp || fail=1
|
||
|
+printf "BYT;\nfile\n1:2048s:4095s:2048s::foo:swap;\n" > exp || fail=1
|
||
|
sed "s/.*gpt::;/file/" out > k && mv k out || fail=1
|
||
|
compare exp out || fail=1
|
||
|
|
||
|
--
|
||
|
2.9.3
|
||
|
|