Merge pull request #12612 from keszybz/bootctl-column

Rename TEST-31-OOMPOLICY to avoid conflict and look in $BOOT for kernels
This commit is contained in:
Yu Watanabe 2019-05-21 07:45:12 +09:00 committed by GitHub
commit 826c4f35c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 18 deletions

View file

@ -60,17 +60,18 @@
<varlistentry>
<term><option>-p</option></term>
<term><option>--print-esp-path</option></term>
<listitem><para>This option modifies the behaviour of <command>status</command>. Prints only the
path to the EFI System Partition (ESP) to standard output and exits.</para></listitem>
<listitem><para>This option modifies the behaviour of <command>status</command>. Only prints the path
to the EFI System Partition (ESP) to standard output and exits.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-x</option></term>
<term><option>--print-boot-path</option></term>
<listitem><para>This option modifies the behaviour of <command>status</command>. Prints only the
path to the Extended Boot Loader partition if it exists, and the path to the ESP otherwise to
standard output and exit. This command is useful to determine where to place boot loader entries, as
they are preferably placed in the Extended Boot Loader partition if it exists and in the ESP
otherwise.</para></listitem>
<listitem><para>This option modifies the behaviour of <command>status</command>. Only prints the path
to the Extended Boot Loader partition if it exists, and the path to the ESP otherwise to standard
output and exit. This command is useful to determine where to place boot loader entries, as they are
preferably placed in the Extended Boot Loader partition if it exists and in the ESP otherwise.
</para></listitem>
</varlistentry>
<varlistentry>

View file

@ -326,7 +326,7 @@ static int boot_entry_file_check(const char *root, const char *p) {
static void boot_entry_file_list(const char *field, const char *root, const char *p, int *ret_status) {
int status = boot_entry_file_check(root, p);
printf("%13s%s", strempty(field), field ? ":" : " ");
printf("%13s%s ", strempty(field), field ? ":" : " ");
if (status < 0) {
errno = -status;
printf("%s%s%s (%m)\n", ansi_highlight_red(), p, ansi_normal());
@ -997,7 +997,7 @@ static int help(int argc, char *argv[], void *userdata) {
" --esp-path=PATH Path to the EFI System Partition (ESP)\n"
" --boot-path=PATH Path to the $BOOT partition\n"
" -p --print-esp-path Print path to the EFI System Partition\n"
" --print-boot-path Print path to the $BOOT partition\n"
" -x --print-boot-path Print path to the $BOOT partition\n"
" --no-variables Don't touch EFI variables\n"
" --no-pager Do not pipe output into a pager\n"
"\nBoot Loader Commands:\n"
@ -1020,7 +1020,6 @@ static int parse_argv(int argc, char *argv[]) {
enum {
ARG_ESP_PATH = 0x100,
ARG_BOOT_PATH,
ARG_PRINT_BOOT_PATH,
ARG_VERSION,
ARG_NO_VARIABLES,
ARG_NO_PAGER,
@ -1034,7 +1033,7 @@ static int parse_argv(int argc, char *argv[]) {
{ "boot-path", required_argument, NULL, ARG_BOOT_PATH },
{ "print-esp-path", no_argument, NULL, 'p' },
{ "print-path", no_argument, NULL, 'p' }, /* Compatibility alias */
{ "print-boot-path", no_argument, NULL, ARG_PRINT_BOOT_PATH },
{ "print-boot-path", no_argument, NULL, 'x' },
{ "no-variables", no_argument, NULL, ARG_NO_VARIABLES },
{ "no-pager", no_argument, NULL, ARG_NO_PAGER },
{}
@ -1045,7 +1044,7 @@ static int parse_argv(int argc, char *argv[]) {
assert(argc >= 0);
assert(argv);
while ((c = getopt_long(argc, argv, "hp", options, NULL)) >= 0)
while ((c = getopt_long(argc, argv, "hpx", options, NULL)) >= 0)
switch (c) {
case 'h':
@ -1068,10 +1067,16 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'p':
if (arg_print_dollar_boot_path)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"--print-boot-path/-x cannot be combined with --print-esp-path/-p");
arg_print_esp_path = true;
break;
case ARG_PRINT_BOOT_PATH:
case 'x':
if (arg_print_esp_path)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"--print-boot-path/-x cannot be combined with --print-esp-path/-p");
arg_print_dollar_boot_path = true;
break;

View file

@ -1,6 +1,4 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
set -e
TEST_DESCRIPTION="test OOM killer logic"
TEST_NO_NSPAWN=1

View file

@ -1,6 +1,4 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh
set -ex
set -o pipefail

View file

@ -14,7 +14,7 @@ NSPAWN_TIMEOUT="${NSPAWN_TIMEOUT:-infinity}"
TIMED_OUT= # will be 1 after run_* if *_TIMEOUT is set and test timed out
[[ "$LOOKS_LIKE_SUSE" ]] && FSTYPE="${FSTYPE:-btrfs}" || FSTYPE="${FSTYPE:-ext4}"
UNIFIED_CGROUP_HIERARCHY="${UNIFIED_CGROUP_HIERARCHY:-default}"
EFI_MOUNT="$(bootctl -p 2>/dev/null || echo /boot)"
EFI_MOUNT="$(bootctl -x 2>/dev/null || echo /boot)"
QEMU_MEM="${QEMU_MEM:-512M}"
if ! ROOTLIBDIR=$(pkg-config --variable=systemdutildir systemd); then