All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Smalley <sds@tycho.nsa.gov>
To: Garrett Cooper <yanegomi@gmail.com>
Cc: Eric Paris <eparis@parisplace.org>,
	James Morris <jmorris@namei.org>,
	ltp-list@lists.sourceforge.net
Subject: Re: [LTP] regression: selinux testsuite broken since October
Date: Thu, 14 Jan 2010 09:07:01 -0500	[thread overview]
Message-ID: <1263478021.8548.3.camel@moss-pluto.epoch.ncsc.mil> (raw)
In-Reply-To: <364299f41001131449w751889b8r98aca16ea1e8957a@mail.gmail.com>

On Wed, 2010-01-13 at 14:49 -0800, Garrett Cooper wrote:
> On Wed, Jan 13, 2010 at 2:03 PM, Stephen Smalley <sds@tycho.nsa.gov> wrote:
> > On Wed, 2010-01-13 at 16:00 -0600, Serge E. Hallyn wrote:
> >> Quoting Stephen Smalley (sds@tycho.nsa.gov):
> >> > On Wed, 2010-01-13 at 11:37 -0800, Garrett Cooper wrote:
> >> > > Yeah, you're right. I was trying to beat around this bush by not
> >> > > copying these over, but it's better to have the test running and be
> >> > > improperly designed than it is for regressions to leak by today, until
> >> > > the day comes where these items are fixed.
> >> > >
> >> > > 1. So, Makefile is now copied over by default.
> >> > > 2. load is no longer done as part of all / install (test_selinux.sh
> >> > > was performing that function).
> >> > >
> >> > > So once the tests have been written to make and install independent of
> >> > > selinux-devel, etc... we'll be in good shape and I will switch these
> >> > > back to all / install dependent targets. I was trying to do it that
> >> > > way to avoid requiring make on the target under test, but I need to
> >> > > better understand the subject matter under test before we get to that
> >> > > point.
> >> >
> >> > Unfortunately, as the Makefile now includes other .mk files and those
> >> > are not copied over, it still doesn't work.
> >> >
> >> > Makefile:25: ../../../../../include/mk/env_pre.mk: No such file or directory
> >> > make: ../../../../../scripts/detect_distro.sh: Command not found
> >> > Makefile:90: ../../../../../include/mk/generic_leaf_target.mk: No such file or directory
> >> > make: *** No rule to make target `../../../../../include/mk/generic_leaf_target.mk'.  Stop.
> >> > Failed to build and load test_policy module, aborting test run.
> >> > /etc/selinux /opt/ltp/testcases/kernel/security/selinux-testsuite/refpolicy
> >> > /opt/ltp/testcases/kernel/security/selinux-testsuite/refpolicy
> >> >
> >> > I suppose you could perform the make load as part of all/install
> >> > (preferably install as we really shouldn't need to be root to run make
> >> > all - although that no longer seems to be the case for the main ltp
> >> > either), and drop it from test_selinux.sh.  But then they will need to
> >> > know/remember to remove the test policy when finished testing.
> >>
> >> But really the compile stage should just create test_policy.pp,
> >> which the testsuite can load and unload, right?
> >
> > Yes, that should work.
> 
> Which is what it's doing now, but the original author of the test
> wrote the load logic and unload logic so that it used make instead of
> using a bourne shell script, etc.

To clarify, there are two things happening under that load target
presently, one of which is properly handled at build time and one of
which is properly handled at test execution time.  The first part is
building test_policy.pp.  The latter is running semodule -i
test_policy.pp.  So we could split up the Makefile so that the first
part is done by the make all/install, and test_selinux.sh merely runs
semodule -i test_policy.pp before the test and semodule -r test_policy
after the test.  One other item I notice is that the current logic
copies test_policy* to $POLICY_DEVEL_DIR and runs make there, which
isn't necessary - you could just leave them in the refpolicy directory
and run make -f $POLICY_DEVEL_DIR/Makefile test_policy.pp.

> The other thing that's kind of amusing is that its setup / teardown
> isn't very robust -- I could send a signal, or the process could get
> terminated leaving the test policy files hanging around the system
> under test. That's a side issue but it's also another good reason to
> migrate away from this make paradigm for setup / teardown -_-...

-- 
Stephen Smalley
National Security Agency


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2010-01-14 14:21 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-06 15:25 [LTP] regression: selinux testsuite broken since October Stephen Smalley
2010-01-06 17:18 ` Serge E. Hallyn
2010-01-07  9:04   ` Garrett Cooper
2010-01-06 18:50 ` Serge E. Hallyn
2010-01-07 19:40   ` Stephen Smalley
2010-01-08 18:20     ` Garrett Cooper
2010-01-08 18:45       ` Stephen Smalley
2010-01-08 18:50         ` Stephen Smalley
2010-01-08 21:38           ` Garrett Cooper
2010-01-08 22:00             ` Stephen Smalley
2010-01-08 22:08               ` Garrett Cooper
2010-01-09  7:27                 ` Garrett Cooper
2010-01-11 19:12                   ` Stephen Smalley
2010-01-11 19:50                     ` Serge E. Hallyn
2010-01-11 19:55                       ` Stephen Smalley
2010-01-11 20:19                         ` Serge E. Hallyn
2010-01-11 20:58                           ` Serge E. Hallyn
2010-01-11 21:00                             ` Serge E. Hallyn
2010-01-11 21:31                               ` Serge E. Hallyn
2010-01-12  8:36                                 ` Garrett Cooper
2010-01-12 13:16                                 ` Stephen Smalley
2010-01-12 16:55                                   ` Garrett Cooper
2010-01-12 17:19                                     ` Garrett Cooper
2010-01-12 17:24                                       ` Garrett Cooper
2010-01-12 17:26                                       ` Garrett Cooper
2010-01-12 19:12                                         ` Stephen Smalley
2010-01-13  6:51                                           ` Garrett Cooper
2010-01-13  6:54                                             ` Garrett Cooper
2010-01-13 13:43                                             ` Stephen Smalley
2010-01-13 18:52                                               ` Garrett Cooper
2010-01-13 19:18                                                 ` Stephen Smalley
2010-01-13 19:37                                                   ` Garrett Cooper
2010-01-13 19:49                                                     ` Stephen Smalley
2010-01-13 21:58                                                       ` Garrett Cooper
2010-01-13 22:00                                                       ` Serge E. Hallyn
2010-01-13 22:03                                                         ` Stephen Smalley
2010-01-13 22:49                                                           ` Garrett Cooper
2010-01-14 14:07                                                             ` Stephen Smalley [this message]
2010-01-14 20:10                                                               ` Garrett Cooper
2010-01-14 20:35                                                                 ` Stephen Smalley
2010-01-14 20:44                                                                   ` Stephen Smalley
2010-01-14 21:29                                                                     ` Garrett Cooper
2010-01-14 21:32                                                                       ` Garrett Cooper
2010-01-14 21:59                                                                         ` Stephen Smalley
2010-01-14 22:31                                                                           ` Stephen Smalley
2010-01-15  4:22                                                                           ` Garrett Cooper
2010-01-15  4:44                                                                           ` Garrett Cooper
2010-01-15 14:11                                                                             ` Stephen Smalley
2010-01-15 14:17                                                                               ` Stephen Smalley
2010-01-12  8:29                               ` Garrett Cooper
2010-01-12 13:00                                 ` Stephen Smalley
2010-01-12 15:38                                 ` Serge E. Hallyn
2010-01-12 16:56                                   ` Garrett Cooper
2010-01-12 18:51                                   ` Stephen Smalley
2010-01-15 17:48                                   ` Garrett Cooper
2010-01-26  8:31                                     ` Garrett Cooper
2010-01-26 14:30                                       ` Stephen Smalley
2010-01-27  6:34                                         ` Garrett Cooper
2010-01-27 19:12                                           ` Stephen Smalley
2010-01-27 22:37                                             ` Garrett Cooper
2010-01-28  5:56                                               ` Garrett Cooper
2010-01-28 14:02                                                 ` Stephen Smalley
2010-01-28 15:10                                                   ` Garrett Cooper
2010-01-12  8:43                         ` Garrett Cooper
2010-01-12 13:08                           ` Stephen Smalley
2010-01-06 18:58 ` Serge E. Hallyn
2010-01-07  9:05   ` Garrett Cooper
2010-01-07 19:23     ` Stephen Smalley
2010-01-07  9:18 ` Garrett Cooper

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=1263478021.8548.3.camel@moss-pluto.epoch.ncsc.mil \
    --to=sds@tycho.nsa.gov \
    --cc=eparis@parisplace.org \
    --cc=jmorris@namei.org \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=yanegomi@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.