tests: blkid/md-raid1-part fails
The above mentioned test fails here (OpenSuSE-12.1 64-bit).
That's in diff/blkid/md-raid1-part:
media/sdb5/berny/git/util-linux/tests/output/blkid/md-raid1-part renamed from media/sdb5/berny/git/util-linux/tests/expected/blkid/md-raid1-part +2 -2
@@ -44,7 +44,7 @@ ID_FS_VERSION=0.90.0 -ID_PART_ENTRY_DISK=8:16 +ID_PART_ENTRY_DISK=8:112 ID_PART_ENTRY_NUMBER=1 ID_PART_ENTRY_OFFSET=2048 ID_PART_ENTRY_SCHEME=dos
@@ -56,7 +56,7 @@ ID_FS_VERSION=0.90.0 -ID_PART_ENTRY_DISK=8:16 +ID_PART_ENTRY_DISK=8:112 ID_PART_ENTRY_NUMBER=2 ID_PART_ENTRY_OFFSET=53248 ID_PART_ENTRY_SCHEME=dos
What's wrong with that minor number?
Have a nice day,
Berny
Karel Zak
maintainerQuoted 25 lines · Bernhard Voelker
The above mentioned test fails here (OpenSuSE-12.1 64-bit).
That's in diff/blkid/md-raid1-part:
media/sdb5/berny/git/util-linux/tests/output/blkid/md-raid1-part renamed from media/sdb5/berny/git/util-linux/tests/expected/blkid/md-raid1-part +2
-2@@ -44,7 +44,7 @@ ID_FS_VERSION=0.90.0 -ID_PART_ENTRY_DISK=8:16 +ID_PART_ENTRY_DISK=8:112 ID_PART_ENTRY_NUMBER=1 ID_PART_ENTRY_OFFSET=2048 ID_PART_ENTRY_SCHEME=dos@@ -56,7 +56,7 @@ ID_FS_VERSION=0.90.0 -ID_PART_ENTRY_DISK=8:16 +ID_PART_ENTRY_DISK=8:112 ID_PART_ENTRY_NUMBER=2 ID_PART_ENTRY_OFFSET=53248 ID_PART_ENTRY_SCHEME=dos
Quoted 1 line
What's wrong with that minor number?
Nothing, it would be better to check if the line ID_PART_ENTRY_DISK= is in the $TS_OUTPUT and if yes then remove the line from the output file (e.g. by sed).
The tests should not rely on device numbers and device names -- on another places you can found /dev/loop0 in the expected outputs...
Patches wanted :-)
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 7 lines · Karel Zak
Quoted 1 line · Bernhard Voelker
What's wrong with that minor number?
Nothing, it would be better to check if the line ID_PART_ENTRY_DISK= is in the $TS_OUTPUT and if yes then remove the line from the output file (e.g. by sed).
Quoted 6 lines
The tests should not rely on device numbers and device names -- on another places you can found
/dev/loop0in the expected outputs...Patches wanted :-)
Karel
Here it comes ;-)
Have a nice day,
Berny
Quoted 1 line
From
bc2628ebe22174fb2f459e6229d846eb4b776380Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <[email protected]>
Date: Tue, 31 Jul 2012 16:36:35 +0200
Subject: [PATCH] tests: make blkid/md-raid1-part more robust
* tests/expected/blkid/mk-raid1-part: Replace major and minor number of ID_PART_ENTRY_DISK by a special string. Add ID_FS_UUID and ID_FS_UUID_ENC again, also with a special string.
* tests/ts/blkid/md-raid1-part: Before comparing the expected output with the actual output, replace the values of ID_PART_ENTRY_DISK, ID_FS_UUID and ID_FS_UUID_ENC with the speacial strings mentioned above.
--- tests/expected/blkid/md-raid1-part | 12 ++++++------ tests/ts/blkid/md-raid1-part | 10 ++++++---- 2 files changed, 12 insertions(+), 10 deletions(-)
tests/expected/blkid/md-raid1-part +6 -6
@@ -41,10 +41,10 @@ ID_PART_TABLE_TYPE=dos Probe first RAID member ID_FS_TYPE=linux_raid_member ID_FS_USAGE=raid - - +ID_FS_UUID=__ts_uuid__ +ID_FS_UUID_ENC=__ts_uuid_enc__ ID_FS_VERSION=0.90.0 -ID_PART_ENTRY_DISK=8:16 +ID_PART_ENTRY_DISK=__ts_majorminor__ ID_PART_ENTRY_NUMBER=1 ID_PART_ENTRY_OFFSET=2048 ID_PART_ENTRY_SCHEME=dos
@@ -53,10 +53,10 @@ ID_PART_ENTRY_TYPE=0x83 Probe second RAID member ID_FS_TYPE=linux_raid_member ID_FS_USAGE=raid - - +ID_FS_UUID=__ts_uuid__ +ID_FS_UUID_ENC=__ts_uuid_enc__ ID_FS_VERSION=0.90.0 -ID_PART_ENTRY_DISK=8:16 +ID_PART_ENTRY_DISK=__ts_majorminor__ ID_PART_ENTRY_NUMBER=2 ID_PART_ENTRY_OFFSET=53248 ID_PART_ENTRY_SCHEME=dos
tests/ts/blkid/md-raid1-part +6 -4
@@ -59,8 +59,6 @@ sleep 3 MD_DEVNAME=md8 MD_DEVICE=/dev/${MD_DEVNAME} -###exit 1 - ts_log "Create RAID1 device" /sbin/mdadm -q -S ${MD_DEVICE} &> /dev/null /sbin/mdadm -q --create ${MD_DEVICE} --metadata=0.90 --chunk=64 --level=1 \
@@ -83,7 +81,11 @@ sleep 3 rmmod scsi_debug ts_fdisk_clean -# remove generated UUIDs -sed -i -e 's/ID_FS_UUID.*//g' $TS_OUTPUT +# substitue UUIDs and major/minor number before comparison +sed -i \ + -e 's/^\(ID_FS_UUID\)=.*/\1=__ts_uuid__/' \ + -e 's/^\(ID_FS_UUID_ENC\)=.*/\1=__ts_uuid_enc__/' \ + -e 's/^\(ID_PART_ENTRY_DISK\)=.*/\1=__ts_majorminor__/' \ + $TS_OUTPUT ts_finalize
Signature · 1 line
1.7.7
Quoted 3 lines · Bernhard Voelker
tests/expected/blkid/md-raid1-part | 12 ++++++------ tests/ts/blkid/md-raid1-part | 10 ++++++---- 2 files changed, 12 insertions(+), 10 deletions(-)
Applied, thanks!
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 6 lines · Karel Zak
Quoted 3 lines · Bernhard Voelker
tests/expected/blkid/md-raid1-part | 12 ++++++------ tests/ts/blkid/md-raid1-part | 10 ++++++---- 2 files changed, 12 insertions(+), 10 deletions(-)Applied, thanks!
Hi Karel,
I'm missing that change
Quoted 1 line
Quoted 1 line
tests/ts/blkid/md-raid1-part | 10 ++++++----
in commit v2.22-rc1-21-gebb8577.
What happened?
Have a nice day,
Berny
Karel Zak
maintainerQuoted 8 lines · Bernhard Voelker
Quoted 6 lines · Karel Zak
Quoted 3 lines · Bernhard Voelker
tests/expected/blkid/md-raid1-part | 12 ++++++------ tests/ts/blkid/md-raid1-part | 10 ++++++---- 2 files changed, 12 insertions(+), 10 deletions(-)Applied, thanks!
Quoted 7 lines
Hi Karel,
I'm missing that change
Quoted 1 line
Quoted 1 line
tests/ts/blkid/md-raid1-part | 10 ++++++----in commit v2.22-rc1-21-gebb8577.
Sorry, fixed.
Quoted 1 line
What happened?
I have applied the patch manually...
Cannot you send the patches by 'git send-email' command?
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com