projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
io_uring: io_uring_setup(2) takes a 'nr_iovecs' field now
[fio.git]
/
t
/
stest.c
diff --git
a/t/stest.c
b/t/stest.c
index c1794843948392ba1ed1c48f08c2ac0519fcb1b1..b95968f14dd073a3f52b4f8a0f133a248ead130c 100644
(file)
--- a/
t/stest.c
+++ b/
t/stest.c
@@
-4,8
+4,8
@@
#include "../smalloc.h"
#include "../flist.h"
#include "../smalloc.h"
#include "../flist.h"
-
-FILE *f_err;
+#include "../arch/arch.h"
+#include "debug.h"
#define MAGIC1 0xa9b1c8d2
#define MAGIC2 0xf0a1e9b3
#define MAGIC1 0xa9b1c8d2
#define MAGIC2 0xf0a1e9b3
@@
-18,7
+18,7
@@
struct elem {
unsigned int magic2;
};
unsigned int magic2;
};
-FLIST_HEAD(list);
+
static
FLIST_HEAD(list);
static int do_rand_allocs(void)
{
static int do_rand_allocs(void)
{
@@
-31,7
+31,7
@@
static int do_rand_allocs(void)
srand(MAGIC1);
#endif
nr = total = 0;
srand(MAGIC1);
#endif
nr = total = 0;
- while (total < 12
8
*1024*1024UL) {
+ while (total < 12
0
*1024*1024UL) {
size = 8 * sizeof(struct elem) + (int) (999.0 * (rand() / (RAND_MAX + 1.0)));
e = smalloc(size);
if (!e) {
size = 8 * sizeof(struct elem) + (int) (999.0 * (rand() / (RAND_MAX + 1.0)));
e = smalloc(size);
if (!e) {
@@
-59,26
+59,14
@@
static int do_rand_allocs(void)
return 0;
}
return 0;
}
-static int do_specific_alloc(unsigned long size)
-{
- void *ptr;
-
- ptr = smalloc(size);
- sfree(ptr);
- return 0;
-}
-
int main(int argc, char *argv[])
{
int main(int argc, char *argv[])
{
- f_err = stderr;
-
+ arch_init(argv);
sinit();
sinit();
+ debug_init();
do_rand_allocs();
do_rand_allocs();
- /* smalloc bug, commit 271067a6 */
- do_specific_alloc(671386584);
-
scleanup();
return 0;
}
scleanup();
return 0;
}