This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix [BZ#14122] memory leak in nss_parse_service_list

On 05/22/2012 04:21 PM, Paul Pluzhnikov wrote:
On Tue, May 22, 2012 at 12:49 AM, Andreas Jaeger<> wrote:
On Monday, May 21, 2012 23:59:46 Paul Pluzhnikov wrote:

Is there a way to inject "mock" /etc/nsswitch.conf for a test?

That's the error path issue, I agree, it's difficult to create a test case.

But what about the defconfig_entries one? Could we use the test case from

I am confused: the defconfig has exact same problem as the error path: it requires either having a known /etc/nsswitch.conf, or an ability to "mock" one.

On my system, defconfig paths were not exercised at all because my
nsswitch.conf has entries for everything. It wasn't until I made a
completely empty nsswitch.conf that I observed the original leak.

So I still don't see how to write a test case for this.

I misunderstood the discussion in bugzilla. I'm not aware of providing as user your own nsswitch.conf, so we can indeed not add a test here. Sorry for the trouble,

 Andreas Jaeger aj@{,} Twitter/Identica: jaegerandi
  SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
    GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]