* fstests: Don't use gawk's strtonum breaking existing fstests
@ 2019-12-11 15:53 Nikolay Borisov
2019-12-11 16:33 ` Nikolay Borisov
0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Borisov @ 2019-12-11 15:53 UTC (permalink / raw)
To: slash; +Cc: Eryu Guan, linux-btrfs
Hello,
Following upstream commit:
https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=37520a314bd472ed720ed0611c6b69e418be9b61
breaks btrfs/095 and btrfs/098 tests.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fstests: Don't use gawk's strtonum breaking existing fstests
2019-12-11 15:53 fstests: Don't use gawk's strtonum breaking existing fstests Nikolay Borisov
@ 2019-12-11 16:33 ` Nikolay Borisov
2019-12-12 5:16 ` Qu Wenruo
0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Borisov @ 2019-12-11 16:33 UTC (permalink / raw)
To: slash; +Cc: Eryu Guan, linux-btrfs
On 11.12.19 г. 17:53 ч., Nikolay Borisov wrote:
> Hello,
>
> Following upstream commit:
> https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=37520a314bd472ed720ed0611c6b69e418be9b61
>
> breaks btrfs/095 and btrfs/098 tests.
>
The problem is that the old code was using gawk's strtonum and returning
a base 10 number from an octal input. Whereas the existing code gets an
octal number which is again parsed as an octal when using printf. So the
path in question needs to either by reverted or extended so that the
necessary conversion from octal to base 10 is performed _before_ calling
printf.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fstests: Don't use gawk's strtonum breaking existing fstests
2019-12-11 16:33 ` Nikolay Borisov
@ 2019-12-12 5:16 ` Qu Wenruo
2019-12-12 9:31 ` Nikolay Borisov
0 siblings, 1 reply; 4+ messages in thread
From: Qu Wenruo @ 2019-12-12 5:16 UTC (permalink / raw)
To: Nikolay Borisov, slash; +Cc: Eryu Guan, linux-btrfs
On 2019/12/12 上午12:33, Nikolay Borisov wrote:
>
>
> On 11.12.19 г. 17:53 ч., Nikolay Borisov wrote:
>> Hello,
>>
>> Following upstream commit:
>> https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=37520a314bd472ed720ed0611c6b69e418be9b61
>>
>> breaks btrfs/095 and btrfs/098 tests.
>>
>
> The problem is that the old code was using gawk's strtonum and returning
> a base 10 number from an octal input. Whereas the existing code gets an
> octal number which is again parsed as an octal when using printf. So the
> path in question needs to either by reverted or extended so that the
> necessary conversion from octal to base 10 is performed _before_ calling
> printf.
>
Well, octal values really makes no sense. We should go either hex, or
human readable decimal.
Octal should only be left for certain historical use cases, like user
privileges. For content dump, octal is never a good use case to show offset.
Since current filter_od can't handle -Ax yet, what about just use hash
instead of the problem prone od?
And put the od output into seqres.full for later debug?
Thanks,
Qu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fstests: Don't use gawk's strtonum breaking existing fstests
2019-12-12 5:16 ` Qu Wenruo
@ 2019-12-12 9:31 ` Nikolay Borisov
0 siblings, 0 replies; 4+ messages in thread
From: Nikolay Borisov @ 2019-12-12 9:31 UTC (permalink / raw)
To: Qu Wenruo, slash; +Cc: Eryu Guan, linux-btrfs
On 12.12.19 г. 7:16 ч., Qu Wenruo wrote:
>
>
> On 2019/12/12 上午12:33, Nikolay Borisov wrote:
>>
>>
>> On 11.12.19 г. 17:53 ч., Nikolay Borisov wrote:
>>> Hello,
>>>
>>> Following upstream commit:
>>> https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=37520a314bd472ed720ed0611c6b69e418be9b61
>>>
>>> breaks btrfs/095 and btrfs/098 tests.
>>>
>>
>> The problem is that the old code was using gawk's strtonum and returning
>> a base 10 number from an octal input. Whereas the existing code gets an
>> octal number which is again parsed as an octal when using printf. So the
>> path in question needs to either by reverted or extended so that the
>> necessary conversion from octal to base 10 is performed _before_ calling
>> printf.
>>
>
> Well, octal values really makes no sense. We should go either hex, or
> human readable decimal.
>
> Octal should only be left for certain historical use cases, like user
> privileges. For content dump, octal is never a good use case to show offset.
>
> Since current filter_od can't handle -Ax yet, what about just use hash
> instead of the problem prone od?
> And put the od output into seqres.full for later debug?
I disagree, using the output of od one can see the actual content of
extents and can quickly diagnose the failure.
>
> Thanks,
> Qu
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-12-12 9:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-11 15:53 fstests: Don't use gawk's strtonum breaking existing fstests Nikolay Borisov
2019-12-11 16:33 ` Nikolay Borisov
2019-12-12 5:16 ` Qu Wenruo
2019-12-12 9:31 ` Nikolay Borisov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox