~ubuntu-branches/debian/experimental/parted/experimental

« back to all changes in this revision

Viewing changes to tests/t0200-gpt.sh

  • Committer: Bazaar Package Importer
  • Author(s): Otavio Salvador, Otavio Salvador, Colin Watson, Xavier Oswald, Xavier Oswald, Colin Watson
  • Date: 2010-02-06 16:39:19 UTC
  • mfrom: (1.1.4 upstream) (7.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100206163919-rt7jssmitulmp010
Tags: 2.1-1
* New upstream release

[ Otavio Salvador ]
* control.in: bump preferred soname for libreadline (closes: #553824).

[ Colin Watson ]
* control.in: Remove copy-and-paste error from libparted1.8-i18n
  description (closes: #497626).
* copyright: Document parted.info's licence, namely GFDL 1.1 with no
  invariant sections, front-cover texts, or back-cover texts (closes:
  #500201).
* rules: Cell partition tables are misdetected as pc98, so disable pc98
  support on powerpc (closes: #487833).
* control.in: Don't build-depend on libdevmapper-dev on hurd-i386.
* control.in: Build-depend on libdevmapper-dev (>= 1.02.33), for
  dm_task_set_major_minor.

[ Xavier Oswald ]
* debian/control.in: 
  - Change my mail address
  - Bump Standards-Version to 3.8.3
  - Update Build-Depends on debhelper 7
* debian/compat: update version to 7
* Parted not informing the kernel of changes to the partition table 
  (Closes: #557044), fixed upstream

[ Otavio Salvador ]
* debian/watch: fix URL to download
* Switch to quilt to manage patches
  - unpartitioned-disks.dpatch, drop (merged upstream)
  - unblacklist-md.dpatch, drop (merged upstream)
  - amiga-raid-lvm-fix.dpatch, drop (not used for ages)
  - devfs.dpatch, drop (devfs is not used)
  - reiserfs-libname.dpatch, drop (referenced library is unavailable)

[ Xavier Oswald, Colin Watson ]
* Refresh update-ext4-code.patch

[ Otavio Salvador ]
* Fix parted-doc info files installation
* Add lintian overrides for parted package
* Use soname in libparted udeb name

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# Ensure that printing a GPT partition table does not modify it.
 
3
 
 
4
# Copyright (C) 2009 Free Software Foundation, Inc.
 
5
 
 
6
# This program is free software; you can redistribute it and/or modify
 
7
# it under the terms of the GNU General Public License as published by
 
8
# the Free Software Foundation; either version 3 of the License, or
 
9
# (at your option) any later version.
 
10
 
 
11
# This program is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
# GNU General Public License for more details.
 
15
 
 
16
# You should have received a copy of the GNU General Public License
 
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
 
 
19
if test "$VERBOSE" = yes; then
 
20
  set -x
 
21
  parted --version
 
22
fi
 
23
 
 
24
: ${srcdir=.}
 
25
. $srcdir/t-lib.sh
 
26
 
 
27
N=2M
 
28
dev=loop-file
 
29
# create a file large enough to hold a GPT partition table
 
30
dd if=/dev/null of=$dev bs=1 seek=$N || framework_failure
 
31
 
 
32
fail=0
 
33
 
 
34
# create a GPT partition table
 
35
parted -s $dev mklabel gpt > out 2>&1 || fail=1
 
36
# expect no output
 
37
compare out /dev/null || fail=1
 
38
 
 
39
# save a copy of the original primary GPT table
 
40
dd if=$dev of=before count=1 skip=1 || fail=1
 
41
 
 
42
# extend the backing file by 1 byte
 
43
printf x >> $dev || fail=1
 
44
 
 
45
# use parted simply to print the partition table
 
46
parted -m -s $dev u s p > out 2> err || fail=1
 
47
# don't bother comparing stdout
 
48
# expect no stderr
 
49
compare err /dev/null || fail=1
 
50
 
 
51
# extract the primary GPT table again
 
52
dd if=$dev of=after count=1 skip=1 || fail=1
 
53
 
 
54
# compare partition tables (they had better be identical)
 
55
compare before after || fail=1
 
56
 
 
57
Exit $fail