Add missing tests to fix osci.brew-build.tier0.functional
resolves: rhbz#2190419
This commit is contained in:
parent
80d15f99ac
commit
69cdea87e5
@ -6,7 +6,7 @@
|
||||
|
||||
Name: libtalloc
|
||||
Version: 2.4.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: The talloc library
|
||||
License: LGPL-3.0-or-later
|
||||
URL: https://talloc.samba.org/
|
||||
@ -114,6 +114,9 @@ cp -a doc/man/man3 %{buildroot}%{_mandir}
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed May 24 2023 Pavel Filipenský <pfilipen@redhat.com> - 2.4.0-2
|
||||
- resolves: rhbz#2190419 - Add missing tests to fix osci.brew-build.tier0.functional
|
||||
|
||||
* Thu May 18 2023 Pavel Filipenský <pfilipen@redhat.com> - 2.4.0-1
|
||||
- resolves: rhbz#2190419 - Rebase to version 2.4.0
|
||||
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQEzBAABCgAdFiEEkUejOXGVGO6QEby1R5ORYRMIQCUFAmKhdgsACgkQR5ORYRMI
|
||||
QCUezAgAr5Ra3D1mTBCY8KxAqzPH82whIkGIiO/BaCBUStwN924gKOQeps5GIzAP
|
||||
dxYjXeHngsSCYohjNEwVI8Ddwit3v6pWfWIrYRTj80L/cy20XEutfTZlcHs/8a4P
|
||||
wC+idbHWV0dNCzg/xbk//Uy4+LnEMTF0E8xiU6j+f5G05iRbhO3Ce6or8v8c/4AW
|
||||
xjtdfZL7lXErqtfQVfZu4aSmiKJyMEJ6BG6Uk8V0Hu2FGt/nMkwzVtxhAakzGuZr
|
||||
AcqXsGtQlskUk63U4JWQUtMMmPQlo6rSkN7R83Y2BWJ9KseWc2IKzvRa0ecASeFS
|
||||
aGuPlRyoAbnabI5IIatSglmA802x8g==
|
||||
=iWOb
|
||||
-----END PGP SIGNATURE-----
|
||||
14
tests/sanity-tests/Makefile
Normal file
14
tests/sanity-tests/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
SRCS = testsuite.c testsuite_main.c
|
||||
CFLAG = -Wall -Wextra -Werror=implicit-function-declaration
|
||||
CC = gcc
|
||||
LIBS = -ltalloc
|
||||
OBJS = talloc_testsuite
|
||||
|
||||
talloc_testsuite:${SRCS}
|
||||
${CC} ${CFLAGS} -o $@ ${SRCS} ${LIBS}
|
||||
|
||||
run: talloc_testsuite
|
||||
./talloc_testsuite
|
||||
|
||||
clean:
|
||||
-rm -f *~ ${OBJS}
|
||||
5
tests/sanity-tests/replace.h
Normal file
5
tests/sanity-tests/replace.h
Normal file
@ -0,0 +1,5 @@
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((const char *)(p1)) - (const char *)(p2)))
|
||||
1
tests/sanity-tests/system/time.h
Normal file
1
tests/sanity-tests/system/time.h
Normal file
@ -0,0 +1 @@
|
||||
#include <sys/time.h>
|
||||
7
tests/sanity-tests/talloc_testsuite.h
Normal file
7
tests/sanity-tests/talloc_testsuite.h
Normal file
@ -0,0 +1,7 @@
|
||||
#ifndef __LIB_TALLOC_TALLOC_TESTSUITE_H__
|
||||
#define __LIB_TALLOC_TALLOC_TESTSUITE_H__
|
||||
|
||||
struct torture_context;
|
||||
bool torture_local_talloc(struct torture_context *tctx);
|
||||
|
||||
#endif
|
||||
4
tests/sanity-tests/talloctest.sh
Executable file
4
tests/sanity-tests/talloctest.sh
Executable file
@ -0,0 +1,4 @@
|
||||
#/bin/bash
|
||||
|
||||
make run || exit 1
|
||||
make clean || exit 2
|
||||
2167
tests/sanity-tests/testsuite.c
Normal file
2167
tests/sanity-tests/testsuite.c
Normal file
File diff suppressed because it is too large
Load Diff
36
tests/sanity-tests/testsuite_main.c
Normal file
36
tests/sanity-tests/testsuite_main.c
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
local testing of talloc routines.
|
||||
|
||||
Copyright (C) Andrew Tridgell 2004
|
||||
|
||||
** NOTE! The following LGPL license applies to the talloc
|
||||
** library. This does NOT imply that all of Samba is released
|
||||
** under the LGPL
|
||||
|
||||
This 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 3 of the License, or (at your option) any later version.
|
||||
|
||||
This 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 this library; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "replace.h"
|
||||
|
||||
#include "talloc_testsuite.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
bool ret = torture_local_talloc(NULL);
|
||||
if (!ret)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
14
tests/tests.yml
Normal file
14
tests/tests.yml
Normal file
@ -0,0 +1,14 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- sanity-tests:
|
||||
dir: sanity-tests
|
||||
run: ./talloctest.sh
|
||||
required_packages:
|
||||
- make
|
||||
- gcc
|
||||
- libtalloc
|
||||
- libtalloc-devel
|
||||
Loading…
Reference in New Issue
Block a user