mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: "George Spelvin" <linux@horizon.com>
Cc: rdunlap@infradead.org, tj@kernel.org, linux-ide@vger.kernel.org,
	linux-kernel@vger.kernel.org, mingo@redhat.com
Subject: Re: [PATCH v2 2/3] lib: glob.c: Add CONFIG_GLOB_SELFTEST
Date: Wed, 11 Jun 2014 16:04:52 -0700	[thread overview]
Message-ID: <20140611160452.7715d3c4a0cb584e8b507da7@linux-foundation.org> (raw)
In-Reply-To: <20140607024928.14178.qmail@ns.horizon.com>

On 6 Jun 2014 22:49:28 -0400 "George Spelvin" <linux@horizon.com> wrote:

> This was useful during development, and is retained for future regression
> testing.
> 
> GCC appears to have no way to place string literals in a particular
> section; adding __initconst to a char pointer leaves the string itself
> in the default string section, where it will not be thrown away after
> module load.
> 
> Thus all string constants are kept in explicitly declared and named
> arrays.  Sorry this makes printk a bit harder to read.  At least the
> tests are more compact.
> 
> Signed-off-by: George Spelvin <linux@horizon.com>
> ---
> Persuading GCC to throw away *all* the self-test data after running
> it was surprisingly annoying.

Yeah.  Props for making the attempt.

> The one thing I'm not really sure about is what to do if the self-test
> fails.  For now, I make the module_init function fail too.  Opinions?

The printk should suffice - someone will notice it eventually.

Using KERN_ERR to report a failure might help draw attention to it.


  reply	other threads:[~2014-06-11 23:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140313121032.GA9981@htj.dyndns.org>
2014-05-10  3:13 ` [PATCH 1/2] Add lib/glob.c George Spelvin
2014-05-10  3:14   ` [PATCH 2/2] libata: Use glob_match from lib/glob.c George Spelvin
2014-05-10 12:21   ` [PATCH 1/2] Add lib/glob.c Tejun Heo
2014-05-11  6:02     ` George Spelvin
2014-05-12 23:03     ` Andrew Morton
2014-05-10 12:23   ` Tejun Heo
2014-05-10 14:03     ` George Spelvin
2014-05-10 17:22       ` Randy Dunlap
2014-05-10 17:29   ` Randy Dunlap
2014-05-11 12:36     ` Tejun Heo
2014-06-07  2:44       ` [PATCH v2 1/3] " George Spelvin
2014-06-07  2:49         ` [PATCH v2 2/3] lib: glob.c: Add CONFIG_GLOB_SELFTEST George Spelvin
2014-06-11 23:04           ` Andrew Morton [this message]
2014-06-12  1:38             ` George Spelvin
2014-06-07  2:50         ` [PATCH v2 3/3] libata: Use glob_match from lib/glob.c George Spelvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140611160452.7715d3c4a0cb584e8b507da7@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=mingo@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®