Debian Codegraph @

src/test/pmem_is_pmem_posix/TEST2

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