summaryrefslogtreecommitdiff
path: root/tests/ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ts')
-rw-r--r--tests/ts/blkid/images-fs/exfat.img.bz2bin0 -> 6301 bytes
-rw-r--r--tests/ts/blkid/images-fs/nilfs2.img.bz2bin0 -> 795 bytes
-rw-r--r--tests/ts/blkid/images-fs/tuxonice.img.bz2bin2765314 -> 36891 bytes
-rwxr-xr-xtests/ts/blkid/md-raid1-part2
-rwxr-xr-xtests/ts/blkid/md-raid1-whole2
-rwxr-xr-xtests/ts/cramfs/mkfs2
-rwxr-xr-xtests/ts/fdisk/align-512-4K2
-rwxr-xr-xtests/ts/fdisk/align-512-4K-632
-rwxr-xr-xtests/ts/fdisk/align-512-4K-md4
-rwxr-xr-xtests/ts/fdisk/align-512-5122
-rwxr-xr-xtests/ts/fdisk/align-512-512-topology2
-rwxr-xr-xtests/ts/fdisk/doslabel22
-rwxr-xr-xtests/ts/fdisk/oddinput6
-rw-r--r--tests/ts/lscpu/dumps/x86_64-dellr710.tar.gzbin0 -> 14300 bytes
-rwxr-xr-xtests/ts/schedutils/cpuset57
15 files changed, 72 insertions, 31 deletions
diff --git a/tests/ts/blkid/images-fs/exfat.img.bz2 b/tests/ts/blkid/images-fs/exfat.img.bz2
new file mode 100644
index 00000000..f96c3f06
--- /dev/null
+++ b/tests/ts/blkid/images-fs/exfat.img.bz2
Binary files differ
diff --git a/tests/ts/blkid/images-fs/nilfs2.img.bz2 b/tests/ts/blkid/images-fs/nilfs2.img.bz2
new file mode 100644
index 00000000..a9762eb1
--- /dev/null
+++ b/tests/ts/blkid/images-fs/nilfs2.img.bz2
Binary files differ
diff --git a/tests/ts/blkid/images-fs/tuxonice.img.bz2 b/tests/ts/blkid/images-fs/tuxonice.img.bz2
index c47ab3e8..a70c95ad 100644
--- a/tests/ts/blkid/images-fs/tuxonice.img.bz2
+++ b/tests/ts/blkid/images-fs/tuxonice.img.bz2
Binary files differ
diff --git a/tests/ts/blkid/md-raid1-part b/tests/ts/blkid/md-raid1-part
index 1d55f6bb..909edd03 100755
--- a/tests/ts/blkid/md-raid1-part
+++ b/tests/ts/blkid/md-raid1-part
@@ -40,8 +40,6 @@ DEVICE="/dev/${DEVNAME}"
ts_log "Create partitions"
$TS_CMD_FDISK ${DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-c
-u
n
p
1
diff --git a/tests/ts/blkid/md-raid1-whole b/tests/ts/blkid/md-raid1-whole
index 4589dcff..0539e018 100755
--- a/tests/ts/blkid/md-raid1-whole
+++ b/tests/ts/blkid/md-raid1-whole
@@ -46,8 +46,6 @@ ts_log "Create RAID device"
ts_log "Create partitions on RAID device"
$TS_CMD_FDISK ${MD_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-c
-u
n
p
1
diff --git a/tests/ts/cramfs/mkfs b/tests/ts/cramfs/mkfs
index eb85c55c..99b039e2 100755
--- a/tests/ts/cramfs/mkfs
+++ b/tests/ts/cramfs/mkfs
@@ -71,7 +71,7 @@ ts_device_has "TYPE" "cramfs" $DEVICE
[ "$?" == "0" ] || ts_die "Cannot found cramfs on $DEVICE" $DEVICE
ts_log "mount the image"
-$TS_CMD_MOUNT -L $LABEL $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
+$TS_CMD_MOUNT -r -L $LABEL $TS_MOUNTPOINT 2>&1 >> $TS_OUTPUT
# check it
ts_is_mounted $DEVICE || ts_die "Cannot found $DEVICE in /proc/mounts" $DEVICE
diff --git a/tests/ts/fdisk/align-512-4K b/tests/ts/fdisk/align-512-4K
index 329d4308..956b015d 100755
--- a/tests/ts/fdisk/align-512-4K
+++ b/tests/ts/fdisk/align-512-4K
@@ -43,8 +43,6 @@ DEVICE="/dev/${DEVNAME}"
ts_log "Create partitions"
$TS_CMD_FDISK ${DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-c
-u
n
p
1
diff --git a/tests/ts/fdisk/align-512-4K-63 b/tests/ts/fdisk/align-512-4K-63
index 1963dd09..6ffd47eb 100755
--- a/tests/ts/fdisk/align-512-4K-63
+++ b/tests/ts/fdisk/align-512-4K-63
@@ -43,8 +43,6 @@ DEVICE="/dev/${DEVNAME}"
ts_log "Create partitions"
$TS_CMD_FDISK ${DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-c
-u
n
p
1
diff --git a/tests/ts/fdisk/align-512-4K-md b/tests/ts/fdisk/align-512-4K-md
index ed0ec156..d2c5c753 100755
--- a/tests/ts/fdisk/align-512-4K-md
+++ b/tests/ts/fdisk/align-512-4K-md
@@ -44,8 +44,6 @@ DEVICE="/dev/${DEVNAME}"
ts_log "Create partitions"
$TS_CMD_FDISK ${DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-c
-u
n
p
1
@@ -74,8 +72,6 @@ MD_DEVICE=/dev/${MD_DEVNAME}
ts_log "Create partitions (MD)"
$TS_CMD_FDISK ${MD_DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-c
-u
n
p
1
diff --git a/tests/ts/fdisk/align-512-512 b/tests/ts/fdisk/align-512-512
index 70f0805e..f78feba5 100755
--- a/tests/ts/fdisk/align-512-512
+++ b/tests/ts/fdisk/align-512-512
@@ -31,8 +31,6 @@ DEVICE=$(ts_device_init 50)
ts_log "Create partitions"
$TS_CMD_FDISK ${DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-c
-u
n
p
1
diff --git a/tests/ts/fdisk/align-512-512-topology b/tests/ts/fdisk/align-512-512-topology
index 63801d23..207ec178 100755
--- a/tests/ts/fdisk/align-512-512-topology
+++ b/tests/ts/fdisk/align-512-512-topology
@@ -43,8 +43,6 @@ DEVICE="/dev/${DEVNAME}"
ts_log "Create partitions"
$TS_CMD_FDISK ${DEVICE} >> $TS_OUTPUT 2>&1 <<EOF
-c
-u
n
p
1
diff --git a/tests/ts/fdisk/doslabel b/tests/ts/fdisk/doslabel
index 762cdaac..209a7b3e 100755
--- a/tests/ts/fdisk/doslabel
+++ b/tests/ts/fdisk/doslabel
@@ -43,57 +43,57 @@ ts_image_md5sum >> $TS_OUTPUT 2>&1
# ID will be random and will screw up md5's
ts_log "Create new DOS partition table"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_DOSLABEL}${FDISK_CMD_INIT}${FDISK_CMD_WRITE_CLOSE}" \
- | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create primary partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
- $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Set partition type"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CHANGE_PARTTYPE}${FDISK_CMD_WRITE_CLOSE}" | \
- $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Set primary partition active"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_SET_ACTIVE}${FDISK_CMD_WRITE_CLOSE}" | \
- $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Re-create primary partition"
echo -e "${FDISK_CMD_INIT}d\n${FDISK_CMD_CREATE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" | \
- $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create extended partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" | \
- $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create logical partitions"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
- | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Delete logical partitions"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_LOGICALS}${FDISK_CMD_WRITE_CLOSE}" \
- | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Create another logical partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_CREATE_LOGICAL}${FDISK_CMD_WRITE_CLOSE}" \
- | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Delete primary partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_PRIMARY}${FDISK_CMD_WRITE_CLOSE}" \
- | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Delete extended partition"
echo -e "${FDISK_CMD_INIT}${FDISK_CMD_DELETE_EXTENDED}${FDISK_CMD_WRITE_CLOSE}" \
- | $TS_CMD_FDISK ${TEST_IMAGE_NAME} &> /dev/null
+ | $TS_CMD_FDISK -c=dos -u=cylinders ${TEST_IMAGE_NAME} &> /dev/null
ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_finalize
diff --git a/tests/ts/fdisk/oddinput b/tests/ts/fdisk/oddinput
index 9d5c4762..ceb6102c 100755
--- a/tests/ts/fdisk/oddinput
+++ b/tests/ts/fdisk/oddinput
@@ -28,12 +28,12 @@ ts_image_md5sum >> $TS_OUTPUT 2>&1
ts_log "Empty image listing" # this should report empty partition table
# TEST_IMAGE_NAME has absolute path, and is by definition different on each computer, we need to sed it away
-$TS_CMD_FDISK -l ${TEST_IMAGE_NAME} 2>&1 | sed -e "s/${TEST_IMAGE_NAME//\//\\/}/testimage/" >> $TS_OUTPUT
+$TS_CMD_FDISK -c=dos -u=cylinders -l ${TEST_IMAGE_NAME} 2>&1 | sed -e "s/${TEST_IMAGE_NAME//\//\\/}/testimage/" >> $TS_OUTPUT
ts_log "Nonexistant file" # this originally does absolutely nothing
-$TS_CMD_FDISK -l _a_file_that_does_not_exist_ >> $TS_OUTPUT 2>&1
+$TS_CMD_FDISK -c=dos -u=cylinders -l _a_file_that_does_not_exist_ >> $TS_OUTPUT 2>&1
ts_log "Too small file" # same here
-$TS_CMD_FDISK -l $TS_TOPDIR/expected/fdisk/oddinput.toosmall >> $TS_OUTPUT 2>&1
+$TS_CMD_FDISK -c=dos -u=cylinders -l $TS_TOPDIR/expected/fdisk/oddinput.toosmall >> $TS_OUTPUT 2>&1
ts_finalize
diff --git a/tests/ts/lscpu/dumps/x86_64-dellr710.tar.gz b/tests/ts/lscpu/dumps/x86_64-dellr710.tar.gz
new file mode 100644
index 00000000..2c163816
--- /dev/null
+++ b/tests/ts/lscpu/dumps/x86_64-dellr710.tar.gz
Binary files differ
diff --git a/tests/ts/schedutils/cpuset b/tests/ts/schedutils/cpuset
new file mode 100755
index 00000000..6ad240dc
--- /dev/null
+++ b/tests/ts/schedutils/cpuset
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+#
+# This file is part of util-linux-ng.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This file is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+
+TS_TOPDIR="$(dirname $0)/../.."
+TS_DESC="cpuset"
+
+. $TS_TOPDIR/functions.sh
+ts_init "$*"
+
+MASKS=" 0x00000001 \
+ 0x00000002 \
+ 0x00000003 \
+ 0x00000004 \
+ 0x00000005 \
+ 0x00000006 \
+ 0x00000007 \
+ 0x00000008 \
+ 0x00000009 \
+ 0x00005555 \
+ 0x00007777"
+
+RANGES="0 \
+ 1 \
+ 0,1 \
+ 2 \
+ 0,2 \
+ 1,2 \
+ 0-2 \
+ 3 \
+ 0,3 \
+ 0,2,4,6,8,10,12,14 \
+ 0-2,4-6,8-10,12-14"
+
+ts_log "masks:"
+for i in $MASKS; do
+ $TS_HELPER_CPUSET --mask $i >> $TS_OUTPUT
+done
+
+ts_log "strings:"
+for i in $RANGES; do
+ $TS_HELPER_CPUSET --range $i >> $TS_OUTPUT
+done
+
+ts_finalize