[Openmp-commits] [openmp] [OpenMP][Tools] Have sort(1) not use long name parameters (PR #73477)

Brad Smith via Openmp-commits openmp-commits at lists.llvm.org
Sun Nov 26 20:35:04 PST 2023


https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/73477

I noticed a few tests were failing on NetBSD. NetBSD's sort(1) does not support long name parameters unlike GNU and FreeBSD/OpenBSD/DragonFly's sort(1).

```
executed command: sort --numeric-sort --stable

 .---command stderr------------
 | sort: unknown option -- -
 | usage: sort [-bdfHilmnrSsu] [-k kstart[,kend]] [-o output] [-R char] [-T dir]
 |              [-t char] [file ...]
 |    or: sort -C|-c [-bdfilnru] [-k kstart[,kend]] [-o output] [-R char]
 |              [-t char] [file]
 `-----------------------------
```

>From 4079fcff7881efe62de454b0266b667a6cde0635 Mon Sep 17 00:00:00 2001
From: Brad Smith <brad at comstyle.com>
Date: Sun, 26 Nov 2023 23:20:04 -0500
Subject: [PATCH] [OpenMP][Tools] Have sort(1) not use long name parameters

I noticed a few tests were failing on NetBSD. NetBSD's sort(1) does not support
long name parameters unlike GNU and FreeBSD/OpenBSD/DragonFly's sort(1).

executed command: sort --numeric-sort --stable

 .---command stderr------------
 | sort: unknown option -- -
 | usage: sort [-bdfHilmnrSsu] [-k kstart[,kend]] [-o output] [-R char] [-T dir]
 |              [-t char] [file ...]
 |    or: sort -C|-c [-bdfilnru] [-k kstart[,kend]] [-o output] [-R char]
 |              [-t char] [file]
 `-----------------------------
---
 openmp/tools/multiplex/tests/lit.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openmp/tools/multiplex/tests/lit.cfg b/openmp/tools/multiplex/tests/lit.cfg
index a637d6f72f55250..459250582ae95c7 100644
--- a/openmp/tools/multiplex/tests/lit.cfg
+++ b/openmp/tools/multiplex/tests/lit.cfg
@@ -90,7 +90,7 @@ if 'Linux' in config.operating_system:
 
 # substitutions
 config.substitutions.append(("FileCheck", "tee %%t.out | %s" % config.test_filecheck))
-config.substitutions.append(("%sort-threads", "sort --numeric-sort --stable"))
+config.substitutions.append(("%sort-threads", "sort -n -s"))
 
 config.substitutions.append(("%libomp-compile-and-run", \
     "%libomp-compile && %libomp-run"))



More information about the Openmp-commits mailing list