public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] lib: Add library function for parsing kernel config
Date: Fri, 16 Nov 2018 15:00:35 +0100	[thread overview]
Message-ID: <20181116140034.GG29013@rei.lan> (raw)
In-Reply-To: <20181116035401.z2o67pjhxtutap6x@xpf-desktop>

Hi!
> > diff --git a/lib/tst_kconfig.c b/lib/tst_kconfig.c
> > new file mode 100644
> > +
> > +	snprintf(path_buf, path_buf_len, "/boot/config-%s", un.release);
> > +
> > +	if (!access(path_buf, F_OK))
> > +		return path_buf;
> > +
>   Could add suport for Clear Linux kconfig location:
> 	snprintf(path_buf, path_buf_len, "/lib/kernel/config-%s", un.release);
> 
> 	if (!access(path_buf, F_OK))
> 		return path_buf;

No problem, will add that in v2?

> > +	tst_res(TINFO, "Couldn't locate kernel config!");
> > +
> > +	return NULL;
> > +}
> 
> > +	int abort_test = 0;
> > +
> > +	for (i = 0; i < conf_cnt; i++) {
> > +		if (!conf_match[i]) {
> > +			abort_test = 1;
> > +			tst_res(TINFO, "Kernel is missing %s", kconfigs[i]);
>    Could change TINFO above to TCONF?

What's the point? We do exit with TCONF below anyway.

> > +		}
> > +	}
> > +
> > +	if (abort_test)
> > +		tst_brk(TCONF, "Aborting test due to missing kernel config options!");
> 	Add 'above' in print?
> 		tst_brk(TCONF,
> 			"Aborting test due to missing above kernel config options!");

Sure, np.

-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2018-11-16 14:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-15 13:44 [LTP] [PATCH] lib: Add library function for parsing kernel config Cyril Hrubis
2018-11-15 18:57 ` Cristian Marussi
2018-11-16 13:53   ` Cyril Hrubis
2018-11-15 20:16 ` Tim.Bird
2018-11-16 13:59   ` Cyril Hrubis
2018-11-21 19:53     ` Tim.Bird
2018-11-15 20:43 ` Tim.Bird
2018-11-16 13:57   ` Cyril Hrubis
2018-11-16  3:54 ` Pengfei Xu
2018-11-16  4:03   ` Tim.Bird
2018-11-16  4:57     ` Pengfei Xu
2018-11-16 14:00   ` Cyril Hrubis [this message]
2018-11-17  5:41     ` Pengfei Xu
2018-11-23  4:56 ` Sandeep Patil

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=20181116140034.GG29013@rei.lan \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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