* [LTP] [PATCH ltp] p9auth: add missing checkp9auth.sh script
@ 2010-01-04 0:43 Serge E. Hallyn
2010-01-04 8:46 ` Garrett Cooper
0 siblings, 1 reply; 5+ messages in thread
From: Serge E. Hallyn @ 2010-01-04 0:43 UTC (permalink / raw)
To: LTP list
This was in my original patch submission but somehow didn't make its way into
the ltp tree.
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
---
testcases/kernel/security/p9auth/checkp9auth.sh | 70 +++++++++++++++++++++++
1 files changed, 70 insertions(+), 0 deletions(-)
create mode 100644 testcases/kernel/security/p9auth/checkp9auth.sh
diff --git a/testcases/kernel/security/p9auth/checkp9auth.sh b/testcases/kernel/security/p9auth/checkp9auth.sh
new file mode 100644
index 0000000..f917ce6
--- /dev/null
+++ b/testcases/kernel/security/p9auth/checkp9auth.sh
@@ -0,0 +1,70 @@
+#!/bin/sh
+################################################################################
+## ##
+## Copyright (c) International Business Machines Corp., 2009 ##
+## ##
+## This program is free software; you can redistribute it and#or modify ##
+## it under the terms of the GNU General Public License as published by ##
+## the Free Software Foundation; either version 2 of the License, or ##
+## (at your option) any later version. ##
+## ##
+## This program is distributed in the hope that it will be useful, but ##
+## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ##
+## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ##
+## for more details. ##
+## ##
+## You should have received a copy of the GNU General Public License ##
+## along with this program; if not, write to the Free Software ##
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ##
+## ##
+################################################################################
+
+yesno=0
+if [ "$1" = "yesno" ]; then
+ yesno=1
+fi
+
+# check for openssl
+rm -f /tmp/ab
+echo ab > /tmp/ab
+openssl sha1 -hmac "ab" /tmp/ab > /dev/null
+ret=$?
+if [ $ret -ne 0 ]; then
+ if [ $yesno -eq 1 ]; then echo
+ "no"
+ else
+ echo "openssl not installed, skipping p9auth tests."
+ fi
+ exit 1
+fi
+
+majfile=/sys/module/p9auth/parameters/cap_major
+minfile=/sys/module/p9auth/parameters/cap_minor
+if [ ! -f "$majfile" ]; then
+ if [ $yesno -eq 1 ]; then echo
+ "no"
+ else
+ echo "p9auth not detected. Skipping p9auth tests."
+ fi
+ exit 1
+fi
+
+if [ ! -c "/dev/caphash" ]; then
+ rm -f /dev/caphash
+ maj=`cat $majfile`
+ mknod /dev/caphash c $maj 0
+fi
+
+if [ ! -c "/dev/capuse" ]; then
+ rm -f /dev/capuse
+ min=`cat $minfile`
+ mknod /dev/capuse c $maj 1
+fi
+chmod ugo+w /dev/capuse
+
+if [ $yesno -eq 1 ]; then
+ echo "yes"
+else
+ echo "p9auth ready for testing"
+fi
+exit 0
--
1.6.1.1
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH ltp] p9auth: add missing checkp9auth.sh script
2010-01-04 0:43 [LTP] [PATCH ltp] p9auth: add missing checkp9auth.sh script Serge E. Hallyn
@ 2010-01-04 8:46 ` Garrett Cooper
2010-01-04 15:38 ` Serge E. Hallyn
0 siblings, 1 reply; 5+ messages in thread
From: Garrett Cooper @ 2010-01-04 8:46 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: LTP list
Sent from my iPhone
On Jan 3, 2010, at 4:43 PM, "Serge E. Hallyn" <serue@us.ibm.com> wrote:
> This was in my original patch submission but somehow didn't make its
> way into
> the ltp tree.
>
> Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
> ---
> testcases/kernel/security/p9auth/checkp9auth.sh | 70 ++++++++++++++
> +++++++++
> 1 files changed, 70 insertions(+), 0 deletions(-)
> create mode 100644 testcases/kernel/security/p9auth/checkp9auth.sh
>
> diff --git a/testcases/kernel/security/p9auth/checkp9auth.sh b/
> testcases/kernel/security/p9auth/checkp9auth.sh
> new file mode 100644
> index 0000000..f917ce6
> --- /dev/null
> +++ b/testcases/kernel/security/p9auth/checkp9auth.sh
> @@ -0,0 +1,70 @@
> +#!/bin/sh
> +##
> ###
> ###
> ###
> #####################################################################
> +##
>
>
>
> ##
> +## Copyright (c) International Business Machines Corp.,
> 2009 ##
> +##
>
>
>
> ##
> +## This program is free software; you can redistribute it and#or
> modify ##
> +## it under the terms of the GNU General Public License as
> published by ##
> +## the Free Software Foundation; either version 2 of the License,
> or ##
> +## (at your option) any later
> version. ##
> +##
>
>
>
> ##
> +## This program is distributed in the hope that it will be useful,
> but ##
> +## WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY ##
> +## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
> License ##
> +## for more
> details. ##
> +##
>
>
>
> ##
> +## You should have received a copy of the GNU General Public
> License ##
> +## along with this program; if not, write to the Free
> Software ##
> +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
> 02111-1307 USA ##
> +##
>
>
>
> ##
> +##
> ###
> ###
> ###
> #####################################################################
> +
> +yesno=0
> +if [ "$1" = "yesno" ]; then
> + yesno=1
> +fi
> +
> +# check for openssl
> +rm -f /tmp/ab
> +echo ab > /tmp/ab
> +openssl sha1 -hmac "ab" /tmp/ab > /dev/null
> +ret=$?
> +if [ $ret -ne 0 ]; then
> + if [ $yesno -eq 1 ]; then echo
> + "no"
> + else
> + echo "openssl not installed, skipping p9auth tests."
> + fi
> + exit 1
> +fi
> +
> +majfile=/sys/module/p9auth/parameters/cap_major
> +minfile=/sys/module/p9auth/parameters/cap_minor
> +if [ ! -f "$majfile" ]; then
> + if [ $yesno -eq 1 ]; then echo
> + "no"
> + else
> + echo "p9auth not detected. Skipping p9auth tests."
> + fi
> + exit 1
> +fi
> +
> +if [ ! -c "/dev/caphash" ]; then
> + rm -f /dev/caphash
> + maj=`cat $majfile`
> + mknod /dev/caphash c $maj 0
> +fi
> +
> +if [ ! -c "/dev/capuse" ]; then
> + rm -f /dev/capuse
> + min=`cat $minfile`
> + mknod /dev/capuse c $maj 1
> +fi
> +chmod ugo+w /dev/capuse
> +
> +if [ $yesno -eq 1 ]; then
> + echo "yes"
> +else
> + echo "p9auth ready for testing"
> +fi
> +exit 0
> --
> 1.6.1.1
Hi Serge,
When do this script need to be run? Before compiling or before /
while running?
-Garrett
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH ltp] p9auth: add missing checkp9auth.sh script
2010-01-04 8:46 ` Garrett Cooper
@ 2010-01-04 15:38 ` Serge E. Hallyn
2010-01-04 23:34 ` Garrett Cooper
0 siblings, 1 reply; 5+ messages in thread
From: Serge E. Hallyn @ 2010-01-04 15:38 UTC (permalink / raw)
To: Garrett Cooper; +Cc: LTP list
Quoting Garrett Cooper (yanegomi@gmail.com):
> Hi Serge,
> When do this script need to be run? Before compiling or before /
> while running?
> -Garrett
Hi,
Either could do, but there's reason to do it at both. It doesn't need to be
run before each test, but has to load the module and set up devices after each
boot. So I originally had it both in the makefile, as a condition for doing
the compilation (and especially installation), as well as before the test, in
case the system was rebooted after compilation and before running.
-serge
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH ltp] p9auth: add missing checkp9auth.sh script
2010-01-04 15:38 ` Serge E. Hallyn
@ 2010-01-04 23:34 ` Garrett Cooper
2010-01-06 6:10 ` Garrett Cooper
0 siblings, 1 reply; 5+ messages in thread
From: Garrett Cooper @ 2010-01-04 23:34 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: LTP list
Sent from my iPhone
On Jan 4, 2010, at 7:38 AM, "Serge E. Hallyn" <serue@us.ibm.com> wrote:
> Quoting Garrett Cooper (yanegomi@gmail.com):
>> Hi Serge,
>> When do this script need to be run? Before compiling or before /
>> while running?
>> -Garrett
>
> Hi,
>
> Either could do, but there's reason to do it at both. It doesn't
> need to be
> run before each test, but has to load the module and set up devices
> after each
> boot. So I originally had it both in the makefile, as a condition
> for doing
> the compilation (and especially installation), as well as before the
> test, in
> case the system was rebooted after compilation and before running.
>
> -serge
Ok, that's why I yanked it. Here's what we should do then:
1. Take code required for compile and put it in an autoconf test.
2. Take code required for execution (loading modules, etc) and move it
into a separate script.
3. Take all sourceable code and move it into a separate script that
gets sourced in both places.
I'll add it back into the repo when I get back tomorrow, but we need
to get a proper plan as far as how we are going to enable / disable
features and tests that require interpreters, special system configs,
etc.
Thanks!
-Garrett
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LTP] [PATCH ltp] p9auth: add missing checkp9auth.sh script
2010-01-04 23:34 ` Garrett Cooper
@ 2010-01-06 6:10 ` Garrett Cooper
0 siblings, 0 replies; 5+ messages in thread
From: Garrett Cooper @ 2010-01-06 6:10 UTC (permalink / raw)
To: Serge E. Hallyn; +Cc: LTP list
On Mon, Jan 4, 2010 at 3:34 PM, Garrett Cooper <yanegomi@gmail.com> wrote:
> Sent from my iPhone
>
> On Jan 4, 2010, at 7:38 AM, "Serge E. Hallyn" <serue@us.ibm.com> wrote:
>
>> Quoting Garrett Cooper (yanegomi@gmail.com):
>>>
>>> Hi Serge,
>>> When do this script need to be run? Before compiling or before /
>>> while running?
>>> -Garrett
>>
>> Hi,
>>
>> Either could do, but there's reason to do it at both. It doesn't need to
>> be
>> run before each test, but has to load the module and set up devices after
>> each
>> boot. So I originally had it both in the makefile, as a condition for
>> doing
>> the compilation (and especially installation), as well as before the test,
>> in
>> case the system was rebooted after compilation and before running.
>>
>> -serge
>
> Ok, that's why I yanked it. Here's what we should do then:
>
> 1. Take code required for compile and put it in an autoconf test.
> 2. Take code required for execution (loading modules, etc) and move it into
> a separate script.
> 3. Take all sourceable code and move it into a separate script that gets
> sourced in both places.
>
> I'll add it back into the repo when I get back tomorrow, but we need to get
> a proper plan as far as how we are going to enable / disable features and
> tests that require interpreters, special system configs, etc.
File revived.
Thanks,
-Garrett
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-01-06 6:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-04 0:43 [LTP] [PATCH ltp] p9auth: add missing checkp9auth.sh script Serge E. Hallyn
2010-01-04 8:46 ` Garrett Cooper
2010-01-04 15:38 ` Serge E. Hallyn
2010-01-04 23:34 ` Garrett Cooper
2010-01-06 6:10 ` Garrett Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox