GNU bug report logs - #32810
As Bug of "parted": Do not need show this message = not a error

Previous Next

Package: parted;

Reported by: ПИван Петров <oknaassortiment <at> gmail.com>

Date: Sun, 23 Sep 2018 13:06:01 UTC

Severity: normal

To reply to this bug, email your comments to 32810 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#32810; Package parted. (Sun, 23 Sep 2018 13:06:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to ПИван Петров <oknaassortiment <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Sun, 23 Sep 2018 13:06:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: ПИван Петров <oknaassortiment <at> gmail.com>
To: bug-parted <at> gnu.org
Subject: As Bug of "parted": Do not need show this message = not a error
Date: Sun, 23 Sep 2018 16:04:58 +0300
[Message part 1 (text/plain, inline)]
Reason of this "message bug" is: search line with "###" !

========== Output =====================
root <at> machine:/home/user# dd if=/dev/zero of=/dev/sdb status=progress bs=128M
dd: write error '/dev/sdb': No free space on device
9+0 got records
8+0 sent records
1073741824 bytes (1,1 GB, 1,0 GiB) copied, 0,962915 s, 1,1 GB/s

root <at> machine:/home/user# parted --machine /dev/sdb unit B print free quit
Ошибка: /dev/sdb: метка диска не определена   ###: (translated: "Error:
/dev/sdb: label of disk not defined")
BYT;
/dev/sdb:1073741824B:scsi:512:512:unknown:VMware, VMware Virtual S:;

root <at> machine:/home/user# $?
0: command not found

root <at> machine:/home/user# parted --version
parted (GNU parted) 3.2
Copyright © 2014 Free Software Foundation, Inc.
Лицензия GPLv3+: GNU GPL версии 3 или новее <
http://gnu.org/licenses/gpl.html>
Это свободное ПО: вы можете продавать и распространять его.
Нет НИКАКИХ ГАРАНТИЙ до степени, разрешённой законом.

Автор программы — <
http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.

root <at> machine:/home/user# uname -a
Linux machine 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018
x86_64 x86_64 x86_64 GNU/Linux
============= End Output ==============================

I think, that the message "###" is not a error, because:
1. already undestand, that the disk cant have disk table and do not have
labels of partitions (already="unknown" table)
2. for "--machine" output need strong/constantly output, without "sudden
messages" (without ";" at end of line)

Please remove this message from stderr - it is not a error and this message
hinder to "--machine" output!
[Message part 2 (text/html, inline)]

Information forwarded to bug-parted <at> gnu.org:
bug#32810; Package parted. (Mon, 24 Sep 2018 11:26:02 GMT) Full text and rfc822 format available.

Message #8 received at 32810 <at> debbugs.gnu.org (full text, mbox):

From: ПИван Петров <oknaassortiment <at> gmail.com>
To: 32810 <at> debbugs.gnu.org
Subject: May be it programmer mistake
Date: Mon, 24 Sep 2018 14:25:17 +0300
[Message part 1 (text/plain, inline)]
In addition of previous message, i want to say, that after "BYT;" goes 70!
spaces before LineFeed("\n").
[Message part 2 (text/html, inline)]

Information forwarded to bug-parted <at> gnu.org:
bug#32810; Package parted. (Mon, 24 Sep 2018 14:43:02 GMT) Full text and rfc822 format available.

Message #11 received at 32810 <at> debbugs.gnu.org (full text, mbox):

From: ПИван Петров <oknaassortiment <at> gmail.com>
To: 32810 <at> debbugs.gnu.org
Subject: It 100% Bug (Output contains controlled symbols)
Date: Mon, 24 Sep 2018 17:42:14 +0300
[Message part 1 (text/plain, inline)]
If replace "parted --machine /dev/sdb unit B print free quit" execution by
Python script:
#========== Python script =====================
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import subprocess;

def GetPartedOutput(diskPath):
result = {}
commandParams = ['parted', '--machine', diskPath, \
'unit', 'B', 'print', 'free', 'quit']

runObj = subprocess.run(commandParams, \
stdout=subprocess.PIPE, \
stderr=subprocess.PIPE, \
check=True)
errorsOutput = runObj.stderr.decode('utf-8')
output = runObj.stdout.decode('utf-8')
hexiText = "".join("({}_{:02x})".format(letter, ord(letter)) for letter in
output)
print(errorsOutput + output)
print('========== hexiText ==========')
print('ou:' + hexiText + ':ou')

GetPartedOutput('/dev/sdb')
#========== End Python script ==================================

================ Then will be Output: ==============
root <at> machine:/home/user# '/home/user/Рабочий стол/test.py'
Ошибка: /dev/sdb: метка диска не определена
BYT;
/dev/sdb:1073741824B:scsi:512:512:unknown:VMware, VMware Virtual S:;

========== hexiText ==========
_0d)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)(
_20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)(
_20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)(
_20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)(
_20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)( _20)(
_20)( _20)( _20)( _20)( _20)( _20)( _20)_0d)(B_42)(Y_59)(T_54)(;_3b)()(
_20)( _20)( _20)(
_0a)(/_2f)(d_64)(e_65)(v_76)(/_2f)(s_73)(d_64)(b_62)(:_3a)(1_31)(0_30)(7_37)(3_33)(7_37)(4_34)(1_31)(8_38)(2_32)(4_34)(B_42)(:_3a)(s_73)(c_63)(s_73)(i_69)(:_3a)(5_35)(1_31)(2_32)(:_3a)(5_35)(1_31)(2_32)(:_3a)(u_75)(n_6e)(k_6b)(n_6e)(o_6f)(w_77)(n_6e)(:_3a)(V_56)(M_4d)(w_77)(a_61)(r_72)(e_65)(,_2c)(
_20)(V_56)(M_4d)(w_77)(a_61)(r_72)(e_65)(
_20)(V_56)(i_69)(r_72)(t_74)(u_75)(a_61)(l_6c)( _20)(S_53)(:_3a)(;_3b)(
_0a):ou
=============== End Output ===========================

1. This "Output" contains "Carrage return" as 1st simbol
2. Then contains a lot of spaces.
3. After "BYT;" - has symbol, that i can't recognaize (I am not cool Python
programmer :-) )
4 and than goes 3 spaces (after this symbol)

I think, that it is very bad output/ These symbols not must be in output!!!

PS: Before, i rebooted and a lot of spaces was after "BYT;" (but i have not
this python script)
[Message part 2 (text/html, inline)]

Information forwarded to bug-parted <at> gnu.org:
bug#32810; Package parted. (Mon, 15 Oct 2018 17:55:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: bug-parted <at> gnu.org
Subject: Re: bug#32810: As Bug of "parted": Do not need show this message =
 not a error
Date: Mon, 15 Oct 2018 10:54:05 -0700
On Sun, Sep 23, 2018 at 04:04:58PM +0300, ПИван Петров wrote:
> Reason of this "message bug" is: search line with "###" !
> 
> ========== Output =====================
> root <at> machine:/home/user# dd if=/dev/zero of=/dev/sdb status=progress bs=128M
> dd: write error '/dev/sdb': No free space on device
> 9+0 got records
> 8+0 sent records
> 1073741824 bytes (1,1 GB, 1,0 GiB) copied, 0,962915 s, 1,1 GB/s
> 
> root <at> machine:/home/user# parted --machine /dev/sdb unit B print free quit
> Ошибка: /dev/sdb: метка диска не определена   ###: (translated: "Error:
> /dev/sdb: label of disk not defined")
> BYT;
> /dev/sdb:1073741824B:scsi:512:512:unknown:VMware, VMware Virtual S:;
> 
> root <at> machine:/home/user# $?
> 0: command not found

If you use --script it will return a 1 in this case.


> 
> root <at> machine:/home/user# parted --version
> parted (GNU parted) 3.2
> Copyright © 2014 Free Software Foundation, Inc.
> Лицензия GPLv3+: GNU GPL версии 3 или новее <
> http://gnu.org/licenses/gpl.html>
> Это свободное ПО: вы можете продавать и распространять его.
> Нет НИКАКИХ ГАРАНТИЙ до степени, разрешённой законом.
> 
> Автор программы — <
> http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.
> 
> root <at> machine:/home/user# uname -a
> Linux machine 4.15.0-34-generic #37-Ubuntu SMP Mon Aug 27 15:21:48 UTC 2018
> x86_64 x86_64 x86_64 GNU/Linux
> ============= End Output ==============================
> 
> I think, that the message "###" is not a error, because:
> 1. already undestand, that the disk cant have disk table and do not have
> labels of partitions (already="unknown" table)
> 2. for "--machine" output need strong/constantly output, without "sudden
> messages" (without ";" at end of line)
> 
> Please remove this message from stderr - it is not a error and this message
> hinder to "--machine" output!

I agree, somewhat, but it would be difficult to squash parted's normal
exception handling for cases like this. Note that it *is* output on
stderr so if you don't want to capture it just grab stdout. And if you
use --script it will return a proper error result code.

-- 
Brian C. Lane (PST8PDT)




Information forwarded to bug-parted <at> gnu.org:
bug#32810; Package parted. (Mon, 15 Oct 2018 17:56:02 GMT) Full text and rfc822 format available.

Message #17 received at 32810 <at> debbugs.gnu.org (full text, mbox):

From: "Brian C. Lane" <bcl <at> redhat.com>
To: ПИван Петров <oknaassortiment <at> gmail.com>
Cc: 32810 <at> debbugs.gnu.org
Subject: Re: bug#32810: It 100% Bug (Output contains controlled symbols)
Date: Mon, 15 Oct 2018 10:55:20 -0700
On Mon, Sep 24, 2018 at 05:42:14PM +0300, ПИван Петров wrote:
> If replace "parted --machine /dev/sdb unit B print free quit" execution by
> Python script:

An easier way is to pipe it to hexdump -C :)

The spaces are there on purpose, output by wipe_line() in parted/ui.c

If you use --script they are not output.

-- 
Brian C. Lane (PST8PDT)




This bug report was last modified 6 years and 245 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.