Enable gating tests for libtalloc
Resolves: rhbz#1962773
This commit is contained in:
parent
eda34b622a
commit
64f638db0d
6
gating.yaml
Normal file
6
gating.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
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