You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(40) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(205) |
Feb
(281) |
Mar
(428) |
Apr
(444) |
May
(137) |
Jun
(341) |
Jul
(509) |
Aug
(184) |
Sep
(51) |
Oct
(70) |
Nov
(52) |
Dec
(41) |
| 2004 |
Jan
(27) |
Feb
|
Mar
|
Apr
(99) |
May
(562) |
Jun
(36) |
Jul
(74) |
Aug
(61) |
Sep
(33) |
Oct
(76) |
Nov
(64) |
Dec
(71) |
| 2005 |
Jan
(19) |
Feb
(28) |
Mar
(726) |
Apr
(310) |
May
(325) |
Jun
(496) |
Jul
(192) |
Aug
(72) |
Sep
(41) |
Oct
(294) |
Nov
(79) |
Dec
(64) |
| 2006 |
Jan
(112) |
Feb
(267) |
Mar
(33) |
Apr
(16) |
May
(121) |
Jun
(77) |
Jul
(43) |
Aug
(281) |
Sep
(97) |
Oct
(19) |
Nov
(15) |
Dec
(50) |
| 2007 |
Jan
(2) |
Feb
(31) |
Mar
(21) |
Apr
(76) |
May
(36) |
Jun
(97) |
Jul
(93) |
Aug
(85) |
Sep
(77) |
Oct
(35) |
Nov
(106) |
Dec
(81) |
| 2008 |
Jan
(86) |
Feb
(139) |
Mar
(378) |
Apr
(127) |
May
(196) |
Jun
(108) |
Jul
(136) |
Aug
(137) |
Sep
(114) |
Oct
(229) |
Nov
(312) |
Dec
(180) |
| 2009 |
Jan
(747) |
Feb
(907) |
Mar
(371) |
Apr
(174) |
May
(192) |
Jun
(163) |
Jul
(744) |
Aug
(495) |
Sep
(85) |
Oct
(950) |
Nov
(311) |
Dec
(180) |
| 2010 |
Jan
(303) |
Feb
(33) |
Mar
(9) |
Apr
|
May
(1) |
Jun
(4) |
Jul
(18) |
Aug
(37) |
Sep
(2) |
Oct
(2) |
Nov
(6) |
Dec
(3) |
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(17) |
Nov
(1) |
Dec
|
| 2013 |
Jan
(7) |
Feb
(2) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(5) |
| 2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
(3) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
(2) |
| 2016 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ro...@us...> - 2003-01-03 20:35:08
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/memcmp In directory sc8-pr-cvs1:/tmp/cvs-serv9075/memcmp Log Message: Directory /cvsroot/ltp/ltp/testcases/kernel/syscalls/memcmp added to the repository |
|
From: <ro...@us...> - 2003-01-03 20:33:38
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/memcpy
In directory sc8-pr-cvs1:/tmp/cvs-serv7693/testcases/kernel/syscalls/memcpy
Added Files:
Makefile memcpy01.c
Log Message:
Added memcpy() test ported by Ananda Venkataraman.
--- NEW FILE: Makefile ---
#
# Copyright (c) International Business Machines Corp., 2001
#
# 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
#
###########################################################################
# name of file : Makefile #
###########################################################################
CFLAGS+= -I../../../../include -O -g -Wall
LOADLIBES+= -L../../../../lib -lltp
SRCS=$(wildcard *.c)
TARGETS=$(patsubst %.c,%,$(SRCS))
all: $(TARGETS)
install:
@for i in $(TARGETS); do ln -f $$i ../../../bin/$$i ; done
clean:
rm -f $(TARGETS)
--- NEW FILE: memcpy01.c ---
/*
*
* Copyright (c) International Business Machines Corp., 2002
*
* 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
*/
/* 01/02/2003 Port to LTP av...@us... */
/* 06/30/2001 Port to Linux nsh...@us... */
/*
* NAME
* memcpy -- test memcpy
*
* CALLS
* memcpy1(3)
*
* ALGORITHM
* There are 4 cases for copies: S = Source, D = Destination
*
* 1 - S < D no overlap
* 2 - D < S no overlap
* 3 - S < D with overlap
* 4 - D < S with overlap
*
* We try all four cases. Check buffer boundaries.
*
* RESTRICTIONS
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
/***** LTP Port *****/
#include "test.h"
#include "usctest.h"
char *TCID = "memcpy1";
/***** ** ** *****/
#undef BSIZE
#define BSIZE 4096
#define LEN 100
#define FAILED 0
#define PASSED 1
/***** LTP Port *****/
int local_flag = PASSED;
int block_number;
int errno;
FILE *temp;
int TST_TOTAL =1;
/***** ** ** *****/
char buf[BSIZE];
/***** LTP Port *****/
extern int Tst_count;
int anyfail();
int blenter();
int blexit();
void setup();
/***** ** ** *****/
void clearit();
void fill(char *str);
int checkit(char *str);
/*--------------------------------------------------------------*/
int main (int argc, char *argv[])
{
char *p, *q;
setup(); /* temp file is now open */
/*--------------------------------------------------------------*/
blenter();
clearit();
p = &buf[100];
fill(p);
q = &buf[800];
memcpy(q, p, LEN);
if (checkit(q)) {
fprintf(temp, "\tcopy failed - missed data\n");
local_flag = FAILED;
}
if (p[-1] || p[LEN]) {
fprintf(temp, "\tcopy failed - 'to' bounds\n");
local_flag = FAILED;
}
if (q[-1] || q[LEN]) {
fprintf(temp, "\tcopy failed - 'from' bounds\n");
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
clearit();
p = &buf[800];
fill(p);
q = &buf[100];
memcpy(q, p, LEN);
if (checkit(q)) {
fprintf(temp, "\tcopy failed - missed data\n");
local_flag = FAILED;
}
if (p[-1] || p[LEN]) {
fprintf(temp, "\tcopy failed - 'to' bounds\n");
local_flag = FAILED;
}
if (q[-1] || q[LEN]) {
fprintf(temp, "\tcopy failed - 'from' bounds\n");
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
clearit();
p = &buf[800];
fill(p);
q = &buf[850];
memcpy(q, p, LEN);
if (checkit(q)) {
fprintf(temp, "\tcopy failed - missed data\n");
local_flag = FAILED;
}
if (p[-1]) {
fprintf(temp, "\tcopy failed - 'to' bounds\n");
local_flag = FAILED;
}
if (q[LEN]) {
fprintf(temp, "\tcopy failed - 'from' bounds\n");
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
clearit();
p = &buf[850];
fill(p);
q = &buf[800];
memcpy(q, p, LEN);
if (checkit(q)) {
fprintf(temp, "\tcopy failed - missed data\n");
local_flag = FAILED;
}
if (p[LEN]) {
fprintf(temp, "\tcopy failed - 'to' bounds\n");
local_flag = FAILED;
}
if (q[-1]) {
fprintf(temp, "\tcopy failed - 'from' bounds\n");
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
/* Clean up any files created by test before call to anyfail. */
anyfail(); /* THIS CALL DOES NOT RETURN - EXITS!! */
return(0);
}
/*--------------------------------------------------------------*/
/* FUNCTIONS GO HERE */
void clearit()
{
register int i;
for (i=0; i < BSIZE; i++)
buf[i] = 0;
}
void fill(char *str)
{
register int i;
for (i=0; i < LEN; i++)
*str++ = 'a';
}
int checkit(char *str)
{
register int i;
for (i=0; i < LEN; i++)
if (*str++ != 'a')
return(-1);
return (0);
}
int anyfail()
{
(local_flag == FAILED)? tst_resm(TFAIL, "Test failed\n"): tst_resm(TPASS, "Test passed\n");
tst_exit();
return(0);
}
void setup()
{
temp = stderr;
}
int blenter()
{
local_flag = PASSED;
return(0);
}
int blexit()
{
(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed\n") : tst_resm(TPASS, "Test passed\n");
return(0);
}
|
|
From: <ro...@us...> - 2003-01-03 20:33:38
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls In directory sc8-pr-cvs1:/tmp/cvs-serv7693/testcases/kernel/syscalls Modified Files: Makefile Log Message: Added memcpy() test ported by Ananda Venkataraman. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/Makefile,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- Makefile 3 Jan 2003 20:17:29 -0000 1.46 +++ Makefile 3 Jan 2003 20:33:34 -0000 1.47 @@ -39,7 +39,7 @@ getpgid getpgrp getpid getppid getpriority getresgid getresuid \ getrusage getsid getsockname getsockopt gettimeofday getuid \ ioctl ipc ioperm iopl kill lchown link \ - listen llseek lseek lstat memset\ + listen llseek lseek lstat memcpy memset\ mkdir mknod mlock mlockall mmap modify_ldt mount mprotect \ mremap msync munlock munlockall munmap nanosleep nftw nice open \ pathconf pause personality pipe poll prctl\ |
|
From: <ro...@us...> - 2003-01-03 20:33:37
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv7693/runtest Modified Files: syscalls Log Message: Added memcpy() test ported by Ananda Venkataraman. Index: syscalls =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/syscalls,v retrieving revision 1.102 retrieving revision 1.103 diff -u -d -r1.102 -r1.103 --- syscalls 3 Jan 2003 20:17:28 -0000 1.102 +++ syscalls 3 Jan 2003 20:33:32 -0000 1.103 @@ -332,6 +332,7 @@ lstat03 lstat03 memset01 memset01 +memcpy01 memcpy01 mlockall01 mlockall01 mlockall02 mlockall02 |
|
From: <ro...@us...> - 2003-01-03 20:19:14
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/memcpy In directory sc8-pr-cvs1:/tmp/cvs-serv913/memcpy Log Message: Directory /cvsroot/ltp/ltp/testcases/kernel/syscalls/memcpy added to the repository |
|
From: <ro...@us...> - 2003-01-03 20:17:32
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/memset
In directory sc8-pr-cvs1:/tmp/cvs-serv32134/testcases/kernel/syscalls/memset
Added Files:
Makefile memset01.c
Log Message:
Added memset() test ported by Ananda Venkataraman.
--- NEW FILE: Makefile ---
#
# Copyright (c) International Business Machines Corp., 2001
#
# 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
#
###########################################################################
# name of file : Makefile #
###########################################################################
CFLAGS+= -I../../../../include -O -g -Wall
LOADLIBES+= -L../../../../lib -lltp
SRCS=$(wildcard *.c)
TARGETS=$(patsubst %.c,%,$(SRCS))
all: $(TARGETS)
install:
@for i in $(TARGETS); do ln -f $$i ../../../bin/$$i ; done
clean:
rm -f $(TARGETS)
--- NEW FILE: memset01.c ---
/*
*
* Copyright (c) International Business Machines Corp., 2002
*
* 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
*/
/* 01/02/2003 Port to LTP av...@us... */
/* 06/30/2001 Port to Linux nsh...@us... */
/*
* NAME
* memset1.c -- test setting of buffer
*
* CALLS
* memset(3)
*
* ALGORITHM
* Check boundary conditions, go through 64 byte window.
*
* RESTRICTIONS
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
/***** LTP Port *****/
#include "test.h"
#include "usctest.h"
char *TCID = "memset01";
/***** ** ** *****/
#undef BSIZE
#define BSIZE 4096
#define LEN 100
#define FAILED 0
#define PASSED 1
char buf[BSIZE];
/***** LTP Port *****/
int local_flag = PASSED;
int block_number;
int errno;
int TST_TOTAL = 1;
extern int Tst_count;
int anyfail();
void setup();
int blenter();
/***** ** ** *****/
void fill();
int checkit(char *str);
/*--------------------------------------------------------------*/
int main (int argc, char *argv[])
{
register int i, j;
char *p;
/*--------------------------------------------------------------*/
local_flag = PASSED;
fill();
for (i=0; i < 200; i++) {
fill();
p = &buf[400];
memset(p, 0, i);
if ((j = checkit(p)) != i) {
tst_resm(TINFO, "Not enough zero bytes, wanted %d, got %d",
i, j);
local_flag = FAILED;
break;
}
if (!p[-1] || !p[i]) {
tst_resm(TINFO, "Boundary error, clear of %d", i);
local_flag = FAILED;
}
if (local_flag == FAILED)
break;
}
(local_flag == FAILED) ? tst_resm(TFAIL, "Test failed") : tst_resm(TPASS, "Test passed");
/*--------------------------------------------------------------*/
/* Clean up any files created by test before call to anyfail. */
(local_flag == FAILED)? tst_resm(TFAIL, "Test failed"): tst_resm(TPASS, "Test passed");
tst_exit();
/* THIS CALL DOES NOT RETURN - EXITS!! */
return(0);
}
/*--------------------------------------------------------------*/
/* FUNCTIONS GO HERE */
void fill()
{
register int i;
for (i=0; i < BSIZE; i++)
buf[i] = 'a';
}
int checkit(char *str)
{
register int i = 0;
while (!*str++)
i++;
return (i);
}
|
|
From: <ro...@us...> - 2003-01-03 20:17:32
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls In directory sc8-pr-cvs1:/tmp/cvs-serv32134/testcases/kernel/syscalls Modified Files: Makefile Log Message: Added memset() test ported by Ananda Venkataraman. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/Makefile,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- Makefile 2 Jan 2003 21:03:36 -0000 1.45 +++ Makefile 3 Jan 2003 20:17:29 -0000 1.46 @@ -39,7 +39,7 @@ getpgid getpgrp getpid getppid getpriority getresgid getresuid \ getrusage getsid getsockname getsockopt gettimeofday getuid \ ioctl ipc ioperm iopl kill lchown link \ - listen llseek lseek lstat \ + listen llseek lseek lstat memset\ mkdir mknod mlock mlockall mmap modify_ldt mount mprotect \ mremap msync munlock munlockall munmap nanosleep nftw nice open \ pathconf pause personality pipe poll prctl\ |
|
From: <ro...@us...> - 2003-01-03 20:17:32
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv32134/runtest Modified Files: syscalls Log Message: Added memset() test ported by Ananda Venkataraman. Index: syscalls =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/syscalls,v retrieving revision 1.101 retrieving revision 1.102 diff -u -d -r1.101 -r1.102 --- syscalls 3 Jan 2003 17:17:46 -0000 1.101 +++ syscalls 3 Jan 2003 20:17:28 -0000 1.102 @@ -331,6 +331,8 @@ lstat02 lstat02 lstat03 lstat03 +memset01 memset01 + mlockall01 mlockall01 mlockall02 mlockall02 |
|
From: <ro...@us...> - 2003-01-03 20:13:43
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/memset In directory sc8-pr-cvs1:/tmp/cvs-serv31244/memset Log Message: Directory /cvsroot/ltp/ltp/testcases/kernel/syscalls/memset added to the repository |
|
From: <ro...@us...> - 2003-01-03 17:17:49
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/swapon
In directory sc8-pr-cvs1:/tmp/cvs-serv16399/testcases/kernel/syscalls/swapon
Modified Files:
swapon02.c
Added Files:
swapon01.c
Log Message:
Added swapon() test from Aniruddha Marathe and made corrections to swapon02 to
make sure the child exits.
--- NEW FILE: swapon01.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**************************************************************************
*
* TEST IDENTIFIER : swapon1
*
* EXECUTED BY : root / superuser
*
* TEST TITLE : Basic test for swapon(2)
*
* TEST CASE TOTAL : 1
*
* AUTHOR : Aniruddha Marathe <ani...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* This is a Phase I test for the swapon(2) system call.
* It is intended to provide a limited exposure of the system call.
*
* Setup:
* Setup signal handling.
* Pause for SIGUSR1 if option specified.
* Create a temporary directory.
* Create file of size 40K ( minimum swapfile size).
* Make this file as swap file using mkswap(8)
*
* Test:
* Loop if the proper options are given.
* Turn on the swapfile to test the system call
* Execute system call
* Check return code, if system call failed (return=-1)
* Log the errno and Issue a FAIL message.
* Otherwise, Issue a PASS message.
*
* Cleanup:
* Print errno log and/or timing stats if options given
*
* USAGE: <for command-line>
* swapon01 [-c n] [-e] [-i n] [-I x] [-P x] [-t] [-h] [-f] [-p]
* where:
* -c n : run n copies simultaneously.
* -e : Turn on errno logging.
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* -t : Turn on syscall timing.
*
*RESTRICTIONS:
* Not compatible with kernel versions below 2.1.35
*****************************************************************************/
#include <unistd.h>
#include "test.h"
#include "usctest.h"
#include <errno.h>
#include <sys/swap.h>
#include <stdlib.h>
static void setup();
static void cleanup();
char *TCID = "swapon01"; /* Test program identifier. */
int TST_TOTAL = 1; /* Total number of test cases. */
extern int Tst_count; /* Test Case counter for tst_* routines */
int
main(int ac, char **av)
{
int lc; /* loop counter */
char *msg; /* message returned from parse_opts */
/* parse standard options */
if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL))
!= (char *)NULL) {
tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
}
/* perform global setup for test */
setup();
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
/* reset Tst_count in case we are looping. */
Tst_count = 0;
TEST(swapon("./swapfile01", 0));
/* check return code */
if (TEST_RETURN == -1) {
TEST_ERROR_LOG(TEST_ERRNO);
tst_resm(TFAIL, "swapon(2) Failed to turn on"
" swapfile.");
} else {
tst_resm(TPASS, "swapon(2) passed and turned on"
" swapfile");
/*we need to turn this swap file off for -i option */
if(swapoff("./swapfile01") != 0) {
tst_brkm(TBROK, cleanup, "Failed to turn off"
" swapfile. system"
" reboot after"
" execution of LTP"
" test suite is"
" recommended.");
}
}
} /*End for TEST_LOOPING*/
/*Clean up and exit*/
cleanup();
/*NOTREACHED*/
return 0;
}
/* setup() - performs all ONE TIME setup for this test */
void
setup()
{
/* capture signals */
tst_sig(FORK, DEF_HANDLER, cleanup);
/* Check whether we are root*/
if (geteuid() != 0) {
tst_brkm(TBROK, tst_exit, "Test must be run as root");
}
/* Pause if that option was specified */
TEST_PAUSE;
/* make a temp directory and cd to it */
tst_tmpdir();
/*create file*/
if(system("dd if=/dev/zero of=swapfile01 bs=1048 count=40 >"
" tmpfile 2>&1") != 0) {
tst_brkm(TBROK, cleanup, "Failed to create file for swap");
}
/* make above file a swap file*/
if( system("mkswap swapfile01 > tmpfile 2>&1") != 0) {
tst_brkm(TBROK, cleanup, "Failed to make swapfile");
}
} /* End setup() */
/*
* cleanup() - Performs one time cleanup for this test at
* completion or premature exit
*/
void
cleanup()
{
/*
* print timing stats if that option was specified.
* print errno log if that option was specified.
*/
TEST_CLEANUP;
/* Remove tmp dir and all files inside it. */
tst_rmdir();
/* exit with return code appropriate for results */
tst_exit();
} /* End cleanup() */
Index: swapon02.c
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/swapon/swapon02.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- swapon02.c 2 Jan 2003 21:03:36 -0000 1.1
+++ swapon02.c 3 Jan 2003 17:17:47 -0000 1.2
@@ -72,7 +72,7 @@
* -c option can't be used.
*
*CHANGES:
- * 01/02/03 Added code to handle SIGSEGV generated when the intentional EPERM error
+ * 01/02/03 Added fork to handle SIGSEGV generated when the intentional EPERM error
* for hitting MAX_SWAPFILES is hit. -Robbie Williamson <ro...@us...>
*****************************************************************************/
@@ -110,7 +110,6 @@
static int cleanup02();
static int setup03();
static int cleanup03();
-int set_handler(int, int);
void handler(int);
char *TCID = "swapon02"; /* Test program identifier. */
@@ -367,6 +366,7 @@
return -1;
}
}
+ tst_exit();
}
else
waitpid(pid,status,0);
@@ -419,7 +419,6 @@
/* capture signals */
tst_sig(FORK, DEF_HANDLER, cleanup);
- set_handler(SIGSEGV,0);
/* set the expected errnos... */
TEST_EXP_ENOS(exp_enos);
@@ -467,40 +466,5 @@
tst_exit();
} /* End cleanup() */
-/*
- * handler()
- * A dummy signal handler for attempting to catch signals.
- */
-void
-handler(int sig)
-{
- tst_exit();
-}
-
-/*
- * set_handler()
- * Establish a signal handler for "sig" with the specified flags and
- * signal to mask while the handler executes.
- * Returns
- * 0 on success, errno on failure
- */
-int
-set_handler(int sig, int sig_to_mask)
-{
- struct sigaction sa;
- int err;
-
- sa.sa_sigaction = (void *)handler;
- sa.sa_flags = SA_NOMASK;
- sigemptyset(&sa.sa_mask);
- sigaddset(&sa.sa_mask, sig_to_mask);
- err = sigaction(sig, &sa, NULL);
-
- if (err == 0) {
- return 0;
- } else {
- return errno;
- }
-}
|
|
From: <ro...@us...> - 2003-01-03 17:17:49
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv16399/runtest Modified Files: syscalls Log Message: Added swapon() test from Aniruddha Marathe and made corrections to swapon02 to make sure the child exits. Index: syscalls =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/syscalls,v retrieving revision 1.100 retrieving revision 1.101 diff -u -d -r1.100 -r1.101 --- syscalls 2 Jan 2003 21:03:35 -0000 1.100 +++ syscalls 3 Jan 2003 17:17:46 -0000 1.101 @@ -752,6 +752,7 @@ swapoff01 swapoff01 swapoff02 swapoff02 +swapon01 swapon01 swapon02 swapon02 symlink01 symlink01 |
|
From: <ro...@us...> - 2003-01-02 21:03:39
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/swapon
In directory sc8-pr-cvs1:/tmp/cvs-serv10007/testcases/kernel/syscalls/swapon
Added Files:
Makefile swapon02.c
Log Message:
Added swapon() test created by Aniruddha Marathe.
--- NEW FILE: Makefile ---
#
# Copyright (c) International Business Machines Corp., 2001
#
# 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
#
###########################################################################
# name of file : Makefile #
###########################################################################
CFLAGS+= -I../../../../include -O -g -Wall
LOADLIBES+= -L../../../../lib -lltp
SRCS=$(wildcard *.c)
TARGETS=$(patsubst %.c,%,$(SRCS))
all: $(TARGETS)
install:
@for i in $(TARGETS); do ln -f $$i ../../../bin/$$i ; done
clean:
rm -f $(TARGETS)
--- NEW FILE: swapon02.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**************************************************************************
*
* TEST IDENTIFIER : swapon02
*
*
* EXECUTED BY : root / superuser
*
* TEST TITLE : Test checking for basic error conditions
* for swapon(2)
*
* TEST CASE TOTAL : 4
*
* AUTHOR : Aniruddha Marathe <ani...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* This test case checks whether swapon(2) system call returns
* 1. ENOENT when the path exists but is invalid
* 2. EINVAL when the path does not exist
* 3. EPERM when there more than MAX_SWAPFILES are already in use.
* 4. EPERM when user is not a superuser
*
* Setup:
* Setup signal handling.
* Pause for SIGUSR1 if option specified.
* 1. For checking condition 3, make MAX_SWAPFILES swapfiles
* 2. For testing error on invalid user, change the effective uid
*
* Test:
* Loop if the proper options are given.
* Execute system call.
* Check return code, if system call fails with errno == expected errno
* Issue syscall passed with expected errno
* Otherwise,
* Issue syscall failed to produce expected errno
*
* Cleanup:
* Do cleanup for the test.
*
* USAGE: <for command-line>
* swapon02 [-e] [-i n] [-I x] [-p x] [-t] [-h] [-f] [-p]
* where
* -e : Turn on errno logging.
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* -t : Turn on syscall timing.
*
*RESTRICTIONS:
*Incompatible with kernel versions below 2.1.35.
*Incompatible if MAX_SWAPFILES definition in later kernels is changed
* -c option can't be used.
*
*CHANGES:
* 01/02/03 Added code to handle SIGSEGV generated when the intentional EPERM error
* for hitting MAX_SWAPFILES is hit. -Robbie Williamson <ro...@us...>
*****************************************************************************/
#include <unistd.h>
#include <errno.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <sys/swap.h>
#include <asm/page.h>
#include <linux/swap.h>
#include <fcntl.h>
#include <pwd.h>
#include <string.h>
#include <signal.h>
#include "test.h"
#include "usctest.h"
/* The value below should be defined in /linux/swap.h. However, if using glibc 2.2.5, you should remove
* the include of /linux/swap.h and use the definition instead...due to compile problems with 2.2.5.
*
* Kernel > 2.4.6
*#define MAX_SWAPFILES 32
*
* Kernel < 2.4.6
*#define MAX_SWAPFILES 8
*/
static void setup();
static void cleanup();
static int setup01();
static int cleanup01();
static int setup02();
static int cleanup02();
static int setup03();
static int cleanup03();
int set_handler(int, int);
void handler(int);
char *TCID = "swapon02"; /* Test program identifier. */
int TST_TOTAL = 4; /* Total number of test cases. */
extern int Tst_count; /* Test Case counter for tst_* routines */
char nobody_uid[] = "nobody";
struct passwd *ltpuser;
static int swapfile; /* Number of swapfiles turned on*/
static char *path[] = {"./abcd", "/dev/mouse",
"./swapfilenext", "./swapfile01"};
static int exp_enos[] = {EPERM, EINVAL, ENOENT, 0};
static struct test_case_t {
char *err_desc; /* error description */
int exp_errno; /* expected error number*/
char *exp_errval; /* Expected errorvalue string*/
int (*setupfunc)(); /* Test setup function */
int (*cleanfunc)(); /* Test cleanup function */
} testcase[] = {
{"path does not exist", ENOENT, "ENOENT ", setup02, cleanup02},
{"Invalid path", EINVAL, "EINVAL ", setup02, cleanup02},
{"Permission denied: more than MAX_SWAPFILES swapfiles in use",
EPERM, "EPERM ", setup03, cleanup03},
{"Permission denied", EPERM, "EPERM ", setup01, cleanup01}
};
int
main(int ac, char **av)
{
int lc, i; /* loop counter */
char *msg; /* message returned from parse_opts */
/* parse standard options */
if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL))
!= (char *)NULL) {
tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
}
/* perform global setup for test */
setup();
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
Tst_count = 0;
for(i = 0; i < TST_TOTAL; i++) {
/* reset Tst_count in case we are looping. */
if(testcase[i].setupfunc() == -1) {
tst_resm(TWARN, "Failed to setup test %d."
" Skipping test", i);
continue;
} else {
TEST(swapon(path[i], 0));
}
if(testcase[i].cleanfunc() == -1) {
tst_brkm(TBROK, cleanup, "Cleanup failed,"
" quitting the test");
}
/* check return code */
if ((TEST_RETURN == -1) && (TEST_ERRNO == testcase[i].
exp_errno)) {
tst_resm(TPASS, "swapon(2) expected failure;"
" Got errno - %s : %s",
testcase[i].exp_errval,
testcase[i].err_desc);
} else {
tst_resm(TFAIL, "swapon(2) failed to produce"
" expected error: %d, errno"
": %s and got %d. "
" System reboot after"
" execution of LTP"
" test suite is"
" recommended.",
testcase[i].exp_errno,
testcase[i].exp_errval,
TEST_ERRNO);
/*If swapfile is turned on, turn it off*/
if(TEST_RETURN == 0) {
if(swapoff(path[i]) != 0) {
tst_resm(TWARN, "Failed to"
" turn off swapfile"
" swapfile. System"
" reboot after"
" execution of LTP"
" test suite is"
" recommended.");
}
}
}
TEST_ERROR_LOG(TEST_ERRNO);
} /*End of TEST LOOPS*/
} /* End of TEST_LOOPING*/
/*Clean up and exit*/
cleanup();
/*NOTREACHED*/
return 0;
} /*End of main*/
/*
* setup01() - This function sets the user as nobody
*/
int
setup01()
{
if((ltpuser = getpwnam(nobody_uid)) == NULL) {
tst_resm(TWARN, "\"nobody\" user not present. skipping test");
return -1;
}
if (seteuid(ltpuser->pw_uid) == -1) {
tst_resm(TWARN, "seteuid failed to "
"to set the effective uid to %d", ltpuser->pw_uid);
perror("seteuid");
return -1;
}
return 0; /* user switched to nobody*/
}
/*
* cleanup01() - switch back to user root
*/
int
cleanup01()
{
if(seteuid(0) == -1) {
tst_brkm(TBROK, cleanup, "seteuid failed to set uid to root");
perror("seteuid");
return -1;
}
return 0;
}
int
setup02()
{
return 0;
}
int
cleanup02()
{
return 0;
}
/*
* setup03() - Determine how many swapfiles already exist in system.
* determine how many more swapfiles need to be created to test the limit.
* create and turn on those many swapfiles.
* Create one more swapfile for test.
*/
int
setup03()
{
int j, fd; /*j is loop counter, fd is file descriptor*/
int pid; /* used for fork */
int *status=NULL; /* used for fork */
char cmd_buffer[55]; /* array to hold command line*/
char filename[15]; /* array to store new filename*/
char decimal[3]; /* array for digits at end of filename*/
char temp[7]; /* to store wc -l output*/
/*Find out how many swapfiles (1 line per entry) already exist*/
if(system("cat /proc/swaps | wc -l > ./linecount") != 0) {
tst_resm(TWARN, "Failed to find out existing number of swap"
" files");
return -1;
}
/*open linecount file to know the number of entries*/
if((fd = open("./linecount", O_RDONLY)) == -1) {
tst_resm(TWARN, "Failed to find out existing number of swap"
" files");
return -1;
}
/* 6th and 7th character in the file contains output of wc -l*/
if( read(fd, temp, 7) != 7) {
tst_resm(TWARN, "Failed to find out existing number of swap"
" files");
return -1;
}
/*check if number of lines are less than 10 in /proc/swaps*/
if(temp[5] == ' ') {
decimal[0] = '0';
} else {
decimal[0] = temp[5];
}
decimal[1] = temp[6]; /*temp[6] unit digit of wc -l result*/
swapfile = atoi(decimal);
if(swapfile < 0) {
tst_resm(TWARN, "Failed to find existing number of swapfiles");
return -1;
}
/* Determine how many more files are to be created*/
swapfile = MAX_SWAPFILES - swapfile + 1;
pid=fork();
if (pid == 0){
/*create and turn on remaining swapfiles*/
for(j = 0; j < swapfile; j++) {
/*prepare filename for the iteration*/
if(sprintf(filename, "swapfile%d%d", (j+2)/10, (j+2)) < 0) {
tst_resm(TWARN, "sprintf() failed to create filename");
return -1;
}
/*prepare the path string for dd command and dd command*/
if(sprintf(cmd_buffer, "dd if=/dev/zero of=%s bs=1048"
" count=40 > tmpfile 2>&1", filename) < 0) {
tst_resm(TWARN, "dd command failed to create file");
return -1;
}
if(system(cmd_buffer) != 0) {
tst_resm(TWARN, "sprintf() failed to create swapfiles");
return -1;
}
/* make the file swapfile*/
if(sprintf(cmd_buffer, "mkswap %s > tmpfile 2>&1", filename)
< 0) {
tst_resm(TWARN, "Failed to make swap %s", filename);
return -1;
}
if(system(cmd_buffer) != 0) {
tst_resm(TWARN, "failed to make swap file %s",
filename);
return -1;
}
/* turn on the swap file*/
if(swapon(filename, 0) != 0) {
tst_resm(TWARN, "Failed swapon for file %s"
"returned %d", filename);
/* must cleanup already swapon files */
cleanup03();
return -1;
}
}
}
else
waitpid(pid,status,0);
/*create extra swapfile for testing*/
if(system("dd if=/dev/zero of=swapfilenext bs=1048 count=40 > tmpfile"
" 2>&1") != 0) {
tst_resm(TWARN, "Failed to create extra file for swap");
return -1;
}
if(system("mkswap ./swapfilenext > tmpfle 2>&1") != 0) {
tst_resm(TWARN, "Failed to make extra swapfile");
return -1;
}
return 0;
}
/*
* cleanup03() - clearing all turned on swapfiles
*/
int
cleanup03()
{
int j; /* loop counter*/
char filename[15];
for(j = 0; j < swapfile; j++) {
if( sprintf(filename, "swapfile%d%d", (j+2)/10, (j+2)) < 0) {
tst_resm(TWARN, "sprintf() failed to create filename");
tst_resm(TWARN, "Failed to turn off swap files. System"
" reboot after execution of LTP test"
" suite is recommended");
return -1;
}
if( swapoff(filename) != 0) {
tst_resm(TWARN, "Failed to turn off swap files. system"
" reboot after execution of LTP test"
" suite is recommended");
return -1;
}
}
return 0;
}
/* setup() - performs all ONE TIME setup for this test */
void
setup()
{
/* capture signals */
tst_sig(FORK, DEF_HANDLER, cleanup);
set_handler(SIGSEGV,0);
/* set the expected errnos... */
TEST_EXP_ENOS(exp_enos);
/* Check whether we are root*/
if (geteuid() != 0) {
tst_brkm(TBROK, tst_exit, "Test must be run as root");
}
/* make a temp directory and cd to it */
tst_tmpdir();
/*create file*/
if(system("dd if=/dev/zero of=swapfile01 bs=1048 count=40 > tmpfile"
" 2>&1") != 0) {
tst_brkm(TBROK, cleanup, "Failed to create file for swap");
}
/* make above file a swap file*/
if( system("mkswap swapfile01 > tmpfile 2>&1") != 0) {
tst_brkm(TBROK, cleanup, "Failed to make swapfile");
}
/* Pause if that option was specified */
TEST_PAUSE;
} /* End setup() */
/*
* cleanup() - Performs one time cleanup for this test at
* completion or premature exit
*/
void
cleanup()
{
/*
* print timing stats if that option was specified.
* print errno log if that option was specified.
*/
TEST_CLEANUP;
/* Remove tmp dir and all files inside it*/
tst_rmdir();
/* exit with return code appropriate for results */
tst_exit();
} /* End cleanup() */
/*
* handler()
* A dummy signal handler for attempting to catch signals.
*/
void
handler(int sig)
{
tst_exit();
}
/*
* set_handler()
* Establish a signal handler for "sig" with the specified flags and
* signal to mask while the handler executes.
* Returns
* 0 on success, errno on failure
*/
int
set_handler(int sig, int sig_to_mask)
{
struct sigaction sa;
int err;
sa.sa_sigaction = (void *)handler;
sa.sa_flags = SA_NOMASK;
sigemptyset(&sa.sa_mask);
sigaddset(&sa.sa_mask, sig_to_mask);
err = sigaction(sig, &sa, NULL);
if (err == 0) {
return 0;
} else {
return errno;
}
}
|
|
From: <ro...@us...> - 2003-01-02 21:03:39
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls In directory sc8-pr-cvs1:/tmp/cvs-serv10007/testcases/kernel/syscalls Modified Files: Makefile Log Message: Added swapon() test created by Aniruddha Marathe. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/Makefile,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Makefile 2 Jan 2003 16:45:30 -0000 1.44 +++ Makefile 2 Jan 2003 21:03:36 -0000 1.45 @@ -53,8 +53,8 @@ setregid setresgid setresuid setreuid setrlimit setsid setsockopt \ settimeofday setuid sigaction sigaltstack sighold signal \ sigprocmask sigrelse sigsuspend socket socketcall socketpair sockioctl \ - stat statfs stime string swapoff symlink sync syscall sysconf sysctl sysfs \ - sysinfo syslog time times truncate umask \ + stat statfs stime string swapoff swapon symlink sync syscall sysconf \ + sysctl sysfs sysinfo syslog time times truncate umask \ uname unlink umount utime vfork vhangup wait \ wait4 waitpid write writev |
|
From: <ro...@us...> - 2003-01-02 21:03:39
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv10007/runtest Modified Files: syscalls Log Message: Added swapon() test created by Aniruddha Marathe. Index: syscalls =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/syscalls,v retrieving revision 1.99 retrieving revision 1.100 diff -u -d -r1.99 -r1.100 --- syscalls 2 Jan 2003 16:45:29 -0000 1.99 +++ syscalls 2 Jan 2003 21:03:35 -0000 1.100 @@ -752,6 +752,8 @@ swapoff01 swapoff01 swapoff02 swapoff02 +swapon02 swapon02 + symlink01 symlink01 symlink02 symlink02 symlink03 symlink03 |
|
From: <ro...@us...> - 2003-01-02 17:10:03
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/swapon In directory sc8-pr-cvs1:/tmp/cvs-serv15327/swapon Log Message: Directory /cvsroot/ltp/ltp/testcases/kernel/syscalls/swapon added to the repository |
|
From: <ro...@us...> - 2003-01-02 16:45:34
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/swapoff
In directory sc8-pr-cvs1:/tmp/cvs-serv4717/testcases/kernel/syscalls/swapoff
Added Files:
Makefile swapoff01.c swapoff02.c
Log Message:
Added swapoff() tests from Aniruddha Marathe.
--- NEW FILE: Makefile ---
#
# Copyright (c) International Business Machines Corp., 2001
#
# 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
#
###########################################################################
# name of file : Makefile #
###########################################################################
CFLAGS+= -I../../../../include -O -g -Wall
LOADLIBES+= -L../../../../lib -lltp
SRCS=$(wildcard *.c)
TARGETS=$(patsubst %.c,%,$(SRCS))
all: $(TARGETS)
install:
@for i in $(TARGETS); do ln -f $$i ../../../bin/$$i ; done
clean:
rm -f $(TARGETS)
--- NEW FILE: swapoff01.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**************************************************************************
*
* TEST IDENTIFIER : swapoff01
*
* EXECUTED BY : root / superuser
*
* TEST TITLE : Basic test for swapoff(2)
*
* TEST CASE TOTAL : 1
*
* AUTHOR : Aniruddha Marathe <ani...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* This is a Phase I test for the swapoff(2) system call.
* It is intended to provide a limited exposure of the system call.
*
*
* Setup:
* Setup signal handling.
* Pause for SIGUSR1 if option specified.
* Create a temporary directory.
* Create file of size 40K ( minimum swapfile size).
* Make this file as swap file using mkswap(8)
* Turn on the swap file.
*
* Test:
* Loop if the proper options are given.
* Execute system call
* Check return code, if system call failed (return=-1)
* Log the errno and Issue a FAIL message.
* Otherwise, Issue a PASS message.
*
* Cleanup:
* Print errno log and/or timing stats if options given
*
* USAGE: <for command-line>
* swapoff01 [-c n] [-e] [-i n] [-I x] [-P x] [-t] [-h] [-f] [-p]
* where:
* -c n : Run n copies simultaneously.
* -e : Turn on errno logging.
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* -t : Turn on syscall timing.
*
*RESTRICTIONS:
* Not compatible with kernel versions below 1.3.2.
*****************************************************************************/
#include <unistd.h>
#include "test.h"
#include "usctest.h"
#include <errno.h>
#include <sys/swap.h>
#include <stdlib.h>
static void setup();
static void cleanup();
char *TCID = "swapoff01"; /* Test program identifier. */
int TST_TOTAL = 1; /* Total number of test cases. */
extern int Tst_count; /* Test Case counter for tst_* routines */
int
main(int ac, char **av)
{
int lc; /* loop counter */
char *msg; /* message returned from parse_opts */
/* parse standard options */
if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL))
!= (char *)NULL) {
tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
}
/* perform global setup for test */
setup();
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
/* reset Tst_count in case we are looping. */
Tst_count = 0;
if(swapon("./swapfile01", 0) != 0) {
tst_resm(TWARN, "Failed to turn on the swap file"
", skipping test iteration");
continue;
}
TEST(swapoff("./swapfile01"));
/* check return code */
if (TEST_RETURN == -1) {
TEST_ERROR_LOG(TEST_ERRNO);
tst_resm(TFAIL, "swapoff(2) Failed to turn off"
" swapfile. System reboot after execution"
" of LTP test suite is recommended.");
tst_resm(TWARN, "It is recommended not to run"
" swapon01 and swapon02");
} else {
tst_resm(TPASS, "swapoff(2) passed and turned off"
" swapfile.");
}
} /*End for TEST_LOOPING*/
/*Clean up and exit*/
cleanup();
/*NOTREACHED*/
return 0;
}
/* setup() - performs all ONE TIME setup for this test */
void
setup()
{
/* capture signals */
tst_sig(FORK, DEF_HANDLER, cleanup);
/* Check whether we are root*/
if (geteuid() != 0) {
tst_brkm(TBROK, tst_exit, "Test must be run as root");
}
/* Pause if that option was specified */
TEST_PAUSE;
/* make a temp directory and cd to it */
tst_tmpdir();
/*create file*/
if(system("dd if=/dev/zero of=swapfile01 bs=1048 count=40 > tmpfile"
" 2>&1 ") != 0) {
tst_brkm(TBROK, cleanup, "Failed to create file for swap");
}
/* make above file a swap file*/
if( system("mkswap swapfile01 > tmpfile 2>&1") != 0) {
tst_brkm(TBROK, cleanup, "Failed to make swapfile");
}
} /* End setup() */
/*
* cleanup() - Performs one time cleanup for this test at
* completion or premature exit
*/
void
cleanup()
{
/*
* print timing stats if that option was specified.
* print errno log if that option was specified.
*/
TEST_CLEANUP;
/* Remove tmp dir and all files inside it. */
tst_rmdir();
/* exit with return code appropriate for results */
tst_exit();
} /* End cleanup() */
--- NEW FILE: swapoff02.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**************************************************************************
*
* TEST IDENTIFIER : swapoff02
*
*
* EXECUTED BY : root / superuser
*
* TEST TITLE : Test checking for basic error conditions
* for swapoff(2)
*
* TEST CASE TOTAL : 3
*
* AUTHOR : Aniruddha Marathe <ani...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* This test case checks whether swapoff(2) system call returns
* 1. EINVAL when the path does not exist
* 2. ENOENT when the path exists but is invalid
* 3. EPERM when user is not a superuser
*
* Setup:
* Setup signal handling.
* Pause for SIGUSR1 if option specified.
* 1. For testing error on invalid user, change the effective uid
*
* Test:
* Loop if the proper options are given.
* Execute system call.
* Check return code, if system call fails with errno == expected errno
* Issue syscall passed with expected errno
* Otherwise,
* Issue syscall failed to produce expected errno
*
* Cleanup:
* Do cleanup for the test.
*
* USAGE: <for command-line>
* swapoff02 [-c n] [-e] [-i n] [-I x] [-p x] [-t] [-h] [-f] [-p]
* where
* -c n : Run n copies simultaneously
* -e : Turn on errno logging.
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* -t : Turn on syscall timing.
*
*RESTRICTIONS:
*Incompatible with kernel versions below 2.1.35.
*****************************************************************************/
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <pwd.h>
#include <string.h>
#include "test.h"
#include "usctest.h"
#include <stdlib.h>
#include <sys/swap.h>
static void setup();
static void cleanup();
static int setup01();
static int cleanup01();
static int setup02();
static int cleanup02();
char *TCID = "swapoff02"; /* Test program identifier. */
int TST_TOTAL = 3; /* Total number of test cases. */
extern int Tst_count; /* Test Case counter for tst_* routines */
char nobody_uid[] = "nobody";
struct passwd *ltpuser;
static char *path[] = {"./abcd", "/dev/mouse", "./swapfile01"};
static int exp_enos[] = {EPERM, EINVAL, ENOENT, 0};
static struct test_case_t {
char *err_desc; /* error description */
int exp_errno; /* expected error number*/
char *exp_errval; /* Expected errorvalue string*/
int (*setupfunc)(); /* Test setup function */
int (*cleanfunc)(); /* Test cleanup function */
} testcase[] = {
{"path does not exist", ENOENT, "ENOENT ", setup02, cleanup02},
{"Invalid path", EINVAL, "EINVAL ", setup02, cleanup02},
{"Permission denied", EPERM, "EPERM ", setup01, cleanup01}
};
int
main(int ac, char **av)
{
int lc, i; /* loop counter */
char *msg; /* message returned from parse_opts */
/* parse standard options */
if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL))
!= (char *)NULL) {
tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
}
/* perform global setup for test */
setup();
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
/* reset Tst_count in case we are looping. */
Tst_count = 0;
for(i = 0; i < TST_TOTAL; i++) {
if(testcase[i].setupfunc() == -1) {
tst_resm(TWARN, "Failed to setup test %d."
" Skipping test", i);
continue;
} else {
TEST(swapoff(path[i]));
}
if(testcase[i].cleanfunc() == -1) {
tst_brkm(TBROK, cleanup, "cleanup failed,"
" quitting the test");
}
/* check return code */
if ((TEST_RETURN == -1) && (TEST_ERRNO == testcase[i].
exp_errno)) {
tst_resm(TPASS, "swapoff(2) expected failure;"
" Got errno - %s : %s",
testcase[i].exp_errval,
testcase[i].err_desc);
} else {
tst_resm(TFAIL, "swapoff(2) failed to produce"
" expected error; %d, errno"
": %s and got %d",
testcase[i].exp_errno,
testcase[i].exp_errval,
TEST_ERRNO);
if((TEST_RETURN == 0) && (i == 2)) {
if(swapon("./swapfile01", 0) != 0) {
tst_brkm(TBROK, cleanup,
" Failed to turn on"
" swap file");
}
}
}
TEST_ERROR_LOG(TEST_ERRNO);
} /*End of TEST LOOPS*/
} /* End of TEST_LOOPING*/
/*Clean up and exit*/
cleanup();
/*NOTREACHED*/
return 0;
} /*End of main*/
/*
* setup01() - This function sets the user as nobody
*/
int
setup01()
{
if((ltpuser = getpwnam(nobody_uid)) == NULL) {
tst_resm(TWARN, "\"nobody\" user not present. skipping test");
return -1;
}
if (seteuid(ltpuser->pw_uid) == -1) {
tst_resm(TWARN, "seteuid failed to "
"to set the effective uid to %d", ltpuser->pw_uid);
perror("seteuid");
return -1;
}
return 0; /* user switched to nobody*/
}
/*
* cleanup01() - switch back to user root
*/
int
cleanup01()
{
if(seteuid(0) == -1) {
tst_brkm(TBROK, cleanup, "seteuid failed to set uid to root");
perror("seteuid");
return -1;
}
return 0;
}
int
setup02()
{
return 0;
}
int
cleanup02()
{
return 0;
}
/* setup() - performs all ONE TIME setup for this test */
void
setup()
{
/* capture signals */
tst_sig(FORK, DEF_HANDLER, cleanup);
/* set the expected errnos... */
TEST_EXP_ENOS(exp_enos);
/* Check whether we are root*/
if (geteuid() != 0) {
tst_brkm(TBROK, tst_exit, "Test must be run as root");
}
/* Pause if that option was specified */
TEST_PAUSE;
/* make a temp directory and cd to it */
tst_tmpdir();
/*create file*/
if(system("dd if=/dev/zero of=swapfile01 bs=1048 count=40 > tmpfile"
" 2>&1")
!= 0) {
tst_brkm(TBROK, cleanup, "Failed to create file for swap");
}
/* make above file a swap file*/
if( system("mkswap ./swapfile01 > tmpfile 2>&1") != 0) {
tst_brkm(TBROK, cleanup, "Failed to make swapfile");
}
if(swapon("./swapfile01", 0) != 0) {
tst_brkm(TBROK, cleanup, "Failed to turn on the swap file."
" skipping the test iteration");
}
} /* End setup() */
/*
* cleanup() - Performs one time cleanup for this test at
* completion or premature exit
*/
void
cleanup()
{
/*
* print timing stats if that option was specified.
* print errno log if that option was specified.
*/
TEST_CLEANUP;
if(swapoff("./swapfile01") != 0) {
tst_resm(TWARN, " Failed to turn off swap file. System reboot"
" after execution of LTP test suite is"
" recommended.");
}
/* Remove tmp dir and all files inside it*/
tst_rmdir();
/* exit with return code appropriate for results */
tst_exit();
} /* End cleanup() */
|
|
From: <ro...@us...> - 2003-01-02 16:45:34
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls In directory sc8-pr-cvs1:/tmp/cvs-serv4717/testcases/kernel/syscalls Modified Files: Makefile Log Message: Added swapoff() tests from Aniruddha Marathe. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/Makefile,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- Makefile 2 Jan 2003 16:00:06 -0000 1.43 +++ Makefile 2 Jan 2003 16:45:30 -0000 1.44 @@ -53,7 +53,7 @@ setregid setresgid setresuid setreuid setrlimit setsid setsockopt \ settimeofday setuid sigaction sigaltstack sighold signal \ sigprocmask sigrelse sigsuspend socket socketcall socketpair sockioctl \ - stat statfs stime string symlink sync syscall sysconf sysctl sysfs \ + stat statfs stime string swapoff symlink sync syscall sysconf sysctl sysfs \ sysinfo syslog time times truncate umask \ uname unlink umount utime vfork vhangup wait \ wait4 waitpid write writev |
|
From: <ro...@us...> - 2003-01-02 16:45:33
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv4717/runtest Modified Files: syscalls Log Message: Added swapoff() tests from Aniruddha Marathe. Index: syscalls =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/syscalls,v retrieving revision 1.98 retrieving revision 1.99 diff -u -d -r1.98 -r1.99 --- syscalls 2 Jan 2003 16:00:05 -0000 1.98 +++ syscalls 2 Jan 2003 16:45:29 -0000 1.99 @@ -749,6 +749,9 @@ string01 string01 +swapoff01 swapoff01 +swapoff02 swapoff02 + symlink01 symlink01 symlink02 symlink02 symlink03 symlink03 |
|
From: <ro...@us...> - 2003-01-02 16:23:08
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/swapoff In directory sc8-pr-cvs1:/tmp/cvs-serv29160/swapoff Log Message: Directory /cvsroot/ltp/ltp/testcases/kernel/syscalls/swapoff added to the repository |
|
From: <ro...@us...> - 2003-01-02 16:00:43
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls In directory sc8-pr-cvs1:/tmp/cvs-serv18510/testcases/kernel/syscalls Modified Files: Makefile Log Message: Added socketcall() tests from Adiga Sowmya. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/Makefile,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Makefile 1 Jan 2003 20:50:36 -0000 1.42 +++ Makefile 2 Jan 2003 16:00:06 -0000 1.43 @@ -52,7 +52,7 @@ setgid setgroups sethostname setitimer setpgid setpgrp setpriority \ setregid setresgid setresuid setreuid setrlimit setsid setsockopt \ settimeofday setuid sigaction sigaltstack sighold signal \ - sigprocmask sigrelse sigsuspend socket socketpair sockioctl \ + sigprocmask sigrelse sigsuspend socket socketcall socketpair sockioctl \ stat statfs stime string symlink sync syscall sysconf sysctl sysfs \ sysinfo syslog time times truncate umask \ uname unlink umount utime vfork vhangup wait \ |
|
From: <ro...@us...> - 2003-01-02 16:00:40
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv18510/runtest Modified Files: syscalls Log Message: Added socketcall() tests from Adiga Sowmya. Index: syscalls =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/syscalls,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- syscalls 1 Jan 2003 20:50:36 -0000 1.97 +++ syscalls 2 Jan 2003 16:00:05 -0000 1.98 @@ -724,6 +724,11 @@ socket01 socket01 +socketcall01 socketcall01 +socketcall02 socketcall02 +socketcall03 socketcall03 +socketcall04 socketcall04 + socketpair01 socketpair01 sockioctl01 sockioctl01 |
|
From: <ro...@us...> - 2003-01-02 16:00:14
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/socketcall
In directory sc8-pr-cvs1:/tmp/cvs-serv18510/testcases/kernel/syscalls/socketcall
Added Files:
Makefile socketcall01.c socketcall02.c socketcall03.c
socketcall04.c
Log Message:
Added socketcall() tests from Adiga Sowmya.
--- NEW FILE: Makefile ---
#
# Copyright (c) International Business Machines Corp., 2001
#
# 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
#
###########################################################################
# name of file : Makefile #
###########################################################################
CFLAGS+= -I../../../../include -O -g -Wall
LOADLIBES+= -L../../../../lib -lltp
SRCS=$(wildcard *.c)
TARGETS=$(patsubst %.c,%,$(SRCS))
all: $(TARGETS)
install:
@for i in $(TARGETS); do ln -f $$i ../../../bin/$$i ; done
clean:
rm -f $(TARGETS)
--- NEW FILE: socketcall01.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**************************************************************************
*
* TEST IDENTIFIER : socketcall01
*
* EXECUTED BY : All user
*
* TEST TITLE : Basic test for socketcall(2) for socket(2)
*
* TEST CASE TOTAL : 4
*
* AUTHOR : sowmya adiga<sow...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* This is a phase I test for the socketcall(2) system call.
* It is intended to provide a limited exposure of the system call.
*
* Setup:
* Setup signal handling.
* Pause for SIGUSR1 if option specified.
*
* Test:
* Execute system call
* Check return code, if system call failed (return=-1)
* Log the errno and Issue a FAIL message.
* Otherwise, Issue a PASS message.
*
* Cleanup:
* Print errno log and/or timing stats if options given
*
* USAGE: <for command-line>
* socketcall01 [-c n] [-e] [-i n] [-I x] [-p x] [-t]
* where, -c n : Run n copies concurrently
* -e : Turn on errno logging.
* -h : Show this help screen
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* t : Turn on syscall timing.
*
* RESTRICTIONS
* None
*****************************************************************************/
#include <errno.h>
#include <asm/unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/net.h>
#include "test.h"
#include "usctest.h"
_syscall2(int ,socketcall ,int ,call, unsigned long *, args);
void setup();
void cleanup();
char *TCID = "socketcall01"; /* Test program identifier. */
extern int Tst_count; /* TestCase counter for tst_* routine */
struct test_case_t {
int call;
unsigned long args[3];
char *desc;
}TC[] = {
{ SYS_SOCKET,{PF_INET, SOCK_STREAM,0},"TCP stream"},
{ SYS_SOCKET,{PF_UNIX, SOCK_DGRAM, 0}, "unix domain dgram"},
{ SYS_SOCKET,{AF_INET, SOCK_RAW, 6}, "Raw socket"},
{ SYS_SOCKET,{PF_INET, SOCK_DGRAM, 17}, "UDP dgram"}
};
int TST_TOTAL = sizeof(TC) / sizeof(TC[0]);
int main(int ac, char **av)
{
int lc; /* loop counter */
char *msg; /* message returned from parse_opts */
int i; /* s is socket descriptor */
if ((msg = parse_opts(ac, av, NULL, NULL)) != (char *) NULL) {
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
tst_exit();
}
/* perform global setup for test */
setup();
/* check looping state */
for (lc = 0; TEST_LOOPING(lc); lc++) {
/* reset Tst_count in case we are looping. */
Tst_count = 0;
for( i=0 ;i < TST_TOTAL ; i++) {
TEST(socketcall(TC[i].call,TC[i].args));
/* check return code */
if (TEST_RETURN == -1) {
tst_resm(TFAIL, "socketcall() Failed with"
" return=%d, errno=%d : %s",
TEST_RETURN, TEST_ERRNO,
strerror(TEST_ERRNO));
} else {
tst_resm(TPASS, "socketcall() passed for"
" :%s with return=%d ",
TC[i].desc,TEST_RETURN);
close(TEST_RETURN);
}
} /* End for TEST_LOOPING */
}
/* cleanup and exit */
cleanup();
return 0;
} /* End main */
/* setup() - performs all ONE TIME setup for this test. */
void setup()
{
/* capture signals */
tst_sig(NOFORK, DEF_HANDLER, cleanup);
/* pause if that option was specified*/
TEST_PAUSE;
}
/*
* cleanup() - performs all ONE TIME cleanup for this test at
* completion or premature exit.
*/
void cleanup()
{
TEST_CLEANUP;
/* exit with return code appropriate for results */
tst_exit();
}
--- NEW FILE: socketcall02.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**************************************************************************
*
* TEST IDENTIFIER : socketcall02
*
* EXECUTED BY : All user
*
* TEST TITLE : Error test for socketcall(2)
*
* TEST CASE TOTAL : 1
*
* AUTHOR : sowmya adiga<sow...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* verify socketcall(2) returns -1 and sets errno
* appropriately if argument passed is invalid.
*
*
* Setup:
* Setup signal handling.
* Pause for SIGUSR1 if option specified.
*
* Test:
* Loop if the proper option is given.
* Execute system call.
* Check return code, If system call failed (return == -1) &&
* (errno set == expected errno)
* Issue sys call pass with expected error
* otherwise
* Issue sys call fails with unexpected error
*
* Cleanup:
* Print errno log and/or timing stats if options given
*
* USAGE: <for command-line>
* socketcall02 [-c n] [-e] [-i n] [-I x] [-p x] [-t]
* where, -c n : Run n copies concurrently
* -e : Turn on errno logging.
* -h : Show this help screen
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* t : Turn on syscall timing.
*
* RESTRICTIONS
* None
*****************************************************************************/
#include <errno.h>
#include <asm/unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/net.h>
#include "test.h"
#include "usctest.h"
_syscall2(int ,socketcall ,int ,call, unsigned long *, args);
void setup();
void cleanup();
char *TCID = "socketcall02"; /* Test program identifier. */
int TST_TOTAL = 1; /* Total number of test cases. */
extern int Tst_count; /* TestCase counter for tst_* routine */
int exp_enos[] = { EINVAL, 0};
struct test_case_t {
int call;
unsigned long args[3];
int retval;
int experrno;
char *desc;
}TC = {-1, {PF_INET, SOCK_STREAM, 0}, -1, EINVAL, "invalid call"};
int main(int ac, char **av)
{
int lc; /* loop counter */
char *msg; /* message returned from parse_opts */
if ((msg = parse_opts(ac, av, NULL, NULL)) != (char *) NULL) {
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
tst_exit();
}
/* perform global setup for test */
setup();
/* check looping state */
for (lc = 0; TEST_LOOPING(lc); lc++) {
/* reset Tst_count in case we are looping. */
Tst_count = 0;
TEST(socketcall(TC.call,TC.args));
TEST_ERROR_LOG(TEST_ERRNO);
/* check return code */
if((TEST_RETURN == -1)
&&(TEST_ERRNO == TC.experrno)) {
tst_resm(TPASS,"socketcall() failed"
" as expected for %s",
TC.desc);
} else {
tst_brkm(TFAIL,tst_exit,"socketcall()"
" Failed with wrong experrno"
" =%d got: errno=%d : %s",
TC.experrno,TEST_ERRNO,
strerror(TEST_ERRNO));
}
}
/* cleanup and exit */
cleanup();
return 0;
} /* End main */
/* setup() - performs all ONE TIME setup for this test. */
void setup()
{
/* capture signals */
tst_sig(NOFORK, DEF_HANDLER, cleanup);
/*set the expected errnos*/
TEST_EXP_ENOS(exp_enos);
/* Pause if that option was specified */
TEST_PAUSE;
}
/*
* cleanup() - performs all ONE TIME cleanup for this test at
* completion or premature exit.
*/
void cleanup()
{
TEST_CLEANUP;
/* exit with return code appropriate for results */
tst_exit();
}
--- NEW FILE: socketcall03.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**************************************************************************
*
* TEST IDENTIFIER : socketcall03
*
* EXECUTED BY : All user
*
* TEST TITLE : Basic test for socketcall(2) for bind(2)
*
* TEST CASE TOTAL : 1
*
* AUTHOR : sowmya adiga<sow...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* This is a phase I test for the socketcall(2) system call.
* It is intended to provide a limited exposure of the system call.
*
* Setup:
* Setup signal handling.
* Pause for SIGUSR1 if option specified.
*
* Test:
* Execute system call
* Check return code, if system call failed (return=-1)
* Log the errno and Issue a FAIL message.
* Otherwise, Issue a PASS message.
*
* Cleanup:
* Print errno log and/or timing stats if options given
*
* USAGE: <for command-line>
* socketcall03 [-c n] [-e] [-i n] [-I x] [-p x] [-t]
* where, -c n : Run n copies concurrently
* -e : Turn on errno logging.
* -h : Show this help screen
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* t : Turn on syscall timing.
*
* RESTRICTIONS
* None
*****************************************************************************/
#include <errno.h>
#include <asm/unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/net.h>
#include <sys/un.h>
#include <netinet/in.h>
#include "test.h"
#include "usctest.h"
_syscall2(int ,socketcall ,int ,call, unsigned long *, args);
void setup();
void cleanup();
void setup1(void);
char *TCID = "socketcall03"; /* Test program identifier. */
int TST_TOTAL = 1; /* Total number of test cases. */
extern int Tst_count; /* TestCase counter for tst_* routine */
int s;
unsigned long args[3];
struct sockaddr_in si;
struct test_case_t {
int domain;
int type;
int pro;
int call;
void (*setupfunc)(void);
char *desc;
}TC = { AF_INET, SOCK_STREAM, 6, SYS_BIND, setup1, "bind call"};
int main(int ac, char **av) {
int lc; /* loop counter */
char *msg; /* message returned from parse_opts */
if ((msg = parse_opts(ac, av, NULL, NULL)) != (char *) NULL) {
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
tst_exit();
}
/* perform global setup for test */
setup();
/* check looping state */
for (lc = 0; TEST_LOOPING(lc); lc++) {
/* reset Tst_count in case we are looping. */
Tst_count = 0;
TC.setupfunc();
TEST(socketcall(TC.call,args));
/* check return code */
if (TEST_RETURN == -1) {
tst_resm(TFAIL, "socketcall() Failed "
" with return=%d,errno=%d: %s",
TEST_RETURN, TEST_ERRNO,
strerror(TEST_ERRNO));
} else {
tst_resm(TPASS, "socketcall() passed "
"for %s with return=%d ",
TC.desc,TEST_RETURN);
close(s);
}
}
/* cleanup and exit */
cleanup();
return 0;
} /* End main */
/*setup1()*/
void setup1(void)
{
si.sin_family = AF_INET;
si.sin_addr.s_addr = htons(INADDR_ANY);
si.sin_port = 0;
if((s = socket(TC.domain, TC.type, TC.pro)) == -1) {
tst_brkm(TBROK, tst_exit, "socket creation failed");
}
args[0] = s;
args[1] = (unsigned long)&si;
args[2] = sizeof(si);
}
/* setup() - performs all ONE TIME setup for this test. */
void setup()
{
/* capture signals */
tst_sig(NOFORK, DEF_HANDLER, cleanup);
/* pause if that option was specified*/
TEST_PAUSE;
}
/*
* cleanup() - performs all ONE TIME cleanup for this test at
* completion or premature exit.
*/
void cleanup()
{
TEST_CLEANUP;
/* exit with return code appropriate for results */
tst_exit();
}
--- NEW FILE: socketcall04.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**************************************************************************
*
* TEST IDENTIFIER : socketcall04
*
* EXECUTED BY : All user
*
* TEST TITLE : Basic test for socketcall(2) for listen(2)
*
* TEST CASE TOTAL : 1
*
* AUTHOR : sowmya adiga<sow...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* This is a phase I test for the socketcall(2) system call.
* It is intended to provide a limited exposure of the system call.
*
* Setup:
* Setup signal handling.
* Pause for SIGUSR1 if option specified.
*
* Test:
* Execute system call
* Check return code, if system call failed (return=-1)
* Log the errno and Issue a FAIL message.
* Otherwise, Issue a PASS message.
*
* Cleanup:
* Print errno log and/or timing stats if options given
*
* USAGE: <for command-line>
* socketcall04 [-c n] [-e] [-i n] [-I x] [-p x] [-t]
* where, -c n : Run n copies concurrently
* -e : Turn on errno logging.
* -h : Show this help screen
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* t : Turn on syscall timing.
*
* RESTRICTIONS
* None
*****************************************************************************/
#include <errno.h>
#include <asm/unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <linux/net.h>
#include <sys/un.h>
#include <netinet/in.h>
#include "test.h"
#include "usctest.h"
_syscall2(int ,socketcall ,int ,call, unsigned long *, args);
void setup();
void cleanup();
void setup1(void);
char *TCID = "socketcall04"; /* Test program identifier. */
int TST_TOTAL = 1; /* Total number of test cases. */
extern int Tst_count; /* TestCase counter for tst_* routine */
int i,s;
unsigned long args[3];
struct sockaddr_in si;
struct test_case_t {
int domain;
int type;
int pro;
int call;
void (*setupfunc)(void);
char *desc;
}TC = { AF_INET, SOCK_STREAM, 6, SYS_LISTEN, setup1,"listen call"};
int main(int ac, char **av) {
int lc; /* loop counter */
char *msg; /* message returned from parse_opts */
if ((msg = parse_opts(ac, av, NULL, NULL)) != (char *) NULL) {
tst_brkm(TBROK, NULL, "OPTION PARSING ERROR - %s", msg);
tst_exit();
}
/* perform global setup for test */
setup();
/* check looping state */
for (lc = 0; TEST_LOOPING(lc); lc++) {
/* reset Tst_count in case we are looping. */
Tst_count = 0;
TC.setupfunc();
TEST(socketcall(TC.call,args));
/* check return code */
if (TEST_RETURN == -1) {
tst_resm(TFAIL, "socketcall() Failed "
" with return=%d,errno=%d: %s",
TEST_RETURN, TEST_ERRNO,
strerror(TEST_ERRNO));
} else {
tst_resm(TPASS, "socketcall() passed "
"for %s with return=%d ",
TC.desc,TEST_RETURN);
close(s);
}
}
/* cleanup and exit */
cleanup();
return 0;
} /* End main */
/*setup1()*/
void setup1(void)
{
if((s = socket(TC.domain, TC.type, TC.pro)) == -1) {
tst_brkm(TBROK, tst_exit, "socket creation failed");
}
args[0] = s;
args[1] = 1;
}
/* setup() - performs all ONE TIME setup for this test. */
void setup()
{
/* capture signals */
tst_sig(NOFORK, DEF_HANDLER, cleanup);
/* pause if that option was specified*/
TEST_PAUSE;
}
/*
* cleanup() - performs all ONE TIME cleanup for this test at
* completion or premature exit.
*/
void cleanup()
{
TEST_CLEANUP;
/* exit with return code appropriate for results */
tst_exit();
}
|
|
From: <ro...@us...> - 2003-01-02 15:30:15
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/socketcall In directory sc8-pr-cvs1:/tmp/cvs-serv7063/socketcall Log Message: Directory /cvsroot/ltp/ltp/testcases/kernel/syscalls/socketcall added to the repository |
|
From: <ro...@us...> - 2003-01-01 20:50:42
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/ioperm
In directory sc8-pr-cvs1:/tmp/cvs-serv6768/testcases/kernel/syscalls/ioperm
Added Files:
Makefile ioperm01.c ioperm02.c
Log Message:
Added ioperm() tests from Subhabrata Biswas.
--- NEW FILE: Makefile ---
#
# Copyright (c) International Business Machines Corp., 2001
#
# 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
#
###########################################################################
# name of file : Makefile #
###########################################################################
CFLAGS+= -I../../../../include -Wall -g
LOADLIBES+= -L../../../../lib -lltp
SRCS=$(wildcard *.c)
TARGETS=$(patsubst %.c,%,$(SRCS))
all: $(TARGETS)
install:
@for i in $(TARGETS); do ln -f $$i ../../../bin/$$i ; done
clean:
rm -f $(TARGETS)
--- NEW FILE: ioperm01.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**********************************************************
*
* TEST IDENTIFIER : ioperm01
*
* EXECUTED BY : superuser
*
* TEST TITLE : Basic test for ioperm(2)
*
* TEST CASE TOTAL : 1
*
* AUTHOR : Subhab Biswas <sub...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* This is a Phase I test for the ioperm(2) system call.
* It is intended to provide a limited exposure of the system call.
*
* Setup:
* Setup signal handling.
* Test caller is superuser
* Pause for SIGUSR1 if option specified.
*
* Test:
* Loop if the proper options are given.
* Execute system call
* Check return code, if system call failed (return=-1)
* Issue FAIL message with errno.
* Otherwise, Issue PASS message.
*
* Cleanup:
* Print errno log and/or timing stats if options given
*
* USAGE: <for command-line>
* ioperm01 [-c n] [-e] [-i n] [-I x] [-P x] [-t] [-h] [-f] [-p]
* where, -c n : Run n copies concurrently.
* -e : Turn on errno logging.
* -h : Show help screen
* -f : Turn off functional testing
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* -t : Turn on syscall timing.
*
****************************************************************/
#include <errno.h>
#include <unistd.h>
#include <sys/io.h>
#include "test.h"
#include "usctest.h"
#define IO_ADDR 0x378 /* Starting port address */
#define NUM_BYTES 3 /* number of bytes from start address */
#define TURN_ON 1
#define TURN_OFF 0
static void setup();
static void cleanup();
char *TCID = "ioperm01"; /* Test program identifier. */
int TST_TOTAL = 1; /* Total number of test cases. */
extern int Tst_count; /* Test Case counter for tst_* routines */
int
main(int ac, char **av)
{
int lc; /* loop counter */
char *msg; /* message returned from parse_opts */
/* parse standard options */
if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL))
!= (char *)NULL) {
tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
}
/* perform global setup for test */
setup();
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
/* reset Tst_count in case we are looping. */
Tst_count = 0;
/*
* Test the system call.
*/
TEST(ioperm(IO_ADDR, NUM_BYTES, TURN_ON));
if (TEST_RETURN == -1) {
tst_resm(TFAIL, "ioperm() failed for port address "
"%l, errno=%d : %s", IO_ADDR,
TEST_ERRNO, strerror(TEST_ERRNO));
} else {
tst_resm(TPASS, "ioperm() passed for port "
"address %ld, returned %d",
IO_ADDR, TEST_RETURN);
}
} /* End for TEST_LOOPING */
/* cleanup and exit */
cleanup();
/*NOTREACHED*/
return 0;
} /* End main */
/* setup() - performs all ONE TIME setup for this test */
void
setup()
{
/* capture signals */
tst_sig(NOFORK, DEF_HANDLER, cleanup);
/* Check whether we are root */
if (geteuid() != 0) {
tst_brkm(TBROK, tst_exit, "Must be root for this test!");
/*NOTREACHED*/
}
/* Pause if that option was specified */
TEST_PAUSE;
} /* End setup() */
/*
*cleanup() - performs all ONE TIME cleanup for this test at
* completion or premature exit.
*/
void
cleanup()
{
/*
* Reset I/O privileges for the specified port.
*/
if ((ioperm(IO_ADDR, NUM_BYTES, TURN_OFF)) == -1) {
tst_brkm(TBROK, tst_exit, "ioperm() cleanup failed");
}
/*
* print timing stats if that option was specified.
* print errno log if that option was specified.
*/
TEST_CLEANUP;
/* exit with return code appropriate for results */
tst_exit();
} /* End cleanup() */
--- NEW FILE: ioperm02.c ---
/*
* Copyright (c) Wipro Technologies Ltd, 2002. All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston MA 02111-1307, USA.
*
*/
/**********************************************************
*
* TEST IDENTIFIER : ioperm02
*
* EXECUTED BY : superuser
*
* TEST TITLE : Tests for error conditions
*
* TEST CASE TOTAL : 2
*
* AUTHOR : Subhab Biwas <sub...@wi...>
*
* SIGNALS
* Uses SIGUSR1 to pause before test if option set.
* (See the parse_opts(3) man page).
*
* DESCRIPTION
* Verify that
* 1) ioperm(2) returns -1 and sets errno to EINVAL for I/O port
* address greater than 0x3ff.
* 2) ioperm(2) returns -1 and sets errno to EPERM if the current
* user is not the super-user.
*
* Setup:
* Setup signal handling.
* Set expected errnos for logging
* Pause for SIGUSR1 if option specified.
*
* Test:
* Loop if the proper options are given.
* Execute system call
* Check return code and error number, if matching,
* Issue PASS message
* Otherwise,
* Issue FAIL message
* Perform testcase specific cleanup (if needed)
*
* Cleanup:
* Print errno log and/or timing stats if options given
*
* USAGE: <for command-line>
* ioperm02 [-c n] [-e] [-i n] [-I x] [-P x] [-t] [-h] [-f] [-p]
* where, -c n : Run n copies concurrently.
* -e : Turn on errno logging.
* -h : Show help screen
* -f : Turn off functional testing
* -i n : Execute test n times.
* -I x : Execute test for x seconds.
* -p : Pause for SIGUSR1 before starting
* -P x : Pause for x seconds between iterations.
* -t : Turn on syscall timing.
*
****************************************************************/
#include <errno.h>
#include <unistd.h>
#include <sys/io.h>
#include <pwd.h>
#include "test.h"
#include "usctest.h"
#define INVALID_ADDR 0x3ff /* Invalid port address */
#define VALID_ADDR 0x378 /* Valid port address */
#define NUM_BYTES 3
#define TURN_ON 1
#define TURN_OFF 0
#define EXP_RET_VAL -1
static void setup();
static int setup1(void);
static void cleanup1();
static void cleanup();
char *TCID = "ioperm02"; /* Test program identifier. */
extern int Tst_count; /* Test Case counter for tst_* routines */
static int exp_enos[] = {EINVAL, EPERM, 0};
static char nobody_uid[] = "nobody";
struct passwd *ltpuser;
struct test_cases_t {
long from; /* starting port address */
long num; /* no. of bytes from starting address */
int turn_on;
char *desc; /* test case description */
int exp_errno; /* expected error number */
} test_cases[] = {
{ INVALID_ADDR, NUM_BYTES, TURN_ON, "Invalid I/O address",
EINVAL },
{ VALID_ADDR, NUM_BYTES, TURN_ON, "Non super-user",
EPERM }
};
int TST_TOTAL = sizeof(test_cases) / sizeof(test_cases[0]);
int
main(int ac, char **av)
{
int lc, i; /* loop counter */
char *msg; /* message returned from parse_opts */
/* parse standard options */
if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL))
!= (char *)NULL) {
tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
}
/* perform global setup for test */
setup();
/* check looping state if -i option given */
for (lc = 0; TEST_LOOPING(lc); lc++) {
/* reset Tst_count in case we are looping. */
Tst_count = 0;
for (i = 0; i < TST_TOTAL; ++i) {
if (i == 1) {
/* setup Non super-user for second test */
if (setup1()) {
/* setup1() failed, skip this test */
continue;
}
}
/* Test the system call */
TEST(ioperm(test_cases[i].from,
test_cases[i].num, test_cases[i].turn_on));
if ((TEST_RETURN == EXP_RET_VAL) &&
(TEST_ERRNO == test_cases[i].exp_errno)) {
tst_resm(TPASS, "Expected failure for %s, "
"errno: %d", test_cases[i].desc,
TEST_ERRNO);
} else {
tst_resm(TFAIL, "Unexpected results for %s ; "
"returned %d (expected %d), errno %d "
"(expected errno %d)",
test_cases[i].desc,
TEST_RETURN, EXP_RET_VAL,
TEST_ERRNO, test_cases[i].exp_errno);
}
TEST_ERROR_LOG(TEST_ERRNO);
if (i == 1) {
/* revert back to super user */
cleanup1();
}
}
} /* End for TEST_LOOPING */
/* cleanup and exit */
cleanup();
/*NOTREACHED*/
return 0;
} /* End main */
/* setup1() - set up non-super user for second test case */
int
setup1(void)
{
/* switch to "nobody" user */
if (seteuid(ltpuser->pw_uid) == -1) {
tst_resm(TWARN, "Failed to set effective"
"uid to %d", ltpuser->pw_uid);
return 1;
}
return 0;
}
/* cleanup1() - reset to super user for first test case */
void
cleanup1()
{
/* reset user as root */
if (seteuid(0) == -1) {
tst_brkm(TBROK, tst_exit, "Failed to set uid as root");
}
}
/* setup() - performs all ONE TIME setup for this test */
void
setup()
{
/* capture signals */
tst_sig(NOFORK, DEF_HANDLER, cleanup);
/* Check whether we are root */
if (geteuid() != 0) {
tst_brkm(TBROK, tst_exit, "Must be root for this test!");
}
/* Check if "nobody" user id exists */
if ((ltpuser = getpwnam(nobody_uid)) == NULL) {
tst_brkm(TBROK, tst_exit, "\"nobody\" user id doesn't exist");
}
/* Set up the expected error numbers for -e option */
TEST_EXP_ENOS(exp_enos);
/* Pause if that option was specified */
TEST_PAUSE;
} /* End setup() */
void
cleanup()
{
/*
* print timing stats if that option was specified.
* print errno log if that option was specified.
*/
TEST_CLEANUP;
/* exit with return code appropriate for results */
tst_exit();
} /* End cleanup() */
|
|
From: <ro...@us...> - 2003-01-01 20:50:40
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv6768/runtest Modified Files: syscalls Log Message: Added ioperm() tests from Subhabrata Biswas. Index: syscalls =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/syscalls,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- syscalls 1 Jan 2003 20:44:12 -0000 1.96 +++ syscalls 1 Jan 2003 20:50:36 -0000 1.97 @@ -280,6 +280,9 @@ ioctl01 ioctl01 -D /dev/ttyS0 ioctl02 ioctl02 -D /dev/ttyS0 +ioperm01 ioperm01 +ioperm02 ioperm02 + iopl01 iopl01 iopl02 iopl02 |