[Parted-commits] GNU Parted Official Repository: Changes to 'master'

Jim Meyering meyering at alioth.debian.org
Sat Feb 25 10:18:26 UTC 2012


 NEWS                                 |   13 +++++++-----
 tests/init.cfg                       |   37 +++++++++++++++++++++++++++++++++++
 tests/t9050-partition-table-types.sh |    2 -
 3 files changed, 46 insertions(+), 6 deletions(-)

New commits:
commit 187e7cba48094505f00532698dfb04ab40575231
Author: Jim Meyering <meyering at redhat.com>
Date:   Sat Feb 25 11:16:54 2012 +0100

    doc: improve NEWS
    
    * NEWS: Expand/adjust wording in two entries.

diff --git a/NEWS b/NEWS
index 2793ce4..fc93e98 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,9 @@ GNU parted NEWS                                    -*- outline -*-
 
 ** New features
 
-  Increased limit for msdos partitions from 16 to 64
+  parted now supports up to 64 msdos partitions (was 16).  The partition
+  table format imposes no limit (it's simply a linked list), so we may
+  raise it further, if needed.
 
   parted has improved support for partitionable loopback devices
 
@@ -75,10 +77,11 @@ GNU parted NEWS                                    -*- outline -*-
   anyhow, and some users have a misconfigured BIOS that claims to have a
   floppy when they don't, and scanning gets hung up.
 
-  parted: mkpart command has changed semantics with regard to specifying end
-  of the partition. If the end is specified using MiB, GiB, etc. unit, parted
-  subtracts one sector from the specified value. With this change, it is now
-  possible to create partitions like 1MiB-2MiB, 2MiB-3MiB and so on.
+  parted: the mkpart command has changed semantics with regard to specifying
+  the end of the partition.  If the end is specified using units of MiB, GiB,
+  etc., parted subtracts one sector from the specified value.  With this
+  change, it is now possible to create partitions like 1MiB-2MiB, 2MiB-3MiB
+  and so on.
 
   Device-mapper devices ( LVM, dmraid ) no longer insert a 'p' between the
   base device name and the partition number unless the last character of

commit c92748d1bedc53fe0a49ae1eead78315c99e1ec3
Author: Jim Meyering <meyering at redhat.com>
Date:   Sun Feb 19 15:31:58 2012 +0100

    tests: sanitize PATH; do not discard mkswap output
    
    * tests/init.cfg (sanitize_path_): New function, from coreutils.
    Use it.
    * tests/t9050-partition-table-types.sh: Do not discard mkswap output
    and diagnostics.  This test would fail (e.g., on OpenSUSE 12.1), when
    run with PATH not including /sbin.  Reported by Bruno Haible.

diff --git a/tests/init.cfg b/tests/init.cfg
index 6072acd..24b10bc 100644
--- a/tests/init.cfg
+++ b/tests/init.cfg
@@ -25,6 +25,41 @@ require_512_byte_sector_size_()
   test $sector_size_ = 512 || skip_ 'FS test with sector size != 512'
 }
 
+# Having an unsearchable directory in PATH causes execve to fail with EACCES
+# when applied to an unresolvable program name, contrary to the desired ENOENT.
+# Avoid the problem by rewriting PATH to exclude unsearchable directories.
+# Also, if PATH lacks /sbin and/or /usr/sbin, append it/them.
+sanitize_path_()
+{
+  # FIXME: remove double quotes around $IFS when all tests use init.sh.
+  # They constitute a work-around for a bug in FreeBSD 8.1's /bin/sh.
+  local saved_IFS="$IFS"
+    IFS=:
+    set -- $PATH
+  IFS=$saved_IFS
+
+  local d d1
+  local colon=
+  local new_path=
+  for d in "$@"; do
+    test -z "$d" && d1=. || d1=$d
+    if ls -d "$d1/." > /dev/null 2>&1; then
+      new_path="$new_path$colon$d"
+      colon=':'
+    fi
+  done
+
+  for d in /sbin /usr/sbin ; do
+    case ":$new_path:" in
+      *:$d:*) ;;
+      *) new_path="$new_path:$d" ;;
+    esac
+  done
+
+  PATH=$new_path
+  export PATH
+}
+
 require_udevadm_settle_()
 {
   udevadm --help > /dev/null \
@@ -90,5 +125,7 @@ require_partitionable_loop_device_()
   esac
 }
 
+sanitize_path_
+
 . "$abs_top_srcdir/tests/t-lib-helpers.sh"
 . "$abs_top_srcdir/tests/t-local.sh"
diff --git a/tests/t9050-partition-table-types.sh b/tests/t9050-partition-table-types.sh
index 563b2e8..04dc5c6 100755
--- a/tests/t9050-partition-table-types.sh
+++ b/tests/t9050-partition-table-types.sh
@@ -41,7 +41,7 @@ dd if=/dev/null of=f bs=1 seek=30M || framework_failure_
 for i in $types; do
   for j in $types; do
     echo $i:$j
-    case $i in mkswap) mkswap f >/dev/null 2>&1 || fail=1;;
+    case $i in mkswap) mkswap f || fail=1;;
       *) parted -s f mklabel $i || fail=1;; esac
     case $j in mkswap) continue;; esac
     parted -s f mklabel $j || fail=1



More information about the Parted-commits mailing list