make filecaps tests succeed
PATCH v2 1/1 make filecaps tests succeed
(Garrett I was going to add your ack, but wasn't absolutely sure whether you meant it should apply to the whole thing or not)
Most of these are belated cleanup after the move to using /opt/ltp. But come on, replacing 'return' with tst_exit(), are you just trying to mess with my head?
Changelog:
may 4: address Garrett's feedback
1. single return 0 in print_caps.c
2. use $TMP if defined for location of caps_fifo
3. use tst_brkm in place of tst_resm.
may 5: address Garrett's comment:
don't add 1 to null pointer and then check for 1
--- testcases/kernel/security/filecaps/filecapstest.sh | 10 +++- testcases/kernel/security/filecaps/print_caps.c | 5 +- .../kernel/security/filecaps/verify_caps_exec.c | 51 ++++++++------------ 3 files changed, 30 insertions(+), 36 deletions(-)
testcases/kernel/security/filecaps/filecapstest.sh +7 -3
@@ -22,8 +22,12 @@ echo "Running in:" #rm -f print_caps #cp $LTPROOT/testcases/bin/print_caps . -mkfifo caps_fifo -chmod 777 caps_fifo +#FIFOFILE="$LTPROOT/testcases/bin/caps_fifo" +TMP=${TMP:=/tmp} +FIFOFILE="$TMP/caps_fifo" +rm -f $FIFOFILE +mkfifo $FIFOFILE +chmod 777 $FIFOFILE exit_code=0 echo "cap_sys_admin tests" verify_caps_exec 0
@@ -46,5 +50,5 @@ if [ $tmp -ne 0 ]; then exit_code=$tmp fi -unlink caps_fifo +unlink $FIFOFILE exit $exit_code
testcases/kernel/security/filecaps/print_caps.c +2 -3
@@ -36,7 +36,7 @@#include <sys/capability.h> #endif -#define FIFOFILE "caps_fifo" +#define FIFOFILE "/tmp/caps_fifo"int main (int argc,char *argv[]) {
@@ -65,7 +65,6 @@ int main(int argc, char *argv[])close (fd);cap_free (cap); -#else -return 0 ;#endif +return 0 ; }
testcases/kernel/security/filecaps/verify_caps_exec.c +21 -30
113 lines not on this page · raw message
Signature · 8 lines
1.6.0.6 ------------------------------------------------------------------------------ _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 15 lines · Serge E. Hallyn
(Garrett I was going to add your ack, but wasn't absolutely sure whether you meant it should apply to the whole thing or not)
Most of these are belated cleanup after the move to using
/opt/ltp. But come on, replacing 'return' withtst_exit(), are you just trying to mess with my head?Changelog:
may 4: address Garrett's feedback
1. single return 0 inprint_caps.c
2. use $TMP if defined for location ofcaps_fifo
3. usetst_brkmin place oftst_resm.
may 5: address Garrett's comment:
don't add 1 to null pointer and then check for 1
Quoted 1 line
Signed-off-by Serge E. Hallyn <[email protected]>
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 16 lines · Garrett Cooper
Quoted 15 lines · Serge E. Hallyn
(Garrett I was going to add your ack, but wasn't absolutely sure whether you meant it should apply to the whole thing or not)
Most of these are belated cleanup after the move to using
/opt/ltp. But come on, replacing 'return' withtst_exit(), are you just trying to mess with my head?Changelog:
may 4: address Garrett's feedback
1. single return 0 inprint_caps.c
2. use $TMP if defined for location ofcaps_fifo
3. usetst_brkmin place oftst_resm.
may 5: address Garrett's comment:
don't add 1 to null pointer and then check for 1
Quoted 3 lines
Quoted 1 line
Signed-off-by Serge E. Hallyn <[email protected]>Acked-by Garrett Cooper <[email protected]>
Thanks. Checked in just now.
Regards--
Subrata
Quoted 6 lines
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list