| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# |
| 4 |
# Copyright (C) 2022 Thomas Weißschuh <[email protected]> |
| 5 |
# |
| 6 |
# This file is part of util-linux. |
| 7 |
# |
| 8 |
# This file is free software; you can redistribute it and/or modify |
| 9 |
# it under the terms of the GNU General Public License as published by |
| 10 |
# the Free Software Foundation; either version 2 of the License, or |
| 11 |
# (at your option) any later version. |
| 12 |
# |
| 13 |
# This file is distributed in the hope that it will be useful, |
| 14 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
# GNU General Public License for more details. |
| 17 |
# |
| 18 |
|
| 19 |
TS_TOPDIR="${0%/*}/../.." |
| 20 |
TS_DESC="topology probing" |
| 21 |
|
| 22 |
. "$TS_TOPDIR"/functions.sh |
| 23 |
|
| 24 |
ts_init "$*" |
| 25 |
|
| 26 |
ts_skip_nonroot |
| 27 |
ts_check_losetup |
| 28 |
ts_check_test_command "$TS_CMD_BLKID" |
| 29 |
ts_check_test_command "$TS_CMD_SFDISK" |
| 30 |
|
| 31 |
ts_device_init |
| 32 |
|
| 33 |
|
| 34 |
ts_init_subtest disk |
| 35 |
echo -e 'label: dos\n- - - -' | "$TS_CMD_SFDISK" -q "$TS_LODEV" |
| 36 |
|
| 37 |
"$TS_CMD_BLKID" --info --output udev "$TS_LODEV" \ |
| 38 |
2> "$TS_ERRLOG" \ |
| 39 |
| sed -E -e 's/^ID_FS_DISKSEQ=[[:digit:]]+$/ID_FS_DISKSEQ=S/' \ |
| 40 |
| sort > "$TS_OUTPUT" |
| 41 |
|
| 42 |
ts_finalize_subtest |
| 43 |
|
| 44 |
|
| 45 |
ts_init_subtest partition |
| 46 |
|
| 47 |
"$TS_CMD_BLKID" --info --output udev "$TS_LODEV"p1 \ |
| 48 |
2> "$TS_ERRLOG" \ |
| 49 |
| sed -E -e 's/^ID_FS_DISKSEQ=[[:digit:]]+$/ID_FS_DISKSEQ=S/' \ |
| 50 |
| sort > "$TS_OUTPUT" |
| 51 |
|
| 52 |
ts_finalize_subtest |
| 53 |
|
| 54 |
ts_finalize |