Debian Codegraph @

src/test/pmem_is_pmem_posix/TEST1

raw symbols SCIP
1 #!/usr/bin/env bash
2 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright 2014-2020, Intel Corporation
4
5 #
6 # src/test/pmem_is_pmem_posix/TEST1 -- 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 # single mm entry - 0x7fff77423000 4096
18 #
19 # 7fff77423000 2147479552
20 # extends past mm entry, should produce: 0
21 # 7fff77423000 2147483648
22 # extends past mm entry, should produce: 0
23 # 7fff77423000 8192
24 # extends past mm entry, should produce: 0
25 # 7fff77423000 4096
26 # entirely encompassed by mm entry: should produce: 1
27 # 7fff77424000 2147479552
28 # extends past mm entry, should produce: 0
29 # 7fff77424000 2147483648
30 # extends past mm entry, should produce: 0
31 # 7fff77424000 8192
32 # extends past mm entry, should produce: 0
33 # 7fff77428000 10240
34 # extends past mm entry, should produce: 0
35 # 7fff77423000 0
36 # starts at mm entry: should produce: 1
37 # 7fff77424000 0
38 # starts behind mm entry, should produce: 0
39 # 7fff77424000 0xffffffffffffffff
40 # starts behind mm entry, should produce: 0
41 # 7fff77423008 1
42 # entirely encompassed by first mm entry: should produce: 0
43 # 7fff77423ff0 32
44 # start at first mm entry, extends into second: should produce: 0
45
46 expect_normal_exit ./pmem_is_pmem_posix$EXESUFFIX\
47 a 0x7fff77423000 4096 DEV_DAX ${DEVICE_DAX_PATH[0]}\
48 \
49 t 0x7fff77423000 2147479552\
50 t 0x7fff77423000 2147483648\
51 t 0x7fff77423000 8192\
52 t 0x7fff77423000 4096\
53 t 0x7fff77424000 2147479552\
54 t 0x7fff77424000 2147483648\
55 t 0x7fff77424000 8192\
56 t 0x7fff77428000 10240\
57 t 0x7fff77423000 0\
58 t 0x7fff77424000 0\
59 t 0x7fff77424000 0xffffffffffffffff\
60 t 0x7fff77423008 1\
61 t 0x7fff77423FF0 32
62
63 check
64
65 pass