* tests: blkid/md-raid1-part fails
@ 2012-07-31 5:52 Bernhard Voelker
2012-07-31 13:51 ` Karel Zak
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Voelker @ 2012-07-31 5:52 UTC (permalink / raw)
To: util-linux@vger.kernel.org
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/expected/blkid/md-raid1-part 2012-07-27 09:54:03.769967754 +0200
+++ /media/sdb5/berny/git/util-linux/tests/output/blkid/md-raid1-part 2012-07-31 07:18:24.057815522 +0200
@@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: tests: blkid/md-raid1-part fails
2012-07-31 5:52 tests: blkid/md-raid1-part fails Bernhard Voelker
@ 2012-07-31 13:51 ` Karel Zak
2012-07-31 14:38 ` Bernhard Voelker
0 siblings, 1 reply; 6+ messages in thread
From: Karel Zak @ 2012-07-31 13:51 UTC (permalink / raw)
To: Bernhard Voelker; +Cc: util-linux@vger.kernel.org
On Tue, Jul 31, 2012 at 07:52:55AM +0200, Bernhard Voelker wrote:
> 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/expected/blkid/md-raid1-part 2012-07-27 09:54:03.769967754 +0200
> +++ /media/sdb5/berny/git/util-linux/tests/output/blkid/md-raid1-part 2012-07-31 07:18:24.057815522 +0200
> @@ -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?
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
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: tests: blkid/md-raid1-part fails
2012-07-31 13:51 ` Karel Zak
@ 2012-07-31 14:38 ` Bernhard Voelker
2012-07-31 18:03 ` Karel Zak
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Voelker @ 2012-07-31 14:38 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux@vger.kernel.org
On 07/31/2012 03:51 PM, Karel Zak wrote:
> On Tue, Jul 31, 2012 at 07:52:55AM +0200, Bernhard Voelker wrote:
>> 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
Here it comes ;-)
Have a nice day,
Berny
>From bc2628ebe22174fb2f459e6229d846eb4b776380 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <mail@bernhard-voelker.de>
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.
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
---
tests/expected/blkid/md-raid1-part | 12 ++++++------
tests/ts/blkid/md-raid1-part | 10 ++++++----
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/tests/expected/blkid/md-raid1-part b/tests/expected/blkid/md-raid1-part
index d1e9cc9..ce93b73 100644
--- a/tests/expected/blkid/md-raid1-part
+++ b/tests/expected/blkid/md-raid1-part
@@ -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
diff --git a/tests/ts/blkid/md-raid1-part b/tests/ts/blkid/md-raid1-part
index 634c9a1..e13901d 100755
--- a/tests/ts/blkid/md-raid1-part
+++ b/tests/ts/blkid/md-raid1-part
@@ -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
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: tests: blkid/md-raid1-part fails
2012-07-31 14:38 ` Bernhard Voelker
@ 2012-07-31 18:03 ` Karel Zak
2012-08-01 6:21 ` Bernhard Voelker
0 siblings, 1 reply; 6+ messages in thread
From: Karel Zak @ 2012-07-31 18:03 UTC (permalink / raw)
To: Bernhard Voelker; +Cc: util-linux@vger.kernel.org
On Tue, Jul 31, 2012 at 04:38:52PM +0200, Bernhard Voelker wrote:
> tests/expected/blkid/md-raid1-part | 12 ++++++------
> tests/ts/blkid/md-raid1-part | 10 ++++++----
> 2 files changed, 12 insertions(+), 10 deletions(-)
Applied, thanks!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: tests: blkid/md-raid1-part fails
2012-07-31 18:03 ` Karel Zak
@ 2012-08-01 6:21 ` Bernhard Voelker
2012-08-01 8:40 ` Karel Zak
0 siblings, 1 reply; 6+ messages in thread
From: Bernhard Voelker @ 2012-08-01 6:21 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux@vger.kernel.org
On 07/31/2012 08:03 PM, Karel Zak wrote:
> On Tue, Jul 31, 2012 at 04:38:52PM +0200, Bernhard Voelker wrote:
>> 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
>> tests/ts/blkid/md-raid1-part | 10 ++++++----
in commit v2.22-rc1-21-gebb8577.
What happened?
Have a nice day,
Berny
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: tests: blkid/md-raid1-part fails
2012-08-01 6:21 ` Bernhard Voelker
@ 2012-08-01 8:40 ` Karel Zak
0 siblings, 0 replies; 6+ messages in thread
From: Karel Zak @ 2012-08-01 8:40 UTC (permalink / raw)
To: Bernhard Voelker; +Cc: util-linux@vger.kernel.org
On Wed, Aug 01, 2012 at 08:21:15AM +0200, Bernhard Voelker wrote:
> On 07/31/2012 08:03 PM, Karel Zak wrote:
> > On Tue, Jul 31, 2012 at 04:38:52PM +0200, Bernhard Voelker wrote:
> >> 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
>
> >> tests/ts/blkid/md-raid1-part | 10 ++++++----
>
> in commit v2.22-rc1-21-gebb8577.
Sorry, fixed.
> What happened?
I have applied the patch manually...
Cannot you send the patches by 'git send-email' command?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-08-01 8:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 5:52 tests: blkid/md-raid1-part fails Bernhard Voelker
2012-07-31 13:51 ` Karel Zak
2012-07-31 14:38 ` Bernhard Voelker
2012-07-31 18:03 ` Karel Zak
2012-08-01 6:21 ` Bernhard Voelker
2012-08-01 8:40 ` Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).