Debian Codegraph @

src/test/pmem_is_pmem_posix/TEST0

raw symbols SCIP
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright 2016-2020, Intel Corporation
4
5 #
6 # src/test/pmem_is_pmem_posix/TEST0 -- unit test for pmem_is_pmem
7 #
8
9 . ../unittest/unittest.sh
10
11 require_test_type medium
12 require_fs_type none
13 require_dax_devices 1
14
15 setup
16
17 # two mm entries
18 #
19 # 7fff77423000 2147479552
20 # start at first mm entry, extends into second: should produce: 1
21 # 7fff77423000 2147483648
22 # exactly matches sum of both mm entries: should produce: 1
23 # 7fff77423000 8192
24 # start at first mm entry, extends into second: should produce: 1
25 # 7fff77423000 4096
26 # entirely encompassed by first mm entry: should produce: 1
27 # 7fff77424000 2147479552
28 # exactly matches second mm entry, should produce: 1
29 # 7fff77424000 2147483648
30 # extends past second mm entry, should produce: 0
31 # 7fff77424000 8192
32 # entirely encompassed by second mm entry: should produce: 1
33 # 7fff77428000 10240
34 # subset of second mm entry: should produce: 1
35 # 7fff77423000 0
36 # starts at first mm entry: should produce: 1
37 # 7fff77424000 0
38 # starts at second mm entry: should produce: 1
39 # 7fff77424000 0xffffffffffffffff
40 # extends past second mm entry, should produce: 0
41 # 7fff77423008 1
42 # entirely encompassed by first mm entry: should produce: 1
43 # 7fff77423ff0 32
44 # start at first mm entry, extends into second: should produce: 1
45
46 expect_normal_exit ./pmem_is_pmem_posix$EXESUFFIX\
47 f 0x7fff77423000 4096 MAP_SYNC\
48 a 0x7fff77423000 4096 MAP_SYNC\
49 a 0x7fff77424000 2147479552 DEV_DAX ${DEVICE_DAX_PATH[0]}\
50 \
51 t 0x7fff77423000 2147479552\
52 t 0x7fff77423000 2147483648\
53 t 0x7fff77423000 8192\
54 t 0x7fff77423000 4096\
55 t 0x7fff77424000 2147479552\
56 t 0x7fff77424000 2147483648\
57 t 0x7fff77424000 8192\
58 t 0x7fff77428000 10240\
59 t 0x7fff77423000 0\
60 t 0x7fff77424000 0\
61 t 0x7fff77424000 0xffffffffffffffff\
62 t 0x7fff77423008 1\
63 t 0x7fff77423FF0 32
64
65 check
66
67 pass