Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/src/imp/fs/ctl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ pub fn sys_link(
sys_linkat(AT_FDCWD, old_path, AT_FDCWD, new_path, 0)
}

#[cfg(target_arch = "x86_64")]
pub fn sys_unlink(path: UserConstPtr<c_char>) -> LinuxResult<isize> {
sys_unlinkat(AT_FDCWD, path, 0)
}

/// remove link of specific file (can be used to delete file)
/// dir_fd: the directory of link to be removed
/// path: the name of link to be removed
Expand Down
10 changes: 9 additions & 1 deletion apps/oscomp/judge_libctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
import sys

# TODO: Add more commands to test here
libctest_baseline = """"""
libctest_baseline = """
========== START entry-static.exe argv ==========
Pass!
========== END entry-static.exe argv ==========
========== START entry-static.exe fdopen ==========
Pass!
========== END entry-static.exe fdopen ==========
"""

bypass_testkey = [
"libctest static fpclassify_invalid_ld80",
Expand All @@ -15,6 +22,7 @@ def parse_libctest(output):
ans = {}
key = ""
for line in output.split("\n"):
line = line.replace('\n', '').replace('\r', '')
if "START entry-static.exe" in line:
key = "libctest static " + line.split(" ")[3]
elif "START entry-dynamic.exe" in line:
Expand Down
11 changes: 8 additions & 3 deletions scripts/oscomp_test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

TIMEOUT=60s
TIMEOUT=600s
EXIT_STATUS=0
ROOT=$(realpath $(dirname $0))/../
AX_ROOT=$ROOT/.arceos
Expand All @@ -25,7 +25,9 @@ if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "riscv64" ] && [ "$ARCH" != "aarch64"
fi

LIBC=musl

if [ -z "$LIBC" ]; then
LIBC=musl
fi
if [ "$LIBC" != "musl" ] && [ "$LIBC" != "glibc" ]; then
echo "Unknown libc: $LIBC"
exit $S_FAILED
Expand Down Expand Up @@ -68,7 +70,10 @@ basic_testlist=(
busybox_testlist=("/$LIBC/busybox sh /$LIBC/busybox_testcode.sh")
iozone_testlist=("/$LIBC/busybox sh /$LIBC/iozone_testcode.sh")
lua_testlist=("/$LIBC/busybox sh /$LIBC/lua_testcode.sh")
libctest_testlist=("/$LIBC/busybox sh /$LIBC/libctest_testcode.sh")
libctest_testlist=(
"/$LIBC/runtest.exe -w entry-static.exe argv"
"/$LIBC/runtest.exe -w entry-static.exe fdopen"
)

testcases_type=(
"basic"
Expand Down
Loading