Bang on my head. I did not see these Patches posted on Sf.net Patch
Tracker. I am not sure whether they are applied already by somebody.
Mike can you confirm whether you applied any/all of them:
1) [ 1891075 ] waitpid wrong array in FAIL: by
[EMAIL PROTECTED],
Summary: Various waitpid tests print the PID of the wrong array.
fork_kid_pid[j] is accessed just past the end of the fork_kid_pid array,
so it is better to use wait_kid_pid[i] instead.
Not sure it is applied.
(https://sourceforge.net/tracker/index.php?func=detail&aid=1891075&group_id=3382&atid=303382)
2) [ 1891078 ] nftw64 has slightly bad sprintf handling: by
[EMAIL PROTECTED],
Summary: Some newer glibcs do not like sprintf() printing a string into
itself and loop.
Not Sure whether Applied or not.
(https://sourceforge.net/tracker/index.php?func=detail&aid=1891078&group_id=3382&atid=303382)
3) [ 1891129 ] mark tst_exit as noreturn: by
[EMAIL PROTECTED],
Summary: gcc allows marking functions as noreturn, which tst_exit() is.
Comment Shows Mike you have already Applied this.
(https://sourceforge.net/tracker/index.php?func=detail&aid=1891129&group_id=3382&atid=303382)
4) [ 1891271 ] fixed some compiler warnings: by
[EMAIL PROTECTED],
Summary: this patch fixes some compiler warnings spit out by newer GCCs
and fortify source (mostly some initialisations and return value
checking)
Not Sure whether Applied or not.
(https://sourceforge.net/tracker/index.php?func=detail&aid=1891271&group_id=3382&atid=303382)
5) [ 1891273 ] fixed some more compiler warnings: by
[EMAIL PROTECTED],
Summary: some more "variable is used uninitialized" warnings fixed with
this patch
Not Sure whether Applied or not.
(https://sourceforge.net/tracker/index.php?func=detail&aid=1891273&group_id=3382&atid=303382)
6) [ 1891927 ] faccessat01 and fchmodat01 fixes: by
[EMAIL PROTECTED],
Summary: faccessat01 and fchmodat01 did not test the AT_FDCWD
tests, but assigned fds[5]. I made them work, patch attached. btw,
readlinkat01 is also buggy, but I have not yet come around to fixing
it.
Not Sure whether Applied or not.
(https://sourceforge.net/tracker/index.php?func=detail&aid=1891927&group_id=3382&atid=303382)
7) [ 1908313 ] Fix broken POSIX shell compliance:by
[EMAIL PROTECTED],
Summary: runltp will not execute on a POSIX-compliant shell (dash). I
found this thread, and a patch that to fixes my issues:
http://www.mail-archive.com/[email protected]/msg00510.html
In the last message in the thread, it's claimed that the changes were
committed to CVS.
http://www.mail-archive.com/[email protected]/msg00521.html
This patch is an adaptation of the original by Matthew Wilcox. I changed
'= "0"' to '-eq 0', at the request of George Kraft. I also dropped the
sh -> bash change in generate.sh, as Mike Frysinger seemed to object to
that part.
Comment Showed that Mike you used -a => -e changes to runltp and
runltplite.sh. Can you please confirm.
(https://sourceforge.net/tracker/index.php?func=detail&aid=1908313&group_id=3382&atid=303382)
Sorry Dustin & Marcus for the delay.
Regards--
Subrata
Index: IDcheck.sh
===================================================================
RCS file: /cvsroot/ltp/ltp/IDcheck.sh,v
retrieving revision 1.13
diff -u -p -r1.13 IDcheck.sh
--- IDcheck.sh 8 Feb 2006 21:21:09 -0000 1.13
+++ IDcheck.sh 5 Mar 2008 20:59:03 -0000
@@ -85,7 +85,7 @@ if [ $? != "0" ]; then
fi
whoami | grep root > /dev/null
-if [ $? == "0" ]; then
+if [ $? -eq 0 ]; then
I_AM_ROOT=1
fi
Index: runltp
===================================================================
RCS file: /cvsroot/ltp/ltp/runltp,v
retrieving revision 1.23
diff -u -p -r1.23 runltp
--- runltp 28 Feb 2008 15:50:18 -0000 1.23
+++ runltp 5 Mar 2008 20:59:03 -0000
@@ -498,7 +498,7 @@ main()
${LTPROOT}/runtest/controllers \
${LTPROOT}/runtest/filecaps
do
- [ -a "$SCENFILES" ] || \
+ [ -e "$SCENFILES" ] || \
{
echo "FATAL: missing scenario file $SCENFILES"
exit 1
@@ -546,7 +546,7 @@ main()
${LTPROOT}/runtest/rpc \
${LTPROOT}/runtest/nfs
do
- [ -a "$SCENFILES" ] || \
+ [ -e "$SCENFILES" ] || \
{
echo "FATAL: missing scenario file $SCENFILES"
exit 1
--- testcases/kernel/syscalls/faccessat/faccessat01.c
+++ testcases/kernel/syscalls/faccessat/faccessat01.c
@@ -57,7 +57,7 @@
#include "usctest.h"
#include "linux_syscall_numbers.h"
-#define TEST_CASES 5
+#define TEST_CASES 6
#ifndef AT_FDCWD
#define AT_FDCWD -100
#endif
@@ -75,7 +75,7 @@
int dirfd, fd, ret;
int fds[TEST_CASES];
char *filenames[TEST_CASES];
-int expected_errno[TEST_CASES] = { 0, 0, ENOTDIR, EBADF, 0 };
+int expected_errno[TEST_CASES] = { 0, 0, ENOTDIR, EBADF, 0, 0 };
int myfaccessat(int dirfd, const char *filename, int mode)
{
@@ -200,6 +200,7 @@
filenames[0] = filenames[2] = filenames[3] = filenames[4] = testfile;
filenames[1] = testfile2;
+ filenames[5] = testfile3;
}
/***************************************************************
--- testcases/kernel/syscalls/fchmodat/fchmodat01.c
+++ testcases/kernel/syscalls/fchmodat/fchmodat01.c
@@ -57,7 +57,7 @@
#include "usctest.h"
#include "linux_syscall_numbers.h"
-#define TEST_CASES 5
+#define TEST_CASES 6
#ifndef AT_FDCWD
#define AT_FDCWD -100
#endif
@@ -75,7 +75,7 @@
int dirfd, fd, ret;
int fds[TEST_CASES];
char *filenames[TEST_CASES];
-int expected_errno[TEST_CASES] = { 0, 0, ENOTDIR, EBADF, 0 };
+int expected_errno[TEST_CASES] = { 0, 0, ENOTDIR, EBADF, 0, 0 };
int myfchmodat(int dirfd, const char *filename, mode_t mode)
{
@@ -199,6 +199,7 @@
filenames[0] = filenames[2] = filenames[3] = filenames[4] = testfile;
filenames[1] = testfile2;
+ filenames[5] = testfile3;
}
/***************************************************************
diff -ru ltp-full-20060205 ltp-full-20060205.devel
--- ltp-full-20060205/testcases/kernel/syscalls/nftw/lib64.c 2006-02-07 15:03:35.000000000 -0500
+++ ltp-full-20060205.devel/testcases/kernel/syscalls/nftw/lib64.c 2006-04-27 11:27:59.000000000 -0400
@@ -206,8 +206,9 @@
/* leave some chars for element that pushes path over PC_PATH_MAX */
pcPathMax = pcPathMax - tempPathLength - 5;
+ tmpPtr = path + strlen(path);
while (pathLength < pcPathMax) {
- sprintf(path, "%s/%s", path, tmp_path);
+ tmpPtr += sprintf(tmpPtr, "/%s", tmp_path);
pathLength += tempPathLength;
}
diff -ru ltp-full-20060205 ltp-full-20060205.devel
--- ltp-full-20060205/testcases/kernel/syscalls/nftw/lib.c 2006-02-07 15:03:35.000000000 -0500
+++ ltp-full-20060205.devel/testcases/kernel/syscalls/nftw/lib.c 2006-04-27 11:27:59.000000000 -0400
@@ -206,8 +206,9 @@
/* leave some chars for element that pushes path over PC_PATH_MAX */
pcPathMax = pcPathMax - tempPathLength - 5;
+ tmpPtr = path + strlen(path);
while (pathLength < pcPathMax) {
- sprintf(path, "%s/%s", path, tmp_path);
+ tmpPtr += sprintf(tmpPtr, "/%s", tmp_path);
pathLength += tempPathLength;
}
diff -pur ltp-full-20061017-orig/testcases/kernel/fs/doio/doio.c ltp-full-20061017/testcases/kernel/fs/doio/doio.c
--- ltp-full-20061017-orig/testcases/kernel/fs/doio/doio.c 2006-10-26 15:27:38.000000000 +0200
+++ ltp-full-20061017/testcases/kernel/fs/doio/doio.c 2006-10-26 15:28:20.000000000 +0200
@@ -3752,7 +3752,7 @@ int nbytes;
{
char *cp;
void *addr;
- int me, flags, key, shmid;
+ int me=0, flags, key, shmid;
static int mturn = 0; /* which memory type to use */
struct memalloc *M;
char filename[255];
diff -pur ltp-full-20061017-orig/testcases/kernel/syscalls/sysctl/sysctl05.c ltp-full-20061017/testcases/kernel/syscalls/sysctl/sysctl05.c
--- ltp-full-20061017-orig/testcases/kernel/syscalls/sysctl/sysctl05.c 2006-10-26 15:27:38.000000000 +0200
+++ ltp-full-20061017/testcases/kernel/syscalls/sysctl/sysctl05.c 2006-10-26 15:29:20.000000000 +0200
@@ -101,7 +101,7 @@ int main(int ac, char **av)
int lc;
char *msg;
int i;
- int ret;
+ int ret=0;
/* parse standard options */
if ((msg = parse_opts(ac, av, (option_t *)NULL, NULL)) != (char *)NULL){
diff -pur ltp-full-20061017-orig/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/4-1.c ltp-full-20061017/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/4-1.c
--- ltp-full-20061017-orig/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/4-1.c 2006-10-26 15:27:37.000000000 +0200
+++ ltp-full-20061017/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_wait/4-1.c 2006-10-26 15:35:34.000000000 +0200
@@ -198,6 +198,8 @@ void * worker (void * arg)
int ret=0;
struct timespec ts, tsrem;
+ //initialisation is needed
+ ts.tv_sec=0;
/* We block the signals SIGUSR1 and SIGUSR2 for this THREAD */
ret = pthread_sigmask(SIG_BLOCK, &usersigs, NULL);
diff -Naur ltp-full-20060205/testcases/kernel/fs/doio/doio.c ltp-full-20060205.fixed/testcases/kernel/fs/doio/doio.c
--- ltp-full-20060205/testcases/kernel/fs/doio/doio.c 2006-02-07 21:03:32.000000000 +0100
+++ ltp-full-20060205.fixed/testcases/kernel/fs/doio/doio.c 2006-02-16 16:05:37.000000000 +0100
@@ -2779,7 +2779,7 @@
* ONCE and keeping it mapped.
*/
struct status *status;
- void *mrc, *memaddr;
+ void *mrc=NULL, *memaddr=NULL;
struct fd_cache *fdc;
struct stat sbuf;
int rc;
@@ -4875,7 +4875,7 @@
char *opts;
{
int c;
- char cc, *cp, *tok;
+ char cc, *cp=NULL, *tok=NULL;
extern int opterr;
extern int optind;
extern char *optarg;
@@ -4909,7 +4909,7 @@
for(s=checkmap; s->string != NULL; s++)
if(!strcmp(s->string, optarg))
break;
- if (s->string == NULL) {
+ if (s->string == NULL && tok != NULL) {
fprintf(stderr,
"%s%s: Illegal -C arg (%s). Must be one of: ",
Prog, TagName, tok);
diff -Naur ltp-full-20060205/testcases/kernel/fs/doio/iogen.c ltp-full-20060205.fixed/testcases/kernel/fs/doio/iogen.c
--- ltp-full-20060205/testcases/kernel/fs/doio/iogen.c 2006-02-07 21:03:32.000000000 +0100
+++ ltp-full-20060205.fixed/testcases/kernel/fs/doio/iogen.c 2006-02-16 16:10:04.000000000 +0100
@@ -431,7 +431,8 @@
}
req.r_magic = DOIO_MAGIC;
- write(outfd, (char *)&req, sizeof(req));
+ if (write(outfd, (char *)&req, sizeof(req)) == -1)
+ perror("Warning: Could not write");
}
exit(0);
@@ -580,7 +581,7 @@
form_iorequest(req)
struct io_req *req;
{
- int mult, offset, length, slength;
+ int mult, offset=0, length=0, slength;
int minlength, maxlength, laststart, lastend;
int minoffset, maxoffset;
int maxstride, nstrides;
@@ -1796,8 +1797,8 @@
if (file[0] == '/') {
strcpy(fptr->f_path, file);
} else {
- getcwd(fptr->f_path,
- sizeof(fptr->f_path)-1);
+ if (getcwd(fptr->f_path, sizeof(fptr->f_path)-1) == NULL)
+ perror("Could not get current working directory");
strcat(fptr->f_path, "/");
strcat(fptr->f_path, file);
}
--- include/test.h
+++ include/test.h
@@ -217,7 +217,12 @@
extern void tst_brkloopm(int ttype, void (*func)(), char *arg_fmt, ...);
extern int tst_environ();
-extern void tst_exit();
+extern void tst_exit()
+#ifdef __GCC__
+ __attribute__((__noreturn__))
+#endif
+;
+
extern void tst_flush();
/* prototypes for the t_res.c functions */
--- testcases/kernel/syscalls/waitpid/waitpid06.c
+++ testcases/kernel/syscalls/waitpid/waitpid06.c
@@ -267,7 +267,7 @@
tst_resm(TFAIL, "Did not find a "
"wait_kid_pid for the "
"fork_kid_pid of %d",
- fork_kid_pid[j]);
+ wait_kid_pid[i]);
for (k = 0; k < MAXKIDS; k++) {
tst_resm(TFAIL,
"fork_kid_pid[%d] = "
--- testcases/kernel/syscalls/waitpid/waitpid07.c
+++ testcases/kernel/syscalls/waitpid/waitpid07.c
@@ -279,7 +279,7 @@
tst_resm(TFAIL, "Did not find a "
"wait_kid_pid for the "
"fork_kid_pid of %d",
- fork_kid_pid[j]);
+ wait_kid_pid[i]);
for (k = 0; k < MAXKIDS; k++) {
tst_resm(TFAIL,
"fork_kid_pid[%d] = "
--- testcases/kernel/syscalls/waitpid/waitpid08.c
+++ testcases/kernel/syscalls/waitpid/waitpid08.c
@@ -291,7 +291,7 @@
tst_resm(TFAIL,
"Did not find a wait_kid_pid "
"for the fork_kid_pid of %d",
- fork_kid_pid[j]);
+ wait_kid_pid[i]);
for (k = 0; k < MAXKIDS; k++) {
tst_resm(TFAIL,
"fork_kid_pid[%d] = "
--- testcases/kernel/syscalls/waitpid/waitpid11.c
+++ testcases/kernel/syscalls/waitpid/waitpid11.c
@@ -223,7 +223,7 @@
if (!found) {
tst_resm(TFAIL, "Did not find a wait_kid_pid "
"for the fork_kid_pid of %d",
- fork_kid_pid[j]);
+ wait_kid_pid[i]);
for (k = 0; k < MAXKIDS; k++) {
tst_resm(TFAIL, "fork_kid_pid[%d] = "
"%d", k, fork_kid_pid[k]);
--- testcases/kernel/syscalls/waitpid/waitpid12.c
+++ testcases/kernel/syscalls/waitpid/waitpid12.c
@@ -231,7 +231,7 @@
if (!found) {
tst_resm(TFAIL, "Did not find a wait_kid_pid "
"for the fork_kid_pid of %d",
- fork_kid_pid[j]);
+ wait_kid_pid[i]);
for (k = 0; k < MAXKIDS; k++) {
tst_resm(TFAIL, "fork_kid_pid[%d] = "
"%d", k, fork_kid_pid[k]);
--- testcases/kernel/syscalls/waitpid/waitpid13.c
+++ testcases/kernel/syscalls/waitpid/waitpid13.c
@@ -246,7 +246,7 @@
if (!found) {
tst_resm(TFAIL, "Did not find a wait_kid_pid "
"for the fork_kid_pid of %d",
- fork_kid_pid[j]);
+ wait_kid_pid[i]);
for (k = 0; k < MAXKIDS; k++) {
tst_resm(TFAIL, "fork_kid_pid[%d] = "
"%d", k, fork_kid_pid[k]);
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list