Enable gating tests for libtalloc

Resolves: rhbz#1962773
This commit is contained in:
Steeve Goveas 2021-05-28 17:55:55 +05:30
parent eda34b622a
commit 64f638db0d
9 changed files with 2254 additions and 0 deletions

6
gating.yaml Normal file
View 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}

View 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}

View 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)))

View File

@ -0,0 +1 @@
#include <sys/time.h>

View 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

View File

@ -0,0 +1,4 @@
#/bin/bash
make run || exit 1
make clean || exit 2

File diff suppressed because it is too large Load Diff

View 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
View 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