From de2b508477c07343b4c5df459546a7ec563f4765 Mon Sep 17 00:00:00 2001 From: Adam Samalik Date: Thu, 23 Feb 2023 11:48:00 +0000 Subject: [PATCH] update modulemd etc --- gating.yaml | 6 ++++++ pmdk.yaml | 29 +++++++++++++++++++++++++++++ tests/is_pmem.c | 15 +++++++++++++++ tests/run_test.sh | 6 ++++++ tests/tests.yml | 12 ++++++++++++ 5 files changed, 68 insertions(+) create mode 100644 gating.yaml create mode 100644 pmdk.yaml create mode 100644 tests/is_pmem.c create mode 100755 tests/run_test.sh create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..8720aec --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.redhat-module.tier0.functional} diff --git a/pmdk.yaml b/pmdk.yaml new file mode 100644 index 0000000..4813c09 --- /dev/null +++ b/pmdk.yaml @@ -0,0 +1,29 @@ +document: modulemd +version: 2 +data: + name: pmdk + stream: 1_fileformat_v6 + summary: Persistent Memory Development Kit (former NVML) + description: The Persistent Memory Development Kit is a collection + of libraries for using memory-mapped persistence, + optimized specifically for persistent memory. + license: + module: [BSD] + dependencies: + - buildrequires: + platform: [el8] + requires: + platform: [el8] + references: + community: http://pmem.io/pmdk + + components: + rpms: + pmdk: + rationale: main pmdk library + ref: stream-rhel-8.8.0 + buildorder: 0 + libpmemobj-cpp: + rationale: depends on (recent version of) pmdk + ref: stream-rhel-8.8.0 + buildorder: 10 diff --git a/tests/is_pmem.c b/tests/is_pmem.c new file mode 100644 index 0000000..d04e49e --- /dev/null +++ b/tests/is_pmem.c @@ -0,0 +1,15 @@ +#include +#include +#include + +int +main(int argc, char **argv) +{ + void *addr; + + addr = pmem_map_file(argv[1], getpagesize(), + PMEM_FILE_CREATE, S_IWUSR|S_IRUSR, NULL, NULL); + if (addr) + return 0; + return -1; +} diff --git a/tests/run_test.sh b/tests/run_test.sh new file mode 100755 index 0000000..59ac66f --- /dev/null +++ b/tests/run_test.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +gcc -o is_pmem is_pmem.c -lpmem || exit 1 +RET=$(./is_pmem ./testfile) +unlink testfile +exit $RET diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..68c71fc --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + required_packages: + - libpmem-devel + - gcc + tests: + - simple: + dir: . + run: ./run_test.sh