[GIT v3] softdep: now with testing cheese, bugfixes and docs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've come as far as I can go at the moment, I think.

Since the last update, tests and docs have been added and a few bugs
have been fixed. Replacing the install commands with their softdep
equivalents in /etc/modprobe.d/alsa-base.conf have been tested as
well.

These are the relevant lines from alsa-base.conf, for my system. I've
omitted the ones that aren't used on my system, for brevity:

softdep snd-pcm post: snd-pcm-oss
softdep snd-mixer post: snd-mixer-oss
softdep snd-seq post: snd-seq-midi snd-seq-oss
softdep snd-rawmidi post: snd-seq-midi

Running lsmod before and after the change (and a reboot) yields the
same result so it must have worked. :)

Finally, someone suggested in a private mail that we implement
softdeps in .modinfo, much the same way as aliases are. If you don't
have any objections, I'll go ahead and start working on that.

Browsable commits:
http://github.com/andr345/module-init-tools/commits/modprobe-softdep/

Pull-request:
The following changes since commit fdae0df92cf48e02b89376a67e405191e2949977:
  Jon Masters (1):
        module-init-tools v3.11-rc1

are available in the git repository at:

  git://github.com/andr345/module-init-tools.git modprobe-softdep

Andreas Robinson (12):
      modprobe: reduce nesting in conf parser
      modprobe: cleanup indentation change in conf parser
      modprobe: put configuration objects in a struct
      modprobe: enable calling do_modprobe from within
handle_module,insmod,rmmod
      modprobe: don't modify the modname string passed to do_modprobe
      modprobe: add softdep command
      elfops: remove errfn_t from load_strings
      modprobe: add simple softdep loop detector

(The new commits start here)

      test: add softdep test, modprobe: fix simple bugs in do_softdep
      modprobe: softdep now handles mock modules
      doc: added softdep command
      modprobe: change softdep --pre/--post to pre:/post:

 depmod.c                         |    8 +-
 doc/modprobe.conf.sgml           |   36 +++
 elfops.h                         |    2 +-
 elfops_core.c                    |   11 +-
 modinfo.c                        |    2 +-
 modprobe.c                       |  453 ++++++++++++++++++++++++++------------
 tests/test-modprobe/28softdep.sh |   77 +++++++
 7 files changed, 437 insertions(+), 152 deletions(-)
 create mode 100644 tests/test-modprobe/28softdep.sh

-------------------------------

The log:

commit e13a554bb4b175f57253e613007a9c50d69bbbe8
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sat Oct 3 20:07:15 2009 +0200

    modprobe: reduce nesting in conf parser

    Helps readability and will simplify the softdep command parser.

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit bc334ddccd70b30f79983d1dff6eef2e652d054a
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sat Oct 3 20:18:35 2009 +0200

    modprobe: cleanup indentation change in conf parser

    Follow up to the previous commit.

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit 62208953d789c8510ecb8adfe0a564bcc1ebbdfd
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sat Oct 3 20:22:48 2009 +0200

    modprobe: put configuration objects in a struct

    It is now possible to add or remove conf commands without rewriting
    the function declarations of e.g parse_config_*() every time.

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit 13256ef2df49f613ad6b7de7617001ed464229ff
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sat Oct 3 20:39:21 2009 +0200

    modprobe: enable calling do_modprobe from within handle_module,insmod,rmmod

    A new function, do_softdep(), will be invoked from the same locations
    as do_command() as it eventually will replace it. do_softdep() in turn
    needs to call do_modprobe().

    This commit adds some parameters to do_modprobe, handle_module,
    insmod and rmmod, needed to make this possible.

    The pathnames for "module.symbols" and "modules.alias" are now
    generated wherever they're needed, rather than in main().

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit 36b8d179a5ae4a3c2a27a869bcbfd535d7d4a2e0
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sat Oct 3 21:20:23 2009 +0200

    modprobe: don't modify the modname string passed to do_modprobe

    The function will work on a copy instead.

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit b8fef87bd628dfaf0f1e43420be1ed4e49f9d35b
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sat Oct 3 21:30:18 2009 +0200

    modprobe: add softdep command

    Imlementation notes
    -------------------

    * find_softdep()/do_softdep() mirrors find_command()/do_command()
      precisely. (And if they don't, that's a bug.)

    * Failures in the indirect modprobes, ie. those run by the softdep
      command, are ignored. This seems correct for removing, but I'm
      unsure what the proper action is when installing.

    An example - or how it's supposed to work
    -----------------------------------------

    Configuration:
    softdep foo --pre pre1 pre2 --post post1 post2

    Installing a module:

    $modprobe foo <CMDLINE_OPTS>

    yields

    modprobe pre1
    modprobe pre2
    modprobe --ignore-install foo <CMDLINE_OPTS>
    modprobe post1
    modprobe post2

    Likewiese, removing a module:

    $modprobe -r foo

    yields

    modprobe -r post2
    modprobe -r post1
    modprobe --ignore-remove -r foo
    modprobe -r pre2
    modprobe -r pre1

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit d7a8758609dc13d048a249295c2dcc4345cbf40f
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sun Oct 4 17:00:43 2009 +0200

    elfops: remove errfn_t from load_strings

    Commit 528db92ab1dd0d75dba415b9f3dc81f5a34773ce added an errfn_t
    parameter to elfops_core.c:load_strings. This was for the purpose
    of detecting missing terminators at the end of ELF-sections with
    strings in them, such as .modinfo.

    However, the committer (that'd be me) forgot to add any actual code to
    load_strings() and now the errfn_t parameter complicates the error
    handling when softdep is used.

    This commit removes that parameter and adds a non-fatal warning message.

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit f2150e81dbeb547f9fc70b8c622c38cc6f987a50
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sun Oct 4 17:18:38 2009 +0200

    modprobe: add simple softdep loop detector

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit e58e266fba80e0370d2a5cffbe07adf8f7db383f
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sat Oct 10 16:56:28 2009 +0200

    test: add softdep test, modprobe: fix simple bugs in do_softdep

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit 5fd23bcc409045894152bc2e58cd978dcba5140a
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sat Oct 10 20:00:22 2009 +0200

    modprobe: softdep now handles mock modules

    do_softdep skips the main module if it does not exist, following
    the behaviour of the install and remove commands.

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit ecafabac9aba9373d37618b92d4cdb91741c5d5d
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Sun Oct 11 16:41:01 2009 +0200

    doc: added softdep command

    Known bug: When displaying the manpage, the first paragraph in the
    softdep command starts with some stray characters. Where do these
    come from? They disappear if the square brackets &#91; and &#93;
    are removed.

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>

commit a8a3727500d49a6ccdd5b8fd04d6bede83d99449
Author: Andreas Robinson <andr345@xxxxxxxxx>
Date:   Mon Oct 12 10:26:58 2009 +0200

    modprobe: change softdep --pre/--post to pre:/post:

    "--" is modified by underscores(). This would have made the
    future implementation of softdep in .modinfo more complicated.

    Signed-off-by: Andreas Robinson <andr345@xxxxxxxxx>


Cheers,
Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux