2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-09-04 16:25:10 +00:00

Fixes several warnings, typos, clarifies a subtest description and starts

to try to get rid of programmatic use of $Id$ in kernel regression tests.
This commit is contained in:
Kees Cook
2010-07-26 10:50:33 -07:00
parent 0d357a892b
commit b30b4c1877
6 changed files with 10 additions and 8 deletions

View File

@@ -64,7 +64,7 @@ echo
echo "*** A 'Killed' message from bash is expected for the following test" echo "*** A 'Killed' message from bash is expected for the following test"
runchecktest "CHANGEHAT (subprofile->subprofile w/ bad magic)" signal9 $subtest $subtest2 badmagic $file runchecktest "CHANGEHAT (subprofile->subprofile w/ bad magic)" signal9 $subtest $subtest2 badmagic $file
# 1. ATTEMPT TO CHANGEGAT TO AN INVALUD PROFILE, SHOULD PUT US INTO A NULL # 1. ATTEMPT TO CHANGEHAT TO AN INVALID PROFILE, SHOULD PUT US INTO A NULL
# PROFILE # PROFILE
# 2. ATTEMPT TO CHANGEHAT OUT WITH BAD TOKEN # 2. ATTEMPT TO CHANGEHAT OUT WITH BAD TOKEN
settest changehat_fail settest changehat_fail

View File

@@ -5,7 +5,7 @@
# #
# Gawd, I hate writing perl. It shows, too. # Gawd, I hate writing perl. It shows, too.
# #
my $__VERSION__='$Id$'; my $__VERSION__=$0;
use strict; use strict;
use Getopt::Long; use Getopt::Long;

View File

@@ -27,7 +27,7 @@ badreadperm=w
genprofile $file:$okperm genprofile $file:$okperm
runtestbg "PWRITE with w" pass $file runtestbg "PREAD/PWRITE with rw" pass $file
sleep 2 sleep 2

View File

@@ -32,7 +32,7 @@ bin=$pwd
swap_file=$tmpdir/swapfile swap_file=$tmpdir/swapfile
dd if=/dev/zero of=${swap_file} bs=1024 count=512 2> /dev/null dd if=/dev/zero of=${swap_file} bs=1024 count=512 2> /dev/null
/sbin/mkswap ${swap_file} > /dev/null /sbin/mkswap -f ${swap_file} > /dev/null
# TEST 1. Make sure can enable and disable swap unconfined # TEST 1. Make sure can enable and disable swap unconfined

View File

@@ -1,7 +1,7 @@
#! /bin/bash #! /bin/bash
# $Id$ #
# Copyright (C) 2002-2005 Novell/SUSE # Copyright (C) 2002-2005 Novell/SUSE
# Copyright (C) 2010 Canonical, Ltd.
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as # modify it under the terms of the GNU General Public License as
@@ -114,9 +114,9 @@ rm -f $mknod_file
runchecktest "MKNOD sock (permissions)" fail s $mknod_file runchecktest "MKNOD sock (permissions)" fail s $mknod_file
## ##
## D. SETHOSTNAME ## C. SYSCTL
## ##
sh syscall_sysctl.sh bash syscall_sysctl.sh
## ##
## D. SETHOSTNAME ## D. SETHOSTNAME

View File

@@ -2,6 +2,7 @@
/* /*
* Copyright (C) 2002-2005 Novell/SUSE * Copyright (C) 2002-2005 Novell/SUSE
* Copyright (C) 2010 Canonical, Ltd.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as * modify it under the terms of the GNU General Public License as
@@ -134,6 +135,7 @@ int main (int argc, char * argv[]) {
} }
/* Check for info re: reading the file */ /* Check for info re: reading the file */
memset(inbound_buffer, 0, sizeof(inbound_buffer));
if (recv(in_sock, inbound_buffer, 16,0) == -1 ) { if (recv(in_sock, inbound_buffer, 16,0) == -1 ) {
fprintf(stderr, "FAIL - recv %s\n", fprintf(stderr, "FAIL - recv %s\n",
strerror(errno)); strerror(errno));