Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
ansiwen committed Sep 26, 2023
1 parent ae353ef commit e3a9faf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,18 @@ jobs:
- name: Run tests
run: make test-container "CEPH_VERSION=${{ matrix.ceph_version }}" "GO_VERSION=${{ matrix.go_version }}" "RESULTS_DIR=$PWD/_results" "ENTRYPOINT_ARGS=--no-cover --test-pkg rados --test-run TestRadosTestSuite/TestAAA"
- name: Clean up test containers
if: always()
run: make test-containers-clean "CEPH_VERSION=${{ matrix.ceph_version }}"
- name: Archive test results
if: always()
uses: actions/upload-artifact@v3
with:
name: "go-ceph-results-${{ matrix.ceph_version }}-${{ matrix.go_version }}"
path: |
_results/
retention-days: 30
- name: Check API Versions and Aging
if: always()
run: |
if [ -f _results/implements.json ]; then
./contrib/apiage.py
Expand Down
1 change: 1 addition & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ test_pkg() {
ulimit -c unlimited
go test -c -v "${testargs[@]}" "./${pkg}"
show ./${pkg}.test
sleep 5
gdb ${pkg}.test core -ex bt -ex q | cat
mkdir -p "${RESULTS_DIR}"
mv ${pkg}.test core ${RESULTS_DIR}
Expand Down
5 changes: 0 additions & 5 deletions rados/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ package rados
import "C"

import (
"fmt"
"runtime"
"unsafe"

Expand Down Expand Up @@ -44,21 +43,17 @@ func (c *Conn) Cluster() ClusterRef {

// PingMonitor sends a ping to a monitor and returns the reply.
func (c *Conn) PingMonitor(id string) (string, error) {
fmt.Println("A")
cid := C.CString(id)
defer C.free(unsafe.Pointer(cid))

var strlen C.size_t
var strout *C.char
fmt.Println("B")
ret := C.rados_ping_monitor(c.cluster, cid, &strout, &strlen)
defer C.rados_buffer_free(strout)
fmt.Println("C")
if ret == 0 {
reply := C.GoStringN(strout, (C.int)(strlen))
return reply, nil
}
fmt.Println("D")
runtime.KeepAlive(c.cluster)
return "", getError(ret)
}
Expand Down

0 comments on commit e3a9faf

Please sign in to comment.