diff -urpN src-orig/gdb/testsuite/gdb.arch/spu-info.c src/gdb/testsuite/gdb.arch/spu-info.c --- src-orig/gdb/testsuite/gdb.arch/spu-info.c 2008-01-01 23:53:18.000000000 +0100 +++ src/gdb/testsuite/gdb.arch/spu-info.c 2008-06-20 06:32:20.000000000 +0200 @@ -124,19 +124,20 @@ do_event_test () } int -do_dma_test () +do_dma_test (unsigned long long speid) { #define MAP_FAILED (-1ULL) #define PROT_READ 0x1 #define MAP_PRIVATE 0x002 #define BSIZE 128 static char buf[BSIZE] __attribute__ ((aligned (128))); - char *file = "/var/tmp/tmp_buf"; + char file[32]; struct stat fdstat; int fd, cnt; unsigned long long src; /* Create a file and fill it with some bytes. */ + snprintf (file, sizeof(file), "tmp_buf_%lld", speid); fd = open (file, O_CREAT | O_RDWR | O_TRUNC, 0777); if (fd == -1) return -1; @@ -158,8 +159,9 @@ do_dma_test () mfc_write_tag_mask (1<<5); /* Marker DMAWait */ spu_mfcstat (MFC_TAG_UPDATE_ALL); - /* Close the file. */ + /* Close and delete the file. */ close (fd); + unlink (file); return cnt; } @@ -221,7 +223,7 @@ main (unsigned long long speid, unsigned res = do_event_test (); /* info spu dma */ - res = do_dma_test (); + res = do_dma_test (speid); /* info spu mailbox */ res = do_mailbox_test ();