aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/aarch64/tst-audit27.c
blob: 5ebc09771f845af04e0fa982c4ca3636b04d01e3 (plain)
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
/* Check LD_AUDIT for aarch64 ABI specifics.
   Copyright (C) 2022 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, see
   <https://www.gnu.org/licenses/>.  */

#include <array_length.h>
#include <string.h>
#include <support/check.h>
#include "tst-audit27mod.h"

int
do_test (void)
{
  {
    float r = tst_audit27_func_float (FUNC_FLOAT_ARG0, FUNC_FLOAT_ARG1,
				      FUNC_FLOAT_ARG2, FUNC_FLOAT_ARG3,
				      FUNC_FLOAT_ARG4, FUNC_FLOAT_ARG5,
				      FUNC_FLOAT_ARG6, FUNC_FLOAT_ARG7);
    if (r != FUNC_FLOAT_RET)
      FAIL_EXIT1 ("tst_audit27_func_float() returned %a, expected %a",
		  r, FUNC_FLOAT_RET);
  }

  {
    double r = tst_audit27_func_double (FUNC_DOUBLE_ARG0, FUNC_DOUBLE_ARG1,
					FUNC_DOUBLE_ARG2, FUNC_DOUBLE_ARG3,
					FUNC_DOUBLE_ARG4, FUNC_DOUBLE_ARG5,
					FUNC_DOUBLE_ARG6, FUNC_DOUBLE_ARG7);
    if (r != FUNC_DOUBLE_RET)
      FAIL_EXIT1 ("tst_audit27_func_double() returned %la, expected %la",
		  r, FUNC_DOUBLE_RET);
  }

  {
    long double r = tst_audit27_func_ldouble (FUNC_LDOUBLE_ARG0,
					      FUNC_LDOUBLE_ARG1,
					      FUNC_LDOUBLE_ARG2,
					      FUNC_LDOUBLE_ARG3,
					      FUNC_LDOUBLE_ARG4,
					      FUNC_LDOUBLE_ARG5,
					      FUNC_LDOUBLE_ARG6,
					      FUNC_LDOUBLE_ARG7);
    if (r != FUNC_LDOUBLE_RET)
      FAIL_EXIT1 ("tst_audit27_func_ldouble() returned %La, expected %La",
		  r, FUNC_LDOUBLE_RET);
  }

  return 0;
}

#include <support/test-driver.c>