9880e0a5b2
Consolidate the active desktop path around redbear-full while landing the greeter/session stack and the runtime fixes needed to keep Wayland and KWin bring-up moving forward.
41 lines
1.0 KiB
Diff
41 lines
1.0 KiB
Diff
diff --git a/tests/semaphore/sem_open.c b/tests/semaphore/sem_open.c
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/tests/semaphore/sem_open.c
|
|
@@ -0,0 +1,15 @@
|
|
+#include <assert.h>
|
|
+#include <fcntl.h>
|
|
+#include <semaphore.h>
|
|
+#include <stdio.h>
|
|
+
|
|
+int main(void) {
|
|
+ sem_t *sem = sem_open("/relibc-test-sem", O_CREAT | O_EXCL, 0600, 1);
|
|
+ assert(sem != SEM_FAILED);
|
|
+ assert(sem_wait(sem) == 0);
|
|
+ assert(sem_post(sem) == 0);
|
|
+ assert(sem_close(sem) == 0);
|
|
+ assert(sem_unlink("/relibc-test-sem") == 0);
|
|
+ puts("sem_open ok");
|
|
+ return 0;
|
|
+}
|
|
diff --git a/tests/sys_shm/shmget.c b/tests/sys_shm/shmget.c
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/tests/sys_shm/shmget.c
|
|
@@ -0,0 +1,15 @@
|
|
+#include <assert.h>
|
|
+#include <stdio.h>
|
|
+#include <sys/ipc.h>
|
|
+#include <sys/shm.h>
|
|
+
|
|
+int main(void) {
|
|
+ int id = shmget(IPC_PRIVATE, 4096, IPC_CREAT | 0600);
|
|
+ assert(id >= 0);
|
|
+ void *ptr = shmat(id, 0, 0);
|
|
+ assert(ptr != (void *)-1);
|
|
+ assert(shmdt(ptr) == 0);
|
|
+ assert(shmctl(id, IPC_RMID, 0) == 0);
|
|
+ puts("shmget ok");
|
|
+ return 0;
|
|
+}
|