linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] Option for scsi_debug to fake removable devices
@ 2012-07-10  9:22 Martin Pitt
  2012-07-10  9:24 ` [PATCH 1/1] [SCSI] scsi_debug: Add "removable" parameter Martin Pitt
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Pitt @ 2012-07-10  9:22 UTC (permalink / raw)
  To: James E.J. Bottomley, linux-scsi; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1889 bytes --]

Hello all,

sorry for resending this twice to the lists. Initially I thought
mailing James directly was not appropriate, but I was now told that
get_maintainer.pl is actually speaking the truth and I am supposed to
do just that.


For the purposes of automatically testing udisks and gvfs automounting
I would like to add a parameter to scsi_debug to control the
"removable" attribute of the created block device. With that, we can
test system-internal and removable drives, as well as CD-ROMs (which
scsi_debug can already emulate). udisks requires different privileges
for mounting system-internal drives vs.  removable/hotpluggable
drives. This will also allow us to write system integration tests for
gvfs, which will exercise the whole stack including the actual polkit
configuration in a VM.

I wrote a simple kernel patch for this (against linux-next), and
tested this quite thoroughly.

I ran the style checker, and it reports two problems:

------------ 8< --------------
WARNING: line over 80 characters
#109: FILE: drivers/scsi/scsi_debug.c:3255:
+       ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_removable);

WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
#126: FILE: drivers/scsi/scsi_debug.c:3353:
+               printk(KERN_ERR "scsi_debug_init: removable must be 0 or 1\n");
------------ 8< --------------

But as the existing code uses this style in the adjacent lines, I
favored consistency over fixing those. If the latter is desired, I'd
rather send a separate patch with just the style cleanup for the whole
file.

I got an ack from David Zeuthen (the primary udisks maintainer)
already, noted so in the patch.

Thank you in advance for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 0/1] Option for scsi_debug to fake removable devices
@ 2012-09-06 10:03 Martin Pitt
  0 siblings, 0 replies; 6+ messages in thread
From: Martin Pitt @ 2012-09-06 10:03 UTC (permalink / raw)
  To: James E.J. Bottomley, linux-scsi; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1817 bytes --]

Hello all,

I already re-sent this 1.5 months ago, but did not get any answer back
then; I guess it got lost in the noise by now. So, patiently retrying
again.

For the purposes of automatically testing udisks and gvfs automounting
I would like to add a parameter to scsi_debug to control the
"removable" attribute of the created block device. With that, we can
test system-internal and removable drives, as well as CD-ROMs (which
scsi_debug can already emulate). udisks requires different privileges
for mounting system-internal drives vs.  removable/hotpluggable
drives. This will also allow us to write system integration tests for
gvfs, which will exercise the whole stack including the actual polkit
configuration in a VM.

I wrote a simple kernel patch for this (against linux-next), and
tested this quite thoroughly.

I ran the style checker, and it reports two problems:

------------ 8< --------------
WARNING: line over 80 characters
#109: FILE: drivers/scsi/scsi_debug.c:3255:
+       ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_removable);

WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
#126: FILE: drivers/scsi/scsi_debug.c:3353:
+               printk(KERN_ERR "scsi_debug_init: removable must be 0 or 1\n");
------------ 8< --------------

But as the existing code uses this style in the adjacent lines, I
favored consistency over fixing those. If the latter is desired, I'd
rather send a separate patch with just the style cleanup for the whole
file.

I got an ack from David Zeuthen (the primary udisks maintainer)
already, noted so in the patch.

Thank you in advance for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 0/1] Option for scsi_debug to fake removable devices
@ 2012-06-05  7:25 Martin Pitt
  2012-06-05 18:10 ` Rolf Eike Beer
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Pitt @ 2012-06-05  7:25 UTC (permalink / raw)
  To: linux-scsi; +Cc: linux-kernel, David Zeuthen, Kay Sievers

[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]

Hello all,

For the purposes of automatically testing udisks and gvfs automounting
I would like to add a parameter to scsi_debug to control the
"removable" attribute of the created block device. With that, we can
test system-internal and removable drives, as well as CD-ROMs (which
scsi_debug can already emulate). udisks requires different privileges
for mounting system-internal drives vs.  removable/hotpluggable
drives.

I wrote a simple kernel patch for this (against linux-next), and
tested this quite thoroughly.

I ran the style checker, and it reports two problems:

------------ 8< --------------
WARNING: line over 80 characters
#109: FILE: drivers/scsi/scsi_debug.c:3255:
+       ret |= driver_create_file(&sdebug_driverfs_driver, &driver_attr_removable);

WARNING: Prefer pr_err(... to printk(KERN_ERR, ...
#126: FILE: drivers/scsi/scsi_debug.c:3353:
+               printk(KERN_ERR "scsi_debug_init: removable must be 0 or 1\n");
------------ 8< --------------

But as the existing code uses this style in the adjacent lines, I
favored consistency over fixing those. If the latter is desired, I'd
rather send a separate patch with just the style cleanup for the whole
file.

I got a signoff from David Zeuthen (the primary udisks maintainer)
already, noted so in the patch.

Thank you in advance for considering,

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-06 10:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10  9:22 [PATCH 0/1] Option for scsi_debug to fake removable devices Martin Pitt
2012-07-10  9:24 ` [PATCH 1/1] [SCSI] scsi_debug: Add "removable" parameter Martin Pitt
  -- strict thread matches above, loose matches on Subject: below --
2012-09-06 10:03 [PATCH 0/1] Option for scsi_debug to fake removable devices Martin Pitt
2012-06-05  7:25 Martin Pitt
2012-06-05 18:10 ` Rolf Eike Beer
2012-06-06  4:08   ` Martin Pitt

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).