bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [platform-testers] new snapshot available: parted-3.0.136-1f80


From: Bruno Haible
Subject: Re: [platform-testers] new snapshot available: parted-3.0.136-1f80
Date: Mon, 20 Feb 2012 04:34:23 +0100
User-agent: KMail/4.7.4 (Linux/3.1.0-1.2-desktop; KDE/4.7.4; x86_64; ; )

Jim Meyering wrote:
> The sole failure seems to be due to mkswap failing on your system.
> However, the code that is failing redirects stderr and stdout
> to /dev/null, so there is no clue in the log.
> 
> I confirmed that it works on openSUSE 11.4:
> 
>    $ dd if=/dev/null of=f bs=1 seek=30M && mkswap f && echo ok
>    ...
>    ok
>    $
> 
> But I get a clue when the existing "device" has a preexisting
> partition table:
> 
>     $ dd if=/dev/null of=f bs=1 seek=30M \
>       && parted -s f mklabel gpt && mkswap f && echo ok
>     0+0 records in
>     0+0 records out
>     0 bytes (0 B) copied, 0.000331645 s, 0.0 kB/s
>     mkswap: f: warning: don't erase bootbits sectors
>             (gpt partition table detected). Use -f to force.
>     Setting up swapspace version 1, size = 30716 KiB
>     no label, UUID=d8af74af-b83d-487d-9160-a7d9827f2e47
>     ok
> 
> Note the warning.
> I'll bet the 12.1 version of mkswap now requires --force in that case.

Hmm, no, it still works without --force:

$ dd if=/dev/null of=f bs=1 seek=30M && 
../build/multibuild-1650/linux/parted-3.0.136-1f80/parted/parted -s f mklabel 
gpt && /sbin/mkswap f && echo ok
0+0 Datensätze ein
0+0 Datensätze aus
0 Bytes (0 B) kopiert, 5,0356e-05 s, 0,0 kB/s
mkswap: f: warning: don't erase bootbits sectors
        (gpt partition table detected). Use -f to force.
Setting up swapspace version 1, size = 30716 KiB
kein Label, UUID=e38425cd-369b-4a84-8d3e-4097f8e39110
ok

> With the change below, that sole failing test should now pass:
> 
>     make check -C tests TESTS=t9050-partition-table-types.sh VERBOSE=yes
> 
> 
> From c1c69bfc3613d9e45dbc7e3214b4a99af38c6f81 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <address@hidden>
> Date: Sun, 19 Feb 2012 15:31:58 +0100
> Subject: [PATCH] tests: use mkswap's -f option; do not discard mkswap output
> 
> * tests/t9050-partition-table-types.sh: Do not discard mkswap
> output and diagnostics.
> Use mkswap's -f option: required when overwriting an existing
> partition table, at least on OpenSUSE 12.1.
> Reported by Bruno Haible.
> ---
>  tests/t9050-partition-table-types.sh |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/t9050-partition-table-types.sh 
> b/tests/t9050-partition-table-types.sh
> index 563b2e8..84840f2 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 f || fail=1;;
>        *) parted -s f mklabel $i || fail=1;; esac
>      case $j in mkswap) continue;; esac
>      parted -s f mklabel $j || fail=1

No, this patch does not fix the problem, but it gives a clue to the cause:

$ make check -C tests TESTS=t9050-partition-table-types.sh VERBOSE=yes
...
+ echo mkswap:bsd
mkswap:bsd
+ case $i in
+ mkswap -f f
./t9050-partition-table-types.sh: line 44: mkswap: command not found
+ fail=1
...

So, the reason was that 'mkswap' is not found in $PATH. (It's in /sbin,
which is not in $PATH of a non-root user in this distro.)

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]