Lines Matching defs:dsos
13 #include "dsos.h"
127 dsos__init(&machine.dsos);
130 TEST_ASSERT_VAL("Failed to add dso", !dsos__add(&machine.dsos, dso));
175 dsos__exit(&machine.dsos);
205 static int dsos__create(int cnt, int size, struct dsos *dsos)
209 dsos__init(dsos);
218 TEST_ASSERT_VAL("failed to add dso", !dsos__add(dsos, dso));
225 static void dsos__delete(struct dsos *dsos)
227 for (unsigned int i = 0; i < dsos->cnt; i++) {
228 struct dso *dso = dsos->dsos[i];
233 dsos__exit(dsos);
266 TEST_ASSERT_VAL("failed to create dsos\n",
267 !dsos__create(dso_cnt, TEST_FILE_SIZE, &machine.dsos));
270 struct dso *dso = machine.dsos.dsos[i];
273 * Open dsos via dso__data_fd(), it opens the data
290 TEST_ASSERT_VAL("dsos[0] is not open", dso__data(machine.dsos.dsos[0])->fd != -1);
293 fd = dso__data_fd(machine.dsos.dsos[i], &machine);
297 TEST_ASSERT_VAL("failed to close dsos[0]", dso__data(machine.dsos.dsos[0])->fd == -1);
300 dsos__delete(&machine.dsos);
325 #define dso_0 (machine.dsos.dsos[0])
326 #define dso_1 (machine.dsos.dsos[1])
327 #define dso_2 (machine.dsos.dsos[2])
347 TEST_ASSERT_VAL("failed to create dsos\n",
348 !dsos__create(3, TEST_FILE_SIZE, &machine.dsos));
387 dsos__delete(&machine.dsos);