Print this page
code review
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/test/elf-tests/tests/linker-sets/simple.sh
+++ new/usr/src/test/elf-tests/tests/linker-sets/simple.sh
1 1 #!/usr/bin/ksh
2 2 #
3 3 # This file and its contents are supplied under the terms of the
4 4 # Common Development and Distribution License ("CDDL"), version 1.0.
5 5 # You may only use this file in accordance with the terms of version
6 6 # 1.0 of the CDDL.
↓ open down ↓ |
6 lines elided |
↑ open up ↑ |
7 7 #
8 8 # A full copy of the text of the CDDL should have accompanied this
9 9 # source. A copy of the CDDL is also available via the Internet at
10 10 # http://www.illumos.org/license/CDDL.
11 11 #
12 12
13 13 #
14 14 # Copyright 2018, Richard Lowe.
15 15 #
16 16
17 -# Test that a simple use of linker-sets, tat is, automatically generated start
17 +# Test that a simple use of linker-sets, that is, automatically generated start
18 18 # and end symbols for sections can be generated and used.
19 19
20 20 if [[ -z $ELF_TESTS ]]; then
21 21 print -u2 "Don't know where the test data is rooted";
22 22 exit 1;
23 23 fi
24 24
25 25 tmpdir=/tmp/test.$$
26 26 mkdir $tmpdir
27 27 cd $tmpdir
28 28
29 29 cleanup() {
30 30 cd /
31 31 rm -fr $tmpdir
32 32 }
33 33
34 34 trap 'cleanup' EXIT
35 35
36 36 # We expect any alternate linker to be in LD_ALTEXEC for us already
37 37 gcc -o simple ${ELF_TESTS}/tests/linker-sets/simple-src.c -Wall -Wextra
38 38 if (( $? != 0 )); then
39 39 print -u2 "compilation of ${ELF_TESTS}/tests/linker-sets/simple-src.c failed";
40 40 exit 1;
41 41 fi
42 42
43 43 ./simple > simple.$$.out 2>&1
44 44
45 45 if (( $? != 0 )); then
46 46 print -u2 "execution of ${ELF_TESTS}/tests/linker-sets/simple-src.c failed";
47 47 exit 1;
48 48 fi
49 49
50 50 diff -u ${ELF_TESTS}/tests/linker-sets/simple.out simple.$$.out
51 51 if (( $? != 0 )); then
52 52 print -u2 "${ELF_TESTS}/tests/linker-sets/simple-src.c output mismatch"
53 53 exit 1;
54 54 fi
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX