yugaaank commented on code in PR #3104:
URL: https://github.com/apache/hugegraph/pull/3104#discussion_r3635699373


##########
hugegraph-server/hugegraph-dist/src/assembly/travis/run-riscv64-smoke.sh:
##########
@@ -0,0 +1,474 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# run-riscv64-smoke.sh — Disposable RISC-V (linux/riscv64) end-to-end smoke 
test.
+#
+# Builds the HugeGraph Server distribution on the contributor's native host
+# (x86-64 / arm64), then runs it inside an emulated linux/riscv64 container to
+# verify the RocksDB backend + Gremlin stack actually work on RISC-V via QEMU.
+#
+# This is a CORRECTNESS gate, not a performance benchmark. QEMU user-mode
+# emulation is several times slower than native; expect the full run (build +
+# init + REST + Gremlin + restart) to take many minutes the first time.
+#
+# It requires Docker with QEMU/binfmt_misc multi-platform support (Docker
+# Desktop ships this; on Linux install it with:
+#   docker run --privileged --rm tonistiigi/binfmt --install all
+# No host RISC-V packages are installed by this script.
+#
+# It removes ONLY what it creates: a uniquely-named container, volume, and
+# locally-built image. The QEMU emulator registration is left untouched
+# (remove it with: docker run --privileged --rm tonistiigi/binfmt --uninstall 
all).
+#
+# Usage:
+#   ./run-riscv64-smoke.sh [path-to-server-dist.tar.gz]
+#   ./run-riscv64-smoke.sh            # builds the dist under hugegraph-server/
+#
+set -euo pipefail
+
+ARCH=riscv64
+PLATFORM="linux/${ARCH}"
+# Ubuntu 24.04 publishes openjdk-11-jre-headless for linux/riscv64 (glibc).
+BASE_IMAGE="ubuntu:24.04"
+
+REPO_ROOT=$(cd "$(dirname "$0")/../../../../.." && pwd)
+
+# Use disk-backed temp: the extracted server (~1GB) blows out a small RAM tmpfs
+# /tmp. Default to a work dir on the same (large) filesystem as the repo.
+: "${TMPDIR:=$REPO_ROOT/.riscv64-smoke-tmp}"
+mkdir -p "$TMPDIR"
+export TMPDIR
+
+# Unique, traceable names so cleanup removes only our own resources.
+STAMP=$(date +%Y%m%d%H%M%S)

Review Comment:
   Fixed. Changed to date ` +%Y%m%d%H%M%S-$(head -c 4 /dev/urandom | od -An 
-tx1 | tr -d ' \n') ` — timestamp for traceability, 4 random hex bytes for 
collision resistance. Two runs in the same second now get unique resource names.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to