~ubuntu-branches/ubuntu/utopic/parted/utopic-proposed

« back to all changes in this revision

Viewing changes to tests/t9010-big-sector.sh

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-07-21 10:23:16 UTC
  • mfrom: (7.2.32 sid)
  • Revision ID: package-import@ubuntu.com-20140721102316-jsyv3yzmbo8vlde5
Tags: 3.1-3
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
# check physical sector size as reported by 'print'
3
3
 
4
 
# Copyright (C) 2009-2010 Free Software Foundation, Inc.
 
4
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
5
5
 
6
6
# This program is free software; you can redistribute it and/or modify
7
7
# it under the terms of the GNU General Public License as published by
16
16
# You should have received a copy of the GNU General Public License
17
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
18
 
19
 
if test "$VERBOSE" = yes; then
20
 
  set -x
21
 
  parted --version
22
 
fi
23
 
 
24
 
: ${srcdir=.}
25
 
. $srcdir/t-lib.sh
 
19
. "${srcdir=.}/init.sh"; path_prepend_ ../parted
26
20
 
27
21
require_root_
28
22
require_scsi_debug_module_
29
23
 
30
24
grep '^#define USE_BLKID 1' "$CONFIG_HEADER" > /dev/null ||
31
 
  skip_test_ 'this system lacks a new-enough libblkid'
 
25
  skip_ 'this system lacks a new-enough libblkid'
32
26
 
33
27
echo 'Sector size (logical/physical): 4096B/4096B' > exp || framework_failure
34
28
 
35
29
# create memory-backed device
36
30
scsi_debug_setup_ dev_size_mb=8 sector_size=4096 > dev-name ||
37
 
  skip_test_ 'failed to create scsi_debug device'
 
31
  skip_ 'failed to create scsi_debug device'
38
32
scsi_dev=$(cat dev-name)
39
33
 
40
 
fail=0
41
 
 
42
34
# create partition table and print
43
35
parted -s $scsi_dev mklabel gpt print > out 2>&1 || fail=1
44
36
grep '^Sector' out > k 2>&1 || fail=1
45
37
mv k out || fail=1
46
38
 
47
 
compare out exp || fail=1
 
39
compare exp out || fail=1
48
40
 
49
41
Exit $fail