File: diskdump-v6-arm

package info (click to toggle)
libkdumpfile 0.5.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,800 kB
  • sloc: ansic: 34,639; sh: 3,853; python: 1,490; makefile: 755
file content (64 lines) | stat: -rwxr-xr-x 1,539 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#! /bin/sh

#
# diskdump-v6-arm
#
# Check ELF notes and VMCOREINFO in a sample 32-bit Arm diskdump.
#

mkdir -p out || exit 99

name=$( basename "$0" )
datafile="$srcdir/${name}.data"
dumpfile="out/${name}.dump"
resultfile="out/${name}.result"
expectfile="$srcdir/basic.expect"

cat "$datafile" "$expectfile" | ./mkbinary "$dumpfile"
rc=$?
if [ $rc -ne 0 ]; then
    echo "Cannot create DISKDUMP file" >&2
    exit $rc
fi
echo "Created DISKDUMP: $dumpfile"

./checkattr "$dumpfile" <<EOF
max_pfn = number: 1
linux.phys_base = address: 0
linux.vmcoreinfo.lines.OSRELEASE = string: 6.4.3-1-default
linux.vmcoreinfo.lines.PAGESIZE = string: 4096
linux.vmcoreinfo.lines.CRASHTIME = string: 1689103980
linux.uts.domainname = string:
linux.uts.machine = string: armv7l
linux.uts.version = string: #1 SMP Tue Jul 11 11:43:43 UTC 2023
linux.uts.release = string: 6.4.3-1-default
linux.uts.nodename = string: kdump
linux.uts.sysname = string: Linux
linux.version_code = number: 394243
file.pagemap = bitmap: 1
file.set.number = number: 1
file.format = string: diskdump
cpu.number = number: 2
cpu.0.pid = number: 5752
cpu.0.reg.pc = number: 0xc0437054
cpu.1.pid = number: 0
cpu.1.reg.pc = number: 0xc0fb3de4
memory.pagemap = bitmap: 1
EOF
rc=$?
if [ $rc -ne 0 ]; then
    echo "Attribute check failed" >&2
    exit $rc
fi

./dumpdata "$dumpfile" 0 4096 >"$resultfile"
rc=$?
if [ $rc -ne 0 ]; then
    echo "Cannot dump DISKDUMP data" >&2
    exit $rc
fi

if ! diff "$expectfile" "$resultfile"; then
    echo "Results do not match" >&2
    exit 1
fi