dso-data.c (ccf59d8da119ab03dcbdf95fb5e5adcef6ba51f2) dso-data.c (c81251e808fe2386e71990ecd49c408bb7cb4666)
1#include "util.h"
2
3#include <stdlib.h>
4#include <sys/types.h>
5#include <sys/stat.h>
6#include <fcntl.h>
7#include <string.h>
8
9#include "machine.h"
10#include "symbol.h"
1#include "util.h"
2
3#include <stdlib.h>
4#include <sys/types.h>
5#include <sys/stat.h>
6#include <fcntl.h>
7#include <string.h>
8
9#include "machine.h"
10#include "symbol.h"
11#include "tests.h"
11
12#define TEST_ASSERT_VAL(text, cond) \
13do { \
14 if (!(cond)) { \
15 pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
16 return -1; \
17 } \
18} while (0)

--- 71 unchanged lines hidden (view full) ---

90 /* Read final cache page. */
91 {
92 .offset = TEST_FILE_SIZE - 3,
93 .data = { 7, 8, 9, 0, 0, 0, 0, 0, 0, 0 },
94 .size = 3,
95 },
96};
97
12
13#define TEST_ASSERT_VAL(text, cond) \
14do { \
15 if (!(cond)) { \
16 pr_debug("FAILED %s:%d %s\n", __FILE__, __LINE__, text); \
17 return -1; \
18 } \
19} while (0)

--- 71 unchanged lines hidden (view full) ---

91 /* Read final cache page. */
92 {
93 .offset = TEST_FILE_SIZE - 3,
94 .data = { 7, 8, 9, 0, 0, 0, 0, 0, 0, 0 },
95 .size = 3,
96 },
97};
98
98int dso__test_data(void)
99int test__dso_data(void)
99{
100 struct machine machine;
101 struct dso *dso;
102 char *file = test_file(TEST_FILE_SIZE);
103 size_t i;
104
105 TEST_ASSERT_VAL("No test file", file);
106

--- 48 unchanged lines hidden ---
100{
101 struct machine machine;
102 struct dso *dso;
103 char *file = test_file(TEST_FILE_SIZE);
104 size_t i;
105
106 TEST_ASSERT_VAL("No test file", file);
107

--- 48 unchanged lines hidden ---