[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: fix misleading mkpart usage
From: |
Jim Meyering |
Subject: |
[PATCH] tests: fix misleading mkpart usage |
Date: |
Sun, 08 Jan 2012 18:13:59 +0100 |
FYI,
>From 5ce39625c2619346b2ec5ea650159f3093a63009 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 8 Jan 2012 18:03:34 +0100
Subject: [PATCH] tests: fix misleading mkpart usage
Using "primary" is fine (and common) as a partition *type* for dos
partition tables, but with a partition table of type GPT, it is
downright misleading to specify the partition *name* as "primary".
* tests/t0220-gpt-msftres.sh: Use "p-name" as partition name,
rather than misleading "primary".
* tests/t7000-scripting.sh: Likewise.
---
tests/t0220-gpt-msftres.sh | 2 +-
tests/t7000-scripting.sh | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/t0220-gpt-msftres.sh b/tests/t0220-gpt-msftres.sh
index 83c50f2..8bfa17c 100755
--- a/tests/t0220-gpt-msftres.sh
+++ b/tests/t0220-gpt-msftres.sh
@@ -57,7 +57,7 @@ i=1
for type in $fs_types; do
end=$(expr $start + $part_size - 1)
echo "$i:${start}s:${end}s:${part_size}s::$type:;" >> exp || fail=1
- parted -s $dev mkpart primary $type ${start}s ${end}s > err 2>&1 || fail=1
+ parted -s $dev mkpart p-name $type ${start}s ${end}s > err 2>&1 || fail=1
compare /dev/null err || fail=1
parted -s $dev name $i $type > err 2>&1 || fail=1
compare /dev/null err || fail=1
diff --git a/tests/t7000-scripting.sh b/tests/t7000-scripting.sh
index 1cfb08a..e64814b 100755
--- a/tests/t7000-scripting.sh
+++ b/tests/t7000-scripting.sh
@@ -47,7 +47,7 @@ for mkpart in mkpart; do
dd if=/dev/zero of=testfile bs=${ss}c count=$N 2> /dev/null || fail=1
# Test the scripting mode of $mkpart.
- parted -s testfile -- mklabel gpt "$mkpart" primary ext3 1s -1s > out 2>&1
+ parted -s testfile -- mklabel gpt "$mkpart" p-name ext3 1s -1s > out 2>&1
test $? = 1 || fail=1
# Compare the real error and the expected one
@@ -61,7 +61,7 @@ for mkpart in mkpart; do
# Test the interactive mode of $mkpart
echo n | \
parted ---pretend-input-tty testfile \
- "mklabel gpt '$mkpart' primary ext3 1s -1s" > out 2>&1 && fail=1
+ "mklabel gpt '$mkpart' p-name ext3 1s -1s" > out 2>&1 && fail=1
# We have to format the output before comparing.
# normalize the actual output
--
1.7.9.rc0.2.g4b783
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: fix misleading mkpart usage,
Jim Meyering <=