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: <iye...@us...> - 2003-01-04 05:00:59
|
Update of /cvsroot/ltp/ltp/testcases/commands/eject
In directory sc8-pr-cvs1:/tmp/cvs-serv29454
Modified Files:
eject-tests.sh
Log Message:
Modified. Added test #3.
Index: eject-tests.sh
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/commands/eject/eject-tests.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- eject-tests.sh 3 Jan 2003 21:52:02 -0000 1.3
+++ eject-tests.sh 4 Jan 2003 05:00:56 -0000 1.4
@@ -26,6 +26,7 @@
#
# History: Jan 01 2003 - Created - Manoj Iyer.
# - Added - Test #2.
+# Jan 03 2003 - Added - Test #3.
#
#! /bin/sh
@@ -89,22 +90,75 @@
export TCID=eject02
export TST_COUNT=2
+RC=0
-$LTPBIN/tst_resm TINFO "Test #1: eject commad with no options"
-$LTPBIN/tst_resm TINFO "Test #1: will eject the default cdrom device."
+$LTPBIN/tst_resm TINFO "Test #2: eject commad with no options"
+$LTPBIN/tst_resm TINFO "Test #2: will eject the default cdrom device."
eject &>$LTPTMP/tst_eject.res || RC=$?
if [ $RC -eq 0 ]
then
- $LTPBIN/tst_resm TPASS "Test #1: eject succeded"
+ $LTPBIN/tst_resm TPASS "Test #2: eject succeded"
else
echo "Error code returned by eject: $RC" >> $LTPTMP/tst_eject.res \
2&/dev/null
$LTPBIN/tst_res TFAIL $LTPTMP/tst_eject.res \
- "Test #1: eject failed. Reason:"
+ "Test #2: eject failed. Reason:"
TFAILCNT=$((TFAILCNT+1))
fi
+# Test #3
+# Test the eject command will eject the default cdrom device and also unmount
+# device if it is currently mounted.
+
+export TCID=eject03
+export TST_COUNT=3
+
+$LTPBIN/tst_resm TINFO "Test #3: eject command will eject the default cdrom"
+$LTPBIN/tst_resm TINFO "Test #3: device and also unmount the device if it"
+$LTPBIN/tst_resm TINFO "Test #3: is currently mounted."
+
+cp /etc/fstab $LTPTMP/fstab.bak &>/dev/null
+mkdir $LTPTMP/cdrom &>/dev/null
+
+echo "/dev/cdrom $LTPTMP/cdrom iso9660 defaults,ro,user,noauto 0 0" \
+ >> /etc/fstab 2>/dev/null
+
+mount $LTPTMP/cdrom &>$LTPTMP/tst_eject.out || RC=$?
+if [ $RC -eq 0 ]
+then
+ echo ".Failed to mount $LTPTMP/cdrom." >> $LTPTMP/tst_eject.out 2>/dev/null
+ $LTPBIN/tst_brk TBROK tst_eject.out "Test #3: mount failed. Reason:"
+ TFAILCNT=$((TFAILCNT+1))
+else
+ eject &>$LTPTMP/tst_eject.out || RC=$?
+ if [ $RC -eq 0 ]
+ then
+ mount &>$LTPTMP/tst_eject.res
+ grep "$LTPTMP/cdrom" $LTPTMP/tst_eject.res &>$LTPTMP/tst_eject.out \
+ || RC=$?
+ if [ $RC -ne 0 ]
+ then
+ $LTPBIN/tst_resm TPASS "Test #3: eject unmounted device"
+ else
+ $LTPBIN/tst_resm TFAIL \
+ "Test #3: eject failed to unmount /dev/cdrom."
+ TFAILCNT=$((TFAILCNT+1))
+ fi
+ else
+ $LTPBIN/tst_res TFAIL $LTPTMP/tst_eject.out \
+ "Test #3: eject failed. Reason:"
+ TFAILCNT=$((TFAILCNT+1))
+ fi
+fi
+
+if [ -f $LTPTMP/fstab.bak ]
+then
+ cp $LTPTMP/fstab.bak /etc/fstab &>/dev/null
+else
+ $LTPBIN/tst_res TINFO "Test #3: Could not restore /etc/fstab coz"
+ $LTPBIN/tst_res TINFO "Test #3: backup file $LTPTMP/fstab.bak was lost!"
+fi
#CLEANUP & EXIT
# remove all the temporary files created by this test.
|
|
From: <ro...@us...> - 2003-01-03 23:10:34
|
Update of /cvsroot/ltp/ltp/testcases/misc/math/atof
In directory sc8-pr-cvs1:/tmp/cvs-serv3466/testcases/misc/math/atof
Added Files:
Makefile atof01.c
Log Message:
Added atof() 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+= -lm -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: atof01.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
* atof1 -- ascii to floating point test
*
* CALLS
* atof(3), sprintf(3), ( doprnt.s )
*
* ALGORITHM
* Do some checks of floating point to ascii and back, arbitrate
* with a 3rd algorithm written in C.
*
* RESTRICTIONS
*/
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
#include <errno.h>
/** LTP Port **/
#include "test.h"
#include "usctest.h"
#define FAILED 0
#define PASSED 1
/***** *****/
#define ERR 0.0000001
double pi;
double atof();
/*char progname[]= "atof1()"; */
/** LTP Port **/
char *TCID = "atof01"; /* Test program identifier*/
int local_flag = PASSED;
int block_number;
int errno;
FILE *temp;
int TST_TOTAL = 1;
extern int Tst_count; /* Test Case counter for tst_routines */
void setup();
int blenter();
int blexit();
int numin(char*, double*);
int checkbuf(char*, int, int);
/*--------------------------------------------------------------*/
int main (int argc, char *argv[])
{
register int i, j;
double r1, r2, x;
char buf[100];
setup(); /* temp file is now open */
pi = 4.0 * atan(1.0);
/*--------------------------------------------------------------*/
blenter();
for (i=0; i < 30; i++)
for (j=0; j < 30; j++) {
sprintf(buf, "%*.*f", i, j, pi);
if (checkbuf(buf, i, j)) {
fprintf(temp, "output conversion incorrect.");
fprintf(temp, "%*.*f = '%s'",
i, j, pi,buf);
local_flag = FAILED;
}
r1 = atof(buf);
if (numin(buf, &r2)) {
fprintf(temp, "\tnumin('%s') failed\n", buf);
local_flag = FAILED;
}
x = fabs(r1 - r2);
if (x > ERR) {
fprintf(temp, "\tcompare fails, %f vs %f\n",
r1, r2);
fprintf(temp, "\terr value is %f\n", x);
local_flag = FAILED;
}
if (local_flag == FAILED)
break;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
x = 1.0 - exp(-100.0); /* 1.0 - very small number */
sprintf(buf, "%f", x);
r1 = atof(buf);
if (r1 != 1.0) {
fprintf(temp, "\tsprintf small # failed\n");
fprintf(temp, "\t printed '%s', expected 1.0\n", buf);
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
for (i=1; i < 200; i++) {
x = 100.0 / (double) i;
sprintf(buf, "%f", x);
r1 = atof(buf);
if (numin(buf, &r2)) {
fprintf(temp, "\tnumin('%s') failed\n", buf);
local_flag = FAILED;
}
/*
* Order subtraction to produce a positive number.
* Then subtrace "fudge" factor which should give us
* a negative number, as the result fo subtraction should
* always be smaller than the fudge factor.
*/
if (r1 > r2)
x = r1 - r2 - 1e-10;
else
x = r2 - r1 - 1e-10;
if (x > 0.0) {
fprintf(temp, "\tx = %.15f = %e\n", x, x);
fprintf(temp, "\titeration %d\n", i);
fprintf(temp, "\tcompare fails, %f vs %f\n",
r1, r2);
fprintf(temp, "\tcompare fails, %.15f vs %.15f\n",
r1, r2);
fprintf(temp, "\tbuf = '%s'\n", buf);
x = r1 - r2;
if (x == 0.0)
fprintf(temp, "\tx == 0.0\n");
else
fprintf(temp, "\tx != 0.0\n");
fprintf(temp, "\tx = %.15f = %e\n", x, x);
local_flag = FAILED;
}
if (local_flag == FAILED)
break;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
for (i= -1; i > -200; i--) {
x = 100.0 / (double) i;
sprintf(buf, "%f", x);
r1 = atof(buf);
if (numin(buf, &r2)) {
fprintf(temp, "\tnumin('%s') failed\n", buf);
local_flag = FAILED;
}
/*
* Same ordering of subtraction as above.
*/
if (r1 > r2)
x = r1 - r2 - 1e-10;
else
x = r2 - r1 - 1e-10;
if (x > 0.0) {
fprintf(temp, "\tcompare fails, %f vs %f\n",
r1, r2);
fprintf(temp, "\tcompare fails, %.15f vs %.15f\n",
r1, r2);
x = r1 - r2;
if ( x == 0.0)
fprintf(temp, "\tx == 0.0)\n");
else
fprintf(temp, "\tx != 0.0\n");
fprintf(temp, "\tx = %.15f = %e\n", x, x);
local_flag = FAILED;
}
if (local_flag == FAILED)
break;
}
blexit();
/*--------------------------------------------------------------*/
tst_exit(); /* THIS CALL DOES NOT RETURN - EXITS!! */
/*--------------------------------------------------------------*/
return(0);
}
/* FUNCTIONS GO HERE */
int
numin(str, rval)
char *str;
double *rval;
{
register int i, v3, e_flag;
register char c;
double val, v1, v2, k;
int neg_flag = 0;
val = v1 = v2 = 0.0;
v3 = 0;
k = 0.1;
while (*str == ' ') /* scan past white space */
str++;
if (*str == '-') { /* negitive value test */
neg_flag++;
str++;
}
for (;;) {
c = *str;
if (!isdigit(c))
break;
v1 *= 10.0;
v1 += (double) (c - '0');
str++;
}
val = v1;
#ifdef DEBUG
printf("First conversion, val = %f = %e\n", val, val);
#endif
if (*str == '.') {
str++;
for (;;) {
c = *str;
if (!isdigit(c))
break;
v2+= k * (double) (c - '0');
k /= 10.0;
str++;
}
val += v2;
}
#ifdef DEBUG
printf("Second conversion, val = %f = %e\n", val, val);
#endif
if (*str == 'e') {
str++;
switch (*str) {
case '+':
e_flag = 1;
break;
case '-':
e_flag = -1;
break;
default:
fprintf(temp, "\tbad char '%c' after 'e'\n", *str);
printf("bad char '%c' after 'e'\n", *str);
return(-1);
}
str++;
if (!isdigit(*str)) {
fprintf(temp, "\tbad exponent field\n");
printf("bad exponent field\n");
return(-1);
}
v3 = 10 * (int) (*str - '0');
str++;
if (!isdigit(*str)) {
fprintf(temp, "\tbad exponent field\n");
printf("bad exponent field\n");
return(-1);
}
v3 += (int) (*str - '0');
str++;
for (i=0; i < v3; i++) {
if (e_flag > 0)
val *= 10.0;
else
val *= 0.1;
}
}
if (neg_flag)
val *= -1.0;
#ifdef DEBUG
printf("Third conversion, val = %f = %e\n", val, val);
printf("v1 = %f, v2 = %f, v3 = %d\n", v1, v2, v3);
#endif
switch (*str) {
case '\0':
case ' ':
case '\t':
case '\n':
break;
default:
printf("unexpected char '%c'\n", *str);
return(-1);
}
*rval = val;
return(0);
}
int checkbuf(str, n1, n2)
char *str;
int n1;
int n2;
{
register int bd; /* before decimal point */
register int ad; /* after decimal point */
register int tw; /* total width */
register int dp; /* decimal point */
char *buf;
bd = ad = dp = 0;
buf = str;
while (*str && *str != '.') {
bd++;
str++;
}
if (*str == '.') {
dp++;
str++;
if (*str) {
while (*str) {
ad++;
str++;
}
}
}
tw = bd + dp + ad;
if (!n1)
n1++;
if (tw < n1) {
fprintf(temp, "\tWidth too small.\n");
fprintf(temp, "\tn1 = %d, n2 = %d, buf= '%s'\n", n1, n2, buf);
return (-1);
}
if (ad != n2) {
fprintf(temp, "\tNumber after decimal wrong.\n");
fprintf(temp, "\tn1 = %d, n2 = %d, buf= '%s'\n", n1, n2, buf);
return (-1);
}
if (n2 && !dp) {
fprintf(temp, "\tMissed decimal point.\n");
fprintf(temp, "\tn1 = %d, n2 = %d, buf= '%s'\n", n1, n2, buf);
return (-1);
}
return(0);
}
/** LTP Port **/
void setup()
{
temp = stderr;
}
int blenter()
{
local_flag = PASSED;
return(0);
}
int blexit()
{
(local_flag == PASSED ) ? tst_resm(TPASS, "Test passed\n") : tst_resm(TFAIL, "Test failed\n");
return(0);
}
|
|
From: <ro...@us...> - 2003-01-03 23:10:34
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv3466/runtest Modified Files: math Log Message: Added atof() test ported by Ananda Venkataraman. Index: math =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/math,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- math 3 Jan 2003 22:50:19 -0000 1.3 +++ math 3 Jan 2003 23:10:29 -0000 1.4 @@ -1,5 +1,7 @@ abs01 abs01 +atof01 atof01 + float_bessel float_bessel -D $LTPROOT/testcases/bin -v float_exp_log float_exp_log -D $LTPROOT/testcases/bin -v float_iperb float_iperb -D $LTPROOT/testcases/bin -v |
|
From: <ro...@us...> - 2003-01-03 23:10:34
|
Update of /cvsroot/ltp/ltp/testcases/misc/math In directory sc8-pr-cvs1:/tmp/cvs-serv3466/testcases/misc/math Modified Files: Makefile Log Message: Added atof() test ported by Ananda Venkataraman. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/misc/math/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 3 Jan 2003 22:50:19 -0000 1.2 +++ Makefile 3 Jan 2003 23:10:30 -0000 1.3 @@ -1,4 +1,4 @@ -SUBDIRS = abs float fptests nextafter +SUBDIRS = abs atof float fptests nextafter all: @for i in $(SUBDIRS); do $(MAKE) -C $$i ; done |
|
From: <ro...@us...> - 2003-01-03 23:09:01
|
Update of /cvsroot/ltp/ltp/testcases/misc/math/atof In directory sc8-pr-cvs1:/tmp/cvs-serv2969/atof Log Message: Directory /cvsroot/ltp/ltp/testcases/misc/math/atof added to the repository |
|
From: <ro...@us...> - 2003-01-03 22:50:22
|
Update of /cvsroot/ltp/ltp/testcases/misc/math/nextafter
In directory sc8-pr-cvs1:/tmp/cvs-serv28806/testcases/misc/math/nextafter
Added Files:
Makefile nextafter01.c
Log Message:
Added nextafter() 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+= -lm -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: nextafter01.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
* scalb
*
* CALLS
* nextafter(3C)
*
* ALGORITHM
* Check results from the above functions against expected values.
*
* RESTRICTIONS
* Checks for basic functionality, nothing fancy
*/
#include <stdio.h>
#include <math.h>
#include <errno.h>
#include <stdlib.h>
#include "test.h"
#include "usctest.h"
#define FAILED 0
#define PASSED 1
char *TCID = "nextafter01";
int local_flag = PASSED;
int block_number;
int errno;
FILE *temp;
int TST_TOTAL = 1;
extern int Tst_count;
void setup();
int blenter();
int blexit();
/*--------------------------------------------------------------*/
int main()
{
double answer;
double check; /* tmp variable */
setup(); /* temp file is now open */
/*--------------------------------------------------------------*/
blenter();
answer = nextafter(1.0, 1.1);
check = (answer + 1.0) / 2;
if ((check != answer) && ((float)check != 1.0)) {
fprintf(temp, "nextafter returned %e, expected answer or 1.0\n",
answer);
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
answer = nextafter(1.0, 0.9);
if ((check != answer) && (check != 1.0)) {
fprintf(temp, "nextafter returned %e, expected answer or 1.0\n",
answer);
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
answer = nextafter(1.0, 1.0);
if (answer != 1.0) {
fprintf(temp, "nextafter 3 returned %e, expected 1.0\n",
answer);
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
tst_exit(); /* THIS CALL DOES NOT RETURN - EXITS!! */
return(0);
}
/*--------------------------------------------------------------*/
/***** ***** LTP Port *****/
/* FUNCTIONS */
void setup()
{
temp = stderr;
}
int blenter()
{
local_flag = PASSED;
return(0);
}
int blexit()
{
(local_flag == PASSED ) ? tst_resm(TPASS, "Test passed\n") : tst_resm(TFAIL, "Test failed\n");
return(0);
}
/***** ***** *****/
|
|
From: <ro...@us...> - 2003-01-03 22:50:22
|
Update of /cvsroot/ltp/ltp/testcases/misc/math In directory sc8-pr-cvs1:/tmp/cvs-serv28806/testcases/misc/math Modified Files: Makefile Log Message: Added nextafter() test ported by Ananda Venkataraman. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/misc/math/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 4 Dec 2002 21:47:14 -0000 1.1 +++ Makefile 3 Jan 2003 22:50:19 -0000 1.2 @@ -1,4 +1,4 @@ -SUBDIRS = float fptests +SUBDIRS = abs float fptests nextafter all: @for i in $(SUBDIRS); do $(MAKE) -C $$i ; done |
|
From: <ro...@us...> - 2003-01-03 22:50:22
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv28806/runtest Modified Files: math Log Message: Added nextafter() test ported by Ananda Venkataraman. Index: math =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/math,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- math 3 Jan 2003 21:42:16 -0000 1.2 +++ math 3 Jan 2003 22:50:19 -0000 1.3 @@ -10,3 +10,4 @@ fptest02 fptest02 fptest03 fptest03 +nextafter01 nextafter01 |
|
From: <ro...@us...> - 2003-01-03 22:48:45
|
Update of /cvsroot/ltp/ltp/testcases/misc/math/abs In directory sc8-pr-cvs1:/tmp/cvs-serv28349 Modified Files: abs01.c Log Message: Corrected copyright info. Index: abs01.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/misc/math/abs/abs01.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- abs01.c 3 Jan 2003 21:42:16 -0000 1.1 +++ abs01.c 3 Jan 2003 22:48:42 -0000 1.2 @@ -1,19 +1,24 @@ -/* IBM Corporation */ -/* 01/02/2003 Port to LTP av...@us... */ -/* 06/30/2001 Port to Linux nsh...@us... */ - /* - * $Copyright: $ - * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 - * Sequent Computer Systems, Inc. All rights reserved. - * - * This software is furnished under a license and may be used - * only in accordance with the terms of that license and with the - * inclusion of the above copyright notice. This software may not - * be provided or otherwise made available to, or used by, any - * other person. No title to or ownership of the software is - * hereby transferred. + * + * 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 |
|
From: <ro...@us...> - 2003-01-03 22:40:13
|
Update of /cvsroot/ltp/ltp/testcases/misc/math/nextafter In directory sc8-pr-cvs1:/tmp/cvs-serv25485/nextafter Log Message: Directory /cvsroot/ltp/ltp/testcases/misc/math/nextafter added to the repository |
|
From: <iye...@us...> - 2003-01-03 21:52:07
|
Update of /cvsroot/ltp/ltp/testcases/commands/eject In directory sc8-pr-cvs1:/tmp/cvs-serv6425 Modified Files: eject-tests.sh Log Message: Minor mods Index: eject-tests.sh =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/commands/eject/eject-tests.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- eject-tests.sh 3 Jan 2003 21:50:10 -0000 1.2 +++ eject-tests.sh 3 Jan 2003 21:52:02 -0000 1.3 @@ -88,7 +88,7 @@ # Test that eject -d lists the default device. export TCID=eject02 -export TST_COUNT=1 +export TST_COUNT=2 $LTPBIN/tst_resm TINFO "Test #1: eject commad with no options" $LTPBIN/tst_resm TINFO "Test #1: will eject the default cdrom device." |
|
From: <iye...@us...> - 2003-01-03 21:50:13
|
Update of /cvsroot/ltp/ltp/testcases/commands/eject
In directory sc8-pr-cvs1:/tmp/cvs-serv5686
Modified Files:
eject-tests.sh
Log Message:
added test #2 to eject-test.sh
Index: eject-tests.sh
===================================================================
RCS file: /cvsroot/ltp/ltp/testcases/commands/eject/eject-tests.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- eject-tests.sh 3 Jan 2003 20:58:21 -0000 1.1
+++ eject-tests.sh 3 Jan 2003 21:50:10 -0000 1.2
@@ -25,6 +25,7 @@
# Author: Manoj Iyer, ma...@ma...
#
# History: Jan 01 2003 - Created - Manoj Iyer.
+# - Added - Test #2.
#
#! /bin/sh
@@ -50,11 +51,13 @@
TFAILCNT=0
RC=0
+RC1=0
+RC2=0
# Test #1
# Test that eject -d lists the default device.
-export TCID=logrotate01
+export TCID=eject01
export TST_COUNT=1
$LTPBIN/tst_resm TINFO "Test #1: eject -d will list the default device."
@@ -63,8 +66,10 @@
if [ $RC -eq 0 ]
then
grep "eject: default device:" $LTPTMP/tst_eject.res \
- &>$LTPTMP/tst_eject.out || RC=$?
- if [ $RC -eq 0 ]
+ &>$LTPTMP/tst_eject.out || RC1=$?
+ grep "cdrom" $LTPTMP/tst_eject.res \
+ 2>&1 1>>$LTPTMP/tst_eject.out || RC2=$?
+ if [[ $RC1 -eq 0 && $RC2 -eq 0 ]]
then
$LTPBIN/tst_resm TPASS "Test #1: eject -d lists the default device"
else
@@ -79,8 +84,29 @@
fi
+# Test #2
+# Test that eject -d lists the default device.
+
+export TCID=eject02
+export TST_COUNT=1
+
+$LTPBIN/tst_resm TINFO "Test #1: eject commad with no options"
+$LTPBIN/tst_resm TINFO "Test #1: will eject the default cdrom device."
+
+eject &>$LTPTMP/tst_eject.res || RC=$?
+if [ $RC -eq 0 ]
+then
+ $LTPBIN/tst_resm TPASS "Test #1: eject succeded"
+else
+ echo "Error code returned by eject: $RC" >> $LTPTMP/tst_eject.res \
+ 2&/dev/null
+ $LTPBIN/tst_res TFAIL $LTPTMP/tst_eject.res \
+ "Test #1: eject failed. Reason:"
+ TFAILCNT=$((TFAILCNT+1))
+fi
+
+
#CLEANUP & EXIT
# remove all the temporary files created by this test.
rm -f $LTPTMP/tst_eject*
-
exit $TFAILCNT
|
|
From: <ro...@us...> - 2003-01-03 21:42:19
|
Update of /cvsroot/ltp/ltp/testcases/misc/math/abs
In directory sc8-pr-cvs1:/tmp/cvs-serv3101/testcases/misc/math/abs
Added Files:
Makefile abs01.c
Log Message:
Added abs() 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
LOADLIBES+= -lm -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: abs01.c ---
/* IBM Corporation */
/* 01/02/2003 Port to LTP av...@us... */
/* 06/30/2001 Port to Linux nsh...@us... */
/*
* $Copyright: $
* Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989
* Sequent Computer Systems, Inc. All rights reserved.
*
* This software is furnished under a license and may be used
* only in accordance with the terms of that license and with the
* inclusion of the above copyright notice. This software may not
* be provided or otherwise made available to, or used by, any
* other person. No title to or ownership of the software is
* hereby transferred.
*/
/*
* NAME
* abs -- absolute integer value
*
* CALLS
* abs(3)
*
* ALGORITHM
* Check with variables. Also most neg value as listed
* on man page.
*
* RESTRICTIONS
* considered a long time - estimate this one
*/
#include <stdio.h> /* needed by testhead.h */
#include <stdlib.h>
#include <unistd.h>
#include <ctype.h>
#include <math.h>
#include <errno.h>
#include <values.h>
/***** LTP Port *****/
#include "test.h"
#include "usctest.h"
#define FAILED 0
#define PASSED 1
char *TCID = "abs01";
int local_flag = PASSED;
int block_number;
int errno;
FILE * temp;
int TST_TOTAL =1;
extern int Tst_count;
void setup();
int blenter();
int blexit();
/********************************/
/*--------------------------------------------------------------*/
int main (argc, argv)
int argc;
char *argv[];
{
register int i,j, k, l;
setup(); /* temp file is now open */
/*--------------------------------------------------------------*/
blenter();
i = abs(MININT);
if (i != MININT) {
fprintf(temp, "abs of minimum integer failed.");
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
i = abs(0);
if (i != 0) {
fprintf(temp, "abs(0) failed, returned 0x%x\n", i);
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
blenter();
for (i = 1; i >= 0 ; i <<= 1) {
j = ~i;
k = j + 1;
l = abs(k);
if (l != i)
local_flag = FAILED;
}
blexit();
/*--------------------------------------------------------------*/
/* Clean up any files created by test before call to anyfail. */
tst_exit(); /* THIS CALL DOES NOT RETURN - EXITS!! */
return(0);
}
/*--------------------------------------------------------------*/
/***** LTP Port *****/
void setup()
{
temp = stderr;
}
int blenter()
{
local_flag = PASSED;
return(0);
}
int blexit()
{
(local_flag == PASSED ) ? tst_resm(TPASS, "Test passed\n") : tst_resm(TFAIL, "Test failed\n");
return(0);
}
/****** *****/
|
|
From: <ro...@us...> - 2003-01-03 21:42:19
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv3101/runtest Modified Files: math Log Message: Added abs() test ported by Ananda Venkataraman. Index: math =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/math,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- math 4 Dec 2002 21:59:53 -0000 1.1 +++ math 3 Jan 2003 21:42:16 -0000 1.2 @@ -1,3 +1,5 @@ +abs01 abs01 + float_bessel float_bessel -D $LTPROOT/testcases/bin -v float_exp_log float_exp_log -D $LTPROOT/testcases/bin -v float_iperb float_iperb -D $LTPROOT/testcases/bin -v |
|
From: <ro...@us...> - 2003-01-03 21:16:53
|
Update of /cvsroot/ltp/ltp/testcases/misc/math/abs In directory sc8-pr-cvs1:/tmp/cvs-serv27492/abs Log Message: Directory /cvsroot/ltp/ltp/testcases/misc/math/abs added to the repository |
|
From: <ro...@us...> - 2003-01-03 21:00:48
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv20890 Modified Files: syscalls Log Message: Added mallopt() test. Index: syscalls =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/syscalls,v retrieving revision 1.104 retrieving revision 1.105 diff -u -d -r1.104 -r1.105 --- syscalls 3 Jan 2003 20:40:22 -0000 1.104 +++ syscalls 3 Jan 2003 21:00:43 -0000 1.105 @@ -331,6 +331,8 @@ lstat02 lstat02 lstat03 lstat03 +mallopt01 mallopt01 + memset01 memset01 memcmp01 memcmp01 memcpy01 memcpy01 |
|
From: <iye...@us...> - 2003-01-03 20:58:25
|
Update of /cvsroot/ltp/ltp/testcases/commands/eject
In directory sc8-pr-cvs1:/tmp/cvs-serv19791
Added Files:
eject-tests.sh
Log Message:
Added new test case to test eject command
--- NEW FILE: eject-tests.sh ---
################################################################################
## ##
## 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 ##
## ##
################################################################################
#
# File : eject_tests.sh
#
# Description: Tests basic functionality of eject command.
#
# Author: Manoj Iyer, ma...@ma...
#
# History: Jan 01 2003 - Created - Manoj Iyer.
#
#! /bin/sh
export TST_TOTAL=3
if [[ -z $LTPTMP && -z $TMPBASE ]]
then
LTPTMP=/tmp
else
LTPTMP=$TMPBASE
fi
if [[ -z $LTPBIN && -z $LTPROOT ]]
then
LTPBIN=./
else
LTPBIN=$LTPROOT/testcases/bin
fi
# Set return code RC variable to 0, it will be set with a non-zero return code
# in case of error. Set TFAILCNT to 0, increment if there occures a failure.
TFAILCNT=0
RC=0
# Test #1
# Test that eject -d lists the default device.
export TCID=logrotate01
export TST_COUNT=1
$LTPBIN/tst_resm TINFO "Test #1: eject -d will list the default device."
eject -d &>$LTPTMP/tst_eject.res || RC=$?
if [ $RC -eq 0 ]
then
grep "eject: default device:" $LTPTMP/tst_eject.res \
&>$LTPTMP/tst_eject.out || RC=$?
if [ $RC -eq 0 ]
then
$LTPBIN/tst_resm TPASS "Test #1: eject -d lists the default device"
else
$LTPBIN/tst_res TFAIL $LTPTMP/tst_eject.out \
"Test #1: eject -d failed to list. Reason:"
TFAILCNT=$((TFAILCNT+1))
fi
else
echo "return code from eject = $RC" > $LTPTMP/tst_eject.out 2>/dev/null
$LTPBIN/tst_res TFAIL $LTPTMP/tst_eject.out \
"Test #1: eject failed. Reason: "
fi
#CLEANUP & EXIT
# remove all the temporary files created by this test.
rm -f $LTPTMP/tst_eject*
exit $TFAILCNT
|
|
From: <iye...@us...> - 2003-01-03 20:57:42
|
Update of /cvsroot/ltp/ltp/testcases/commands/eject In directory sc8-pr-cvs1:/tmp/cvs-serv19502/eject Log Message: Directory /cvsroot/ltp/ltp/testcases/commands/eject added to the repository |
|
From: <ro...@us...> - 2003-01-03 20:53:17
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls In directory sc8-pr-cvs1:/tmp/cvs-serv16712/syscalls Modified Files: Makefile Log Message: Added mallopt() test ported by Ananda Venkataraman. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/Makefile,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- Makefile 3 Jan 2003 20:40:23 -0000 1.48 +++ Makefile 3 Jan 2003 20:53:14 -0000 1.49 @@ -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 memcmp memcpy memset\ + listen llseek lseek lstat mallopt memcmp 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:53:17
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/mallopt
In directory sc8-pr-cvs1:/tmp/cvs-serv16712/syscalls/mallopt
Added Files:
Makefile mallopt01.c
Log Message:
Added mallopt() 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: mallopt01.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
* mallopt
*
* CALLS
* malloc(3x), mallopt(3x), mallinfo(3x).
*
* ALGORITHM
* Set options, malloc memory, and check resource ussage.
*
* RESTRICTIONS
*/
#include <stdio.h> /* needed by testhead.h */
#include <malloc.h>
#include <errno.h>
/***** LTP Port *****/
#include "test.h"
#include "usctest.h"
#define FAILED 0
#define PASSED 1
int local_flag = PASSED;
char *TCID = "mallopt01()";
int block_number;
int errno;
FILE *temp;
int TST_TOTAL = 1;
extern int Tst_COUNT; /* Test Case counter for tst_routines */
void printinfo();
/***** * * *****/
struct mallinfo info;
/*--------------------------------------------------------------*/
int main (int argc, char *argv[])
{
char * buf;
int flag;
temp = stderr;
tst_tmpdir();
/*--------------------------------------------------------------*/
local_flag = PASSED;
flag = 0;
if ((buf = malloc(20480)) == NULL) {
tst_resm(TBROK, "Reason: Malloc failed! %s\n", strerror(errno));
tst_exit();
}
/*
* Check space usage.
*/
info = mallinfo();
if (info.uordblks < 20480) {
fprintf(temp, "mallinfo failed: uordblks < 20K\n");
flag = 1;
local_flag = FAILED;
};
if (info.usmblks != 0) {
fprintf(temp, "mallinfo failed: usmblks != 0\n");
flag = 1;
local_flag = FAILED;
}
if (info.smblks != 0) {
fprintf(temp, "mallinfo failed: smblks != 0\n");
flag = 1;
local_flag = FAILED;
}
if (flag == 1) {
printinfo();
flag = 0;
}
free(buf);
/*
* Test mallopt's M_MXFAST and M_NLBLKS cmds.
*/
mallopt(M_MXFAST, 2048);
mallopt(M_NLBLKS, 50);
if ((buf = malloc(1024)) == NULL) {
tst_resm(TBROK, "Reason:Malloc failed. %s\n", strerror(errno));
tst_exit();
}
free(buf);
(local_flag == PASSED ) ? tst_resm(TPASS, "Test passed\n") : tst_resm(TFAIL, "Test failed\n");
/*--------------------------------------------------------------*/
/* Clean up any files created by test before call to anyfail. */
unlink("core");
tst_rmdir();
tst_exit(); /* THIS CALL DOES NOT RETURN - EXITS!! */
return(0);
}
/*--------------------------------------------------------------*/
void printinfo()
{
fprintf(temp, "mallinfo structure:\n");
fprintf(temp, "mallinfo.arena = %d\n", info.arena);
fprintf(temp, "mallinfo.ordblks = %d\n", info.ordblks);
fprintf(temp, "mallinfo.smblks = %d\n", info.smblks);
fprintf(temp, "mallinfo.hblkhd = %d\n", info.hblkhd);
fprintf(temp, "mallinfo.hblks = %d\n", info.hblks);
fprintf(temp, "mallinfo.usmblks = %d\n", info.usmblks);
fprintf(temp, "mallinfo.fsmblks = %d\n", info.fsmblks);
fprintf(temp, "mallinfo.uordblks = %d\n", info.uordblks);
fprintf(temp, "mallinfo.fordblks = %d\n", info.fordblks);
fprintf(temp, "mallinfo.keepcost = %d\n", info.keepcost);
}
|
|
From: <ro...@us...> - 2003-01-03 20:44:36
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/memcmp In directory sc8-pr-cvs1:/tmp/cvs-serv13096 Modified Files: memcmp01.c Log Message: Corrected copyright info. Index: memcmp01.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/memcmp/memcmp01.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- memcmp01.c 3 Jan 2003 20:40:25 -0000 1.1 +++ memcmp01.c 3 Jan 2003 20:44:31 -0000 1.2 @@ -1,19 +1,24 @@ -/* IBM Corporation */ -/* 01/02/2003 Port to LTP avenkat&us.ibm.com */ -/* 06/30/2001 Port to Linux nsh...@us... */ - /* - * $Copyright: $ - * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 - * Sequent Computer Systems, Inc. All rights reserved. - * - * This software is furnished under a license and may be used - * only in accordance with the terms of that license and with the - * inclusion of the above copyright notice. This software may not - * be provided or otherwise made available to, or used by, any - * other person. No title to or ownership of the software is - * hereby transferred. + * + * 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 avenkat&us.ibm.com */ +/* 06/30/2001 Port to Linux nsh...@us... */ /* * NAME |
|
From: <ro...@us...> - 2003-01-03 20:43:05
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/mallopt In directory sc8-pr-cvs1:/tmp/cvs-serv12614/mallopt Log Message: Directory /cvsroot/ltp/ltp/testcases/kernel/syscalls/mallopt added to the repository |
|
From: <ro...@us...> - 2003-01-03 20:40:58
|
Update of /cvsroot/ltp/ltp/runtest In directory sc8-pr-cvs1:/tmp/cvs-serv11461/runtest Modified Files: syscalls Log Message: Added memcmp() test ported by Ananda Venkataraman. Index: syscalls =================================================================== RCS file: /cvsroot/ltp/ltp/runtest/syscalls,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- syscalls 3 Jan 2003 20:33:32 -0000 1.103 +++ syscalls 3 Jan 2003 20:40:22 -0000 1.104 @@ -332,6 +332,7 @@ lstat03 lstat03 memset01 memset01 +memcmp01 memcmp01 memcpy01 memcpy01 mlockall01 mlockall01 |
|
From: <ro...@us...> - 2003-01-03 20:40:29
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls/memcmp In directory sc8-pr-cvs1:/tmp/cvs-serv11461/testcases/kernel/syscalls/memcmp Added Files: Makefile memcmp01.c Log Message: Added memcmp() 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: memcmp01.c --- /* IBM Corporation */ /* 01/02/2003 Port to LTP avenkat&us.ibm.com */ /* 06/30/2001 Port to Linux nsh...@us... */ /* * $Copyright: $ * Copyright (c) 1984, 1985, 1986, 1987, 1988, 1989 * Sequent Computer Systems, Inc. All rights reserved. * * This software is furnished under a license and may be used * only in accordance with the terms of that license and with the * inclusion of the above copyright notice. This software may not * be provided or otherwise made available to, or used by, any * other person. No title to or ownership of the software is * hereby transferred. */ /* * NAME * memcmp1 -- buffer compare * * CALLS * memcmp(3) * * ALGORITHM * Check boundary conditions. * * RESTRICTIONS */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <errno.h> /***** LTP Port *****/ #include "test.h" #include "usctest.h" char *TCID = "memcmp1"; #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; FILE *temp; int TST_TOTAL = 2; int anyfail(); int blenter(); int blexit(); int instress(); extern int Tst_count; 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]; q = &buf[800]; fill(p); fill(q); if (memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp fails - should have succeeded.\n"); local_flag = FAILED; } p[LEN - 1] = 0; if (!memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp succeeded - should have failed.\n"); local_flag = FAILED; }; p[LEN -1] = 'a'; p[0] = 0; if (!memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp succeeded - should have failed.\n"); local_flag = FAILED; }; p[0] = 'a'; q[LEN-1] = 0; if (!memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp succeeded - should have failed.\n"); local_flag = FAILED; }; q[LEN-1] = 'a'; q[0] = 0; if (!memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp succeeded - should have failed.\n"); local_flag = FAILED; }; q[0] = 'a'; if (memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp fails - should have succeeded.\n"); local_flag = FAILED; } blexit(); /*--------------------------------------------------------------*/ blenter(); clearit(); p = &buf[800]; q = &buf[100]; fill(p); fill(q); if (memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp fails - should have succeeded.\n"); local_flag = FAILED; } p[LEN - 1] = 0; if (!memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp succeeded - should have failed.\n"); local_flag = FAILED; }; p[LEN -1] = 'a'; p[0] = 0; if (!memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp succeeded - should have failed.\n"); local_flag = FAILED; }; p[0] = 'a'; q[LEN-1] = 0; if (!memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp succeeded - should have failed.\n"); local_flag = FAILED; }; q[LEN-1] = 'a'; q[0] = 0; if (!memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp succeeded - should have failed.\n"); local_flag = FAILED; }; q[0] = 'a'; if (memcmp(p, q, LEN)) { fprintf(temp, "\tmemcmp fails - should have succeeded.\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() { 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:40:28
|
Update of /cvsroot/ltp/ltp/testcases/kernel/syscalls In directory sc8-pr-cvs1:/tmp/cvs-serv11461/testcases/kernel/syscalls Modified Files: Makefile Log Message: Added memcmp() test ported by Ananda Venkataraman. Index: Makefile =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/kernel/syscalls/Makefile,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- Makefile 3 Jan 2003 20:33:34 -0000 1.47 +++ Makefile 3 Jan 2003 20:40:23 -0000 1.48 @@ -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 memcpy memset\ + listen llseek lseek lstat memcmp 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\ |