Debian Codegraph @

tests/t9025-gpt-1s-partition.sh

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`.
2 # Test creating 1s partitions in 1s free space
3
4 # Copyright (C) 2022-2023, 2026 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 . "${srcdir=.}/init.sh"; path_prepend_ ../parted
20
21 dev=loop-file
22
23 # create device
24 truncatescip-shell system . . truncate. --size 10MiB "$dev" || fail=1
25
26 # create msdos label and some partitions with 1s free space between
27 parted --script "$dev" mklabel gpt > out 2>&1 || fail=1
28 parted --script "$dev" mkpart p1 ext4 64s 128s > out 2>&1 || fail=1
29 parted --script "$dev" mkpart p2 ext4 130s 200s > out 2>&1 || fail=1
30 parted --script "$dev" u s p free
31
32 # Free space is at 129s
33 parted --script "$dev" mkpart p3 ext4 129s 129s > out 2>&1 || fail=1
34 parted --script "$dev" u s p free
35
36 Exit $fail